diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/9pfs/9p.c | 3 | ||||
-rw-r--r-- | hw/hyperv/hyperv.c | 6 | ||||
-rw-r--r-- | hw/net/cadence_gem.c | 1 | ||||
-rw-r--r-- | hw/xtensa/xtfpga.c | 10 |
4 files changed, 18 insertions, 2 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 267a25533b..bdf7919abf 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -2855,6 +2855,7 @@ static void coroutine_fn v9fs_wstat(void *opaque) struct stat stbuf; V9fsFidState *fidp; V9fsPDU *pdu = opaque; + V9fsState *s = pdu->s; v9fs_stat_init(&v9stat); err = pdu_unmarshal(pdu, offset, "dwS", &fid, &unused, &v9stat); @@ -2920,7 +2921,9 @@ static void coroutine_fn v9fs_wstat(void *opaque) } } if (v9stat.name.size != 0) { + v9fs_path_write_lock(s); err = v9fs_complete_rename(pdu, fidp, -1, &v9stat.name); + v9fs_path_unlock(s); if (err < 0) { goto out; } diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index a28e7249d8..8758635227 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -136,7 +136,11 @@ void hyperv_synic_add(CPUState *cs) void hyperv_synic_reset(CPUState *cs) { - device_reset(DEVICE(get_synic(cs))); + SynICState *synic = get_synic(cs); + + if (synic) { + device_reset(DEVICE(synic)); + } } static const TypeInfo synic_type_info = { diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index d95cc27f58..7f63411430 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -979,7 +979,6 @@ static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size) /* Do nothing if receive is not enabled. */ if (!gem_can_receive(nc)) { - assert(!first_desc); return -1; } diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index b3161de320..21094319a6 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -446,6 +446,8 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, MachineState *machine) } } +#define XTFPGA_MMU_RESERVED_MEMORY_SIZE (128 * MiB) + static const hwaddr xtfpga_mmu_io[2] = { 0xf0000000, }; @@ -568,6 +570,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx60_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 64 * MiB; } static const TypeInfo xtfpga_lx60_type = { @@ -584,6 +587,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx60_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 64 * MiB; } static const TypeInfo xtfpga_lx60_nommu_type = { @@ -600,6 +604,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx200_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 96 * MiB; } static const TypeInfo xtfpga_lx200_type = { @@ -616,6 +621,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_lx200_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 96 * MiB; } static const TypeInfo xtfpga_lx200_nommu_type = { @@ -632,6 +638,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_ml605_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 512 * MiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE; } static const TypeInfo xtfpga_ml605_type = { @@ -648,6 +655,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_ml605_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 256 * MiB; } static const TypeInfo xtfpga_ml605_nommu_type = { @@ -664,6 +672,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_kc705_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE; + mc->default_ram_size = 1 * GiB - XTFPGA_MMU_RESERVED_MEMORY_SIZE; } static const TypeInfo xtfpga_kc705_type = { @@ -680,6 +689,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data) mc->init = xtfpga_kc705_nommu_init; mc->max_cpus = 4; mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE; + mc->default_ram_size = 256 * MiB; } static const TypeInfo xtfpga_kc705_nommu_type = { |