Skip to content

Update QEMU to V10.0.3 #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 137 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
3af56fc
target/i386: Fix model number of Zhaoxin YongFeng vCPU template
Apr 14, 2025
86ffc25
target/i386: Reset parked vCPUs together with the online ones
maciejsszmigiero Mar 27, 2025
00a5dc2
target/i386/hvf: fix lflags_to_rflags
bonzini Apr 3, 2025
2da497f
target/avr: Improve decode of LDS, STS
rth7680 Mar 23, 2025
94da90b
hw/core: Get default_cpu_type calling machine_class_default_cpu_type()
philmd Apr 22, 2025
dbbb444
hw/core/cpu: gdb_arch_name string should not be freed
pm215 Mar 17, 2025
e60bbda
target/mips: Fix MIPS16e translation
hauke Apr 12, 2025
7bff88a
meson: Use has_header_symbol() to check getcpu()
akihikodaki Apr 24, 2025
1604055
meson: Remove CONFIG_STATX and CONFIG_STATX_MNT_ID
akihikodaki Apr 24, 2025
e1ccfea
meson: Share common C source prefixes
akihikodaki Apr 24, 2025
8a9a719
meson: Use osdep_prefix for strchrnul()
akihikodaki Apr 24, 2025
86b846f
accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128
rth7680 Apr 30, 2025
07f034c
hw/arm/npcm8xx_boards: Correct valid_cpu_types setting of NPCM8XX SoC
timlee66 Apr 28, 2025
ac32612
target/arm: Don't assert() for ISB/SB inside IT block
pm215 May 1, 2025
be7b08e
docs: Don't define duplicate label in qemu-block-drivers.rst.inc
pm215 May 1, 2025
01a9f1a
hw/gpio/imx_gpio: Fix interpretation of GDIR polarity
shentok May 1, 2025
f60033d
target/i386: do not trigger IRQ shadow for LSS
bonzini May 8, 2025
827be9d
target/i386: do not block singlestep for STI
bonzini Jul 15, 2024
a03d7d6
xen: mapcache: Fix finding matching entry
alex-pentagrid Apr 10, 2025
bfa3f55
xen: mapcache: Split mapcache_grants by ro and rw
edgarigl Apr 25, 2025
9340920
hw/i2c/imx: Always set interrupt status bit if interrupt condition oc…
shentok May 7, 2025
5081dc5
9pfs: fix concurrent v9fs_reclaim_fd() calls
cschoenebeck Mar 7, 2025
a0f3262
9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()
cschoenebeck Mar 7, 2025
8efe159
s390x: Fix leak in machine_set_loadparm
May 9, 2025
4055826
virtio: Call set_features during reset
akihikodaki Apr 21, 2025
1514381
hw/nvme: fix nvme hotplugging
birkelund May 7, 2025
f82dd28
target/riscv: pmp: don't allow RLB to bypass rule privileges
loiclefort Mar 13, 2025
504dcda
target/riscv: pmp: move Smepmp operation conversion into a function
loiclefort Mar 13, 2025
bc15a8d
target/riscv: pmp: fix checks on writes to pmpcfg in Smepmp MML mode
loiclefort Mar 13, 2025
b76d4a5
hw/riscv: Fix type conflict of GLib function pointers
bonzini Apr 10, 2025
156321d
target/riscv: fix endless translation loop on big endian systems
wtdcode Apr 15, 2025
70dbbc2
common-user/host/riscv: use tail pseudoinstruction for calling tail
Icenowy Apr 17, 2025
336fed6
target/riscv: rvv: Source vector registers cannot overlap mask register
antonblanchard Apr 8, 2025
027ea4a
target/riscv: rvv: Add CHECK arg to GEN_OPFVF_WIDEN_TRANS
antonblanchard Apr 8, 2025
bc502d4
target/riscv: rvv: Apply vext_check_input_eew to vrgather instruction…
rnax Apr 8, 2025
0bfd8dd
target/riscv: rvv: Apply vext_check_input_eew to OPIVI/OPIVX/OPFVF(ve…
rnax Apr 8, 2025
2a0eb3c
target/riscv: rvv: Apply vext_check_input_eew to OPIVV/OPFVV(vext_che…
rnax Apr 8, 2025
19d1074
target/riscv: rvv: Apply vext_check_input_eew to vector slide instruc…
rnax Apr 8, 2025
faaeaa9
target/riscv: rvv: Apply vext_check_input_eew to vector integer exten…
rnax Apr 8, 2025
be6e117
target/riscv: rvv: Apply vext_check_input_eew to vector narrow/widen …
rnax Apr 8, 2025
43a4f23
target/riscv: rvv: Apply vext_check_input_eew to vector indexed load/…
rnax Apr 8, 2025
7b21781
target/riscv: Fix the rvv reserved encoding of unmasked instructions
rnax Apr 8, 2025
95c0e6e
target/riscv: Fix vslidedown with rvv_ta_all_1s
antonblanchard Apr 14, 2025
c500814
target/riscv/kvm: minor fixes/tweaks
danielhb Apr 29, 2025
04b8557
target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg()
danielhb Apr 29, 2025
ea8eb87
target/riscv/kvm: turn u32/u64 reg functions into macros
danielhb Apr 29, 2025
90f7e23
target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro
danielhb Apr 29, 2025
6ba14ba
target/riscv/kvm: add kvm_csr_cfgs[]
danielhb Apr 29, 2025
9ac56fb
target/riscv/kvm: do not read unavailable CSRs
danielhb Apr 29, 2025
2f6357c
i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG supported
calmisi May 14, 2025
3e59fcc
i386/hvf: Make CPUID_HT supported
calmisi May 14, 2025
cdf3fb0
hw/pci-host/gt64120: Fix endianness handling
blackjackal010 Apr 29, 2025
ef16559
hw/pci-host: Remove unused pci_host_data_be_ops
blackjackal010 Apr 29, 2025
5e8ef1d
qapi/misc-target: Fix the doc to distinguish query-sgx and query-sgx-…
trueptolemy May 13, 2025
7484d61
migration/multifd: Don't send device state packets with zerocopy flag
maciejsszmigiero May 16, 2025
8a48520
migration: Allow caps to be set when preempt or multifd cap enabled
xzpeter May 13, 2025
679450c
target/hppa: Copy instruction code into fr1 on FPU assist fault
hdeller May 17, 2025
5f119c6
linux-user/hppa: Send proper si_code on SIGFPE exception
hdeller May 17, 2025
6966e0b
target/hppa: Fix FPE exceptions
hdeller May 17, 2025
3d5b2f8
Drop support for Python 3.8
huth Apr 25, 2025
fd0b1a5
Update version for 10.0.1 release
May 26, 2025
6f7a53e
Revert "Drop support for Python 3.8"
May 28, 2025
ff3419c
Update version for 10.0.2 release
May 28, 2025
c9afc73
hw/misc/aspeed_hace: Ensure HASH_IRQ is always set to prevent firmwar…
jamin-aspeed May 15, 2025
80a03b5
hw/arm/aspeed_ast27x0: Fix RAM size detection failure on BE hosts
jamin-aspeed May 22, 2025
6eea0cd
ui/gtk: Document scale and coordinate handling
phreer May 11, 2025
91fec60
ui/gtk: Use consistent naming for variables in different coordinates
phreer May 11, 2025
43fecc5
gtk/ui: Introduce helper gd_update_scale
phreer May 11, 2025
a5a8050
ui/gtk: Update scales in fixed-scale mode when rendering GL area
phreer May 11, 2025
613f05a
ui/sdl: Consider scaling in mouse event handling
phreer May 11, 2025
a610978
ui/vnc.c: replace big endian flag with byte order value
berrange Jan 27, 2025
531cbd8
ui/vnc: take account of client byte order in pixman format
berrange Jan 27, 2025
9238fd8
ui/vnc: fix tight palette pixel encoding for 8/16-bpp formats
berrange Jan 28, 2025
1702044
hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info
groeck May 29, 2025
21f86e2
vhost: Don't set vring call if guest notifier is unused
May 22, 2025
325d039
hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine
shentok May 26, 2025
8399ccb
hw/i386/amd_iommu: Fix device setup failure when PT is on.
sarunkod May 16, 2025
c3e1181
hw/i386/amd_iommu: Fix xtsup when vcpus < 255
hegdevasant May 16, 2025
47ddae8
audio: fix SIGSEGV in AUD_get_buffer_size_out()
May 15, 2025
6b12cb6
audio: fix size calculation in AUD_get_buffer_size_out()
May 15, 2025
92d08b3
hw/audio/asc: fix SIGSEGV in asc_realize()
May 15, 2025
9f80e47
target/i386: Remove FRED dependency on WRMSRNS
xinli-intel Jan 3, 2025
d8e6f3f
iotests: fix 240
stefanhaRH May 29, 2025
ab96ea4
hw/core/qdev-properties-system: Add missing return in set_drive_helper()
foxmox May 23, 2025
6276ce6
hw/loongarch/virt: Fix big endian support with MCFG table
bibo-mao Jun 4, 2025
c902fc6
hw/arm/virt: Check bypass iommu is not set for iommu-map DT property
shamiali2008 Jun 2, 2025
436b3dd
qemu-options.hx: Fix reversed description of icount sleep behavior
Jun 6, 2025
b7da1f5
hw/arm/mps2: Configure the AN500 CPU with 16 MPU regions
pm215 Jun 5, 2025
3cf25f4
linux-user/arm: Fix return value of SYS_cacheflush
neuschaefer Jun 13, 2025
fdd2028
target/loongarch: add check for fcond
gaosong-loongson Jun 3, 2025
46cdfdf
target/loongarch: fix vldi/xvldi raise wrong error
gaosong-loongson Jun 4, 2025
22909a1
tcg: Fix constant propagation in tcg_reg_alloc_dup
rth7680 Jun 28, 2025
ed4bad2
target/arm: Make RETA[AB] UNDEF when pauth is not implemented
wjsota Jul 1, 2025
5df7910
target/arm: Correct KVM & HVF dtb_compatible value
philmd Jul 1, 2025
fb9bad3
virtio-gpu: support context init multiple timeline
zzyiwei Jun 27, 2025
b8f48f4
hw/s390x/ccw-device: Fix memory leak in loadparm setter
kevmw Jun 25, 2025
83b48a5
target/arm: Fix SME vs AdvSIMD exception priority
rth7680 Jul 4, 2025
0e5f0d8
target/arm: Fix sve_access_check for SME
rth7680 Jul 4, 2025
c76ec8d
target/arm: Fix 128-bit element ZIP, UZP, TRN
rth7680 Jul 4, 2025
9af1de0
target/arm: Fix PSEL size operands to tcg_gen_gvec_ands
rth7680 Jul 4, 2025
9a98db5
target/arm: Fix f16_dotadd vs nan selection
rth7680 Jul 4, 2025
005184d
target/arm: Fix bfdotadd_ebf vs nan selection
rth7680 Jul 4, 2025
cae6ddf
target/i386: fix TB exit logic in gen_movl_seg() when writing to SS
mcayland Jun 11, 2025
fe000c4
target/arm: Don't enforce NSE,NS check for EL3->EL3 returns
pm215 Jul 4, 2025
676bc0f
hw/arm/fsl-imx8mp: Wire VIRQ and VFIQ
shentok Jun 29, 2025
1714828
linux-user: Implement fchmodat2 syscall
pm215 Jul 10, 2025
1759558
linux-user: Check for EFAULT failure in nanosleep
pm215 Jul 10, 2025
a4e31f5
linux-user: Hold the fd-trans lock across fork
geofft Mar 14, 2025
b4ead90
migration: Don't sync volatile memory after migration completes
BenjaminChaney Jun 16, 2025
c49db93
linux-user: Use qemu_set_cloexec() to mark pidfd as FD_CLOEXEC
pm215 Jul 11, 2025
a655b65
accel/kvm: Adjust the note about the minimum required kernel version
huth Jul 2, 2025
6624ff3
net: fix buffer overflow in af_xdp_umem_create()
naya451 Jun 2, 2025
f272f31
virtio-net: Add queues for RSS during migration
akihikodaki May 30, 2025
10a9eed
amd_iommu: Fix Miscellaneous Information Register 0 encoding
aljimenezb Jun 17, 2025
1ca9d2e
amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES command
aljimenezb Jun 17, 2025
d1ea4a1
amd_iommu: Update bitmasks representing DTE reserved fields
aljimenezb Jun 17, 2025
caaa648
amd_iommu: Fix masks for various IOMMU MMIO Registers
aljimenezb Jun 17, 2025
18e70a4
amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE
aljimenezb Jun 17, 2025
90c635c
amd_iommu: Fix the calculation for Device Table size
aljimenezb Jun 17, 2025
fc1ad51
amd_iommu: Remove duplicated definitions
aljimenezb Jun 17, 2025
787a817
amd_iommu: Fix truncation of oldval in amdvi_writeq
Ethsan Jun 17, 2025
e50ca17
file-posix: Fix aio=threads performance regression after enablign FUA
kevmw Jun 25, 2025
2533500
roms: re-remove execute bit from hppa-firmware*
crobinso May 18, 2025
12e88c0
vhost: Fix used memslot tracking when destroying a vhost device
davidhildenbrand Jun 3, 2025
2df7954
ui/vnc: Do not copy z_stream
akihikodaki Jun 3, 2025
d097553
i386/cpu: Fix cpu number overflow in CPUID.01H.EBX[23:16]
Jul 17, 2025
1822478
i386/cpu: Fix overflow of cache topology fields in CPUID.04H
wenqian77 Jul 14, 2025
8251738
i386/cpu: Honor maximum value for CPUID.8000001DH.EAX[25:14]
trueptolemy Jul 14, 2025
24778b1
target/i386: do not expose ARCH_CAPABILITIES on AMD CPU
bonzini Jul 14, 2025
9561a8c
hw/net/npcm_gmac.c: Send the right data for second packet in a row
pm215 Jul 14, 2025
08fa61a
ui: fix setting client_endian field defaults
berrange Jun 4, 2025
3341f5c
target/arm: Correct encoding of Debug Communications Channel registers
pm215 Jul 21, 2025
a5ac980
hvf: arm: Emulate ICC_RPR_EL1 accesses properly
Jul 14, 2025
66d2164
Update version for 10.0.3 release
Jul 22, 2025
9e5b6ba
Merge tag 'v10.0.3' into update_qemu_v10_0_3
rmalmain Aug 12, 2025
0993469
fix typing issue
rmalmain Aug 12, 2025
124e7a4
update ci
rmalmain Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:

jobs:
build:
runs-on: [self-hosted, qemu]
runs-on: ubuntu-24.04
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.0
10.0.3
11 changes: 6 additions & 5 deletions accel/kvm/kvm-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,8 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id)
return kvm_fd;
}

static void kvm_reset_parked_vcpus(void *param)
static void kvm_reset_parked_vcpus(KVMState *s)
{
KVMState *s = param;
struct KVMParkedVcpu *cpu;

QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) {
Expand Down Expand Up @@ -2563,8 +2562,7 @@ static int kvm_init(MachineState *ms)
{
MachineClass *mc = MACHINE_GET_CLASS(ms);
static const char upgrade_note[] =
"Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n"
"(see http://sourceforge.net/projects/kvm).\n";
"Please upgrade to at least kernel 4.5.\n";
const struct {
const char *name;
int num;
Expand Down Expand Up @@ -2744,7 +2742,6 @@ static int kvm_init(MachineState *ms)
}

qemu_register_reset(kvm_unpoison_all, NULL);
qemu_register_reset(kvm_reset_parked_vcpus, s);

if (s->kernel_irqchip_allowed) {
kvm_irqchip_create(s);
Expand Down Expand Up @@ -2914,6 +2911,10 @@ static void do_kvm_cpu_synchronize_post_reset(CPUState *cpu, run_on_cpu_data arg
void kvm_cpu_synchronize_post_reset(CPUState *cpu)
{
run_on_cpu(cpu, do_kvm_cpu_synchronize_post_reset, RUN_ON_CPU_NULL);

if (cpu == first_cpu) {
kvm_reset_parked_vcpus(kvm_state);
}
}

static void do_kvm_cpu_synchronize_post_init(CPUState *cpu, run_on_cpu_data arg)
Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/translate-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int64_t decode_sleb128(const uint8_t **pp)
val |= (int64_t)(byte & 0x7f) << shift;
shift += 7;
} while (byte & 0x80);
if (shift < TARGET_LONG_BITS && (byte & 0x40)) {
if (shift < 64 && (byte & 0x40)) {
val |= -(int64_t)1 << shift;
}

Expand Down
8 changes: 8 additions & 0 deletions audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,14 @@ size_t AUD_read(SWVoiceIn *sw, void *buf, size_t size)

int AUD_get_buffer_size_out(SWVoiceOut *sw)
{
if (!sw) {
return 0;
}

if (audio_get_pdo_out(sw->s->dev)->mixing_engine) {
return sw->resample_buf.size * sw->info.bytes_per_frame;
}

return sw->hw->samples * sw->hw->info.bytes_per_frame;
}

Expand Down
29 changes: 15 additions & 14 deletions block/file-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2484,9 +2484,9 @@ static inline bool raw_check_linux_aio(BDRVRawState *s)
}
#endif

static int coroutine_fn raw_co_prw(BlockDriverState *bs, int64_t *offset_ptr,
uint64_t bytes, QEMUIOVector *qiov, int type,
int flags)
static int coroutine_fn GRAPH_RDLOCK
raw_co_prw(BlockDriverState *bs, int64_t *offset_ptr, uint64_t bytes,
QEMUIOVector *qiov, int type, int flags)
{
BDRVRawState *s = bs->opaque;
RawPosixAIOData acb;
Expand Down Expand Up @@ -2545,7 +2545,7 @@ static int coroutine_fn raw_co_prw(BlockDriverState *bs, int64_t *offset_ptr,
ret = raw_thread_pool_submit(handle_aiocb_rw, &acb);
if (ret == 0 && (flags & BDRV_REQ_FUA)) {
/* TODO Use pwritev2() instead if it's available */
ret = raw_co_flush_to_disk(bs);
ret = bdrv_co_flush(bs);
}
goto out; /* Avoid the compiler err of unused label */

Expand Down Expand Up @@ -2580,16 +2580,16 @@ static int coroutine_fn raw_co_prw(BlockDriverState *bs, int64_t *offset_ptr,
return ret;
}

static int coroutine_fn raw_co_preadv(BlockDriverState *bs, int64_t offset,
int64_t bytes, QEMUIOVector *qiov,
BdrvRequestFlags flags)
static int coroutine_fn GRAPH_RDLOCK
raw_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes,
QEMUIOVector *qiov, BdrvRequestFlags flags)
{
return raw_co_prw(bs, &offset, bytes, qiov, QEMU_AIO_READ, flags);
}

static int coroutine_fn raw_co_pwritev(BlockDriverState *bs, int64_t offset,
int64_t bytes, QEMUIOVector *qiov,
BdrvRequestFlags flags)
static int coroutine_fn GRAPH_RDLOCK
raw_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes,
QEMUIOVector *qiov, BdrvRequestFlags flags)
{
return raw_co_prw(bs, &offset, bytes, qiov, QEMU_AIO_WRITE, flags);
}
Expand Down Expand Up @@ -3525,10 +3525,11 @@ static int coroutine_fn raw_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op,
#endif

#if defined(CONFIG_BLKZONED)
static int coroutine_fn raw_co_zone_append(BlockDriverState *bs,
int64_t *offset,
QEMUIOVector *qiov,
BdrvRequestFlags flags) {
static int coroutine_fn GRAPH_RDLOCK
raw_co_zone_append(BlockDriverState *bs,
int64_t *offset,
QEMUIOVector *qiov,
BdrvRequestFlags flags) {
assert(flags == 0);
int64_t zone_size_mask = bs->bl.zone_size - 1;
int64_t iov_len = 0;
Expand Down
4 changes: 2 additions & 2 deletions common-user/host/riscv/safe-syscall.inc.S
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ safe_syscall_end:

/* code path setting errno */
0: neg a0, a0
j safe_syscall_set_errno_tail
tail safe_syscall_set_errno_tail

/* code path when we didn't execute the syscall */
2: li a0, QEMU_ERESTARTSYS
j safe_syscall_set_errno_tail
tail safe_syscall_set_errno_tail

.cfi_endproc
.size safe_syscall_base, .-safe_syscall_base
2 changes: 1 addition & 1 deletion docs/devel/codebase.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ yet, so sometimes the source code is all you have.
* `monitor <https://gitlab.com/qemu-project/qemu/-/tree/master/monitor>`_:
`Monitor <QEMU monitor>` implementation (HMP & QMP).
* `nbd <https://gitlab.com/qemu-project/qemu/-/tree/master/nbd>`_:
QEMU `NBD (Network Block Device) <nbd>` server.
QEMU NBD (Network Block Device) server.
* `net <https://gitlab.com/qemu-project/qemu/-/tree/master/net>`_:
Network (host) support.
* `pc-bios <https://gitlab.com/qemu-project/qemu/-/tree/master/pc-bios>`_:
Expand Down
2 changes: 0 additions & 2 deletions docs/system/qemu-block-drivers.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ What you should *never* do:
- expect it to work when loadvm'ing
- write to the FAT directory on the host system while accessing it with the guest system

.. _nbd:

NBD access
~~~~~~~~~~

Expand Down
39 changes: 30 additions & 9 deletions hw/9pfs/9p.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,24 @@ void coroutine_fn v9fs_reclaim_fd(V9fsPDU *pdu)
V9fsFidState *f;
GHashTableIter iter;
gpointer fid;
int err;
int nclosed = 0;

/* prevent multiple coroutines running this function simultaniously */
if (s->reclaiming) {
return;
}
s->reclaiming = true;

g_hash_table_iter_init(&iter, s->fids);

QSLIST_HEAD(, V9fsFidState) reclaim_list =
QSLIST_HEAD_INITIALIZER(reclaim_list);

/* Pick FIDs to be closed, collect them on reclaim_list. */
while (g_hash_table_iter_next(&iter, &fid, (gpointer *) &f)) {
/*
* Unlink fids cannot be reclaimed. Check
* for them and skip them. Also skip fids
* Unlinked fids cannot be reclaimed, skip those, and also skip fids
* currently being operated on.
*/
if (f->ref || f->flags & FID_NON_RECLAIMABLE) {
Expand Down Expand Up @@ -493,23 +501,34 @@ void coroutine_fn v9fs_reclaim_fd(V9fsPDU *pdu)
}
}
/*
* Now close the fid in reclaim list. Free them if they
* are already clunked.
* Close the picked FIDs altogether on a background I/O driver thread. Do
* this all at once to keep latency (i.e. amount of thread hops between main
* thread <-> fs driver background thread) as low as possible.
*/
v9fs_co_run_in_worker({
QSLIST_FOREACH(f, &reclaim_list, reclaim_next) {
err = (f->fid_type == P9_FID_DIR) ?
s->ops->closedir(&s->ctx, &f->fs_reclaim) :
s->ops->close(&s->ctx, &f->fs_reclaim);
if (!err) {
/* total_open_fd must only be mutated on main thread */
nclosed++;
}
}
});
total_open_fd -= nclosed;
/* Free the closed FIDs. */
while (!QSLIST_EMPTY(&reclaim_list)) {
f = QSLIST_FIRST(&reclaim_list);
QSLIST_REMOVE(&reclaim_list, f, V9fsFidState, reclaim_next);
if (f->fid_type == P9_FID_FILE) {
v9fs_co_close(pdu, &f->fs_reclaim);
} else if (f->fid_type == P9_FID_DIR) {
v9fs_co_closedir(pdu, &f->fs_reclaim);
}
/*
* Now drop the fid reference, free it
* if clunked.
*/
put_fid(pdu, f);
}

s->reclaiming = false;
}

/*
Expand Down Expand Up @@ -4324,6 +4343,8 @@ int v9fs_device_realize_common(V9fsState *s, const V9fsTransport *t,
s->ctx.fst = &fse->fst;
fsdev_throttle_init(s->ctx.fst);

s->reclaiming = false;

rc = 0;
out:
if (rc) {
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ struct V9fsState {
uint64_t qp_ndevices; /* Amount of entries in qpd_table. */
uint16_t qp_affix_next;
uint64_t qp_fullpath_next;
bool reclaiming;
};

/* 9p2000.L open flags */
Expand Down
10 changes: 6 additions & 4 deletions hw/arm/aspeed_ast27x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,9 @@ static void aspeed_ram_capacity_write(void *opaque, hwaddr addr, uint64_t data,
* If writes the data to the address which is beyond the ram size,
* it would write the data to the "address % ram_size".
*/
result = address_space_write(&s->dram_as, addr % ram_size,
MEMTXATTRS_UNSPECIFIED, &data, 4);
address_space_stl_le(&s->dram_as, addr % ram_size, data,
MEMTXATTRS_UNSPECIFIED, &result);

if (result != MEMTX_OK) {
qemu_log_mask(LOG_GUEST_ERROR,
"%s: DRAM write failed, addr:0x%" HWADDR_PRIx
Expand All @@ -339,9 +340,10 @@ static const MemoryRegionOps aspeed_ram_capacity_ops = {
.read = aspeed_ram_capacity_read,
.write = aspeed_ram_capacity_write,
.endianness = DEVICE_LITTLE_ENDIAN,
.impl.min_access_size = 4,
.valid = {
.min_access_size = 1,
.max_access_size = 8,
.min_access_size = 4,
.max_access_size = 4,
},
};

Expand Down
4 changes: 4 additions & 0 deletions hw/arm/fsl-imx8mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ static void fsl_imx8mp_realize(DeviceState *dev, Error **errp)
qdev_get_gpio_in(cpudev, ARM_CPU_IRQ));
sysbus_connect_irq(gicsbd, i + ms->smp.cpus,
qdev_get_gpio_in(cpudev, ARM_CPU_FIQ));
sysbus_connect_irq(gicsbd, i + 2 * ms->smp.cpus,
qdev_get_gpio_in(cpudev, ARM_CPU_VIRQ));
sysbus_connect_irq(gicsbd, i + 3 * ms->smp.cpus,
qdev_get_gpio_in(cpudev, ARM_CPU_VFIQ));
}
}

Expand Down
4 changes: 4 additions & 0 deletions hw/arm/mps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ static void mps2_common_init(MachineState *machine)
switch (mmc->fpga_type) {
case FPGA_AN385:
case FPGA_AN386:
qdev_prop_set_uint32(armv7m, "num-irq", 32);
break;
case FPGA_AN500:
/* The AN500 configures its Cortex-M7 with 16 MPU regions */
qdev_prop_set_uint32(armv7m, "mpu-ns-regions", 16);
qdev_prop_set_uint32(armv7m, "num-irq", 32);
break;
case FPGA_AN511:
Expand Down
1 change: 1 addition & 0 deletions hw/arm/npcm8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ static struct arm_boot_info npcm8xx_binfo = {
.secure_boot = false,
.board_id = -1,
.board_setup_addr = NPCM8XX_BOARD_SETUP_ADDR,
.psci_conduit = QEMU_PSCI_CONDUIT_SMC,
};

void npcm8xx_load_kernel(MachineState *machine, NPCM8xxState *soc)
Expand Down
2 changes: 1 addition & 1 deletion hw/arm/npcm8xx_boards.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static void npcm8xx_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
static const char * const valid_cpu_types[] = {
ARM_CPU_TYPE_NAME("cortex-a9"),
ARM_CPU_TYPE_NAME("cortex-a35"),
NULL
};

Expand Down
15 changes: 10 additions & 5 deletions hw/arm/virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1492,9 +1492,12 @@ static void create_virtio_iommu_dt_bindings(VirtMachineState *vms)
qemu_fdt_setprop_cell(ms->fdt, node, "phandle", vms->iommu_phandle);
g_free(node);

qemu_fdt_setprop_cells(ms->fdt, vms->pciehb_nodename, "iommu-map",
0x0, vms->iommu_phandle, 0x0, bdf,
bdf + 1, vms->iommu_phandle, bdf + 1, 0xffff - bdf);
if (!vms->default_bus_bypass_iommu) {
qemu_fdt_setprop_cells(ms->fdt, vms->pciehb_nodename, "iommu-map",
0x0, vms->iommu_phandle, 0x0, bdf,
bdf + 1, vms->iommu_phandle, bdf + 1,
0xffff - bdf);
}
}

static void create_pcie(VirtMachineState *vms)
Expand Down Expand Up @@ -1617,8 +1620,10 @@ static void create_pcie(VirtMachineState *vms)
switch (vms->iommu) {
case VIRT_IOMMU_SMMUV3:
create_smmu(vms, vms->bus);
qemu_fdt_setprop_cells(ms->fdt, nodename, "iommu-map",
0x0, vms->iommu_phandle, 0x0, 0x10000);
if (!vms->default_bus_bypass_iommu) {
qemu_fdt_setprop_cells(ms->fdt, nodename, "iommu-map",
0x0, vms->iommu_phandle, 0x0, 0x10000);
}
break;
default:
g_assert_not_reached();
Expand Down
7 changes: 7 additions & 0 deletions hw/audio/asc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "qemu/osdep.h"
#include "qemu/timer.h"
#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/irq.h"
#include "audio/audio.h"
Expand Down Expand Up @@ -654,6 +655,12 @@ static void asc_realize(DeviceState *dev, Error **errp)

s->voice = AUD_open_out(&s->card, s->voice, "asc.out", s, asc_out_cb,
&as);
if (!s->voice) {
AUD_remove_card(&s->card);
error_setg(errp, "Initializing audio stream failed");
return;
}

s->shift = 1;
s->samples = AUD_get_buffer_size_out(s->voice) >> s->shift;
s->mixbuf = g_malloc0(s->samples << s->shift);
Expand Down
5 changes: 3 additions & 2 deletions hw/core/machine-qmp-cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props,

for (el = machines; el; el = el->next) {
MachineClass *mc = el->data;
const char *default_cpu_type = machine_class_default_cpu_type(mc);
MachineInfo *info;

info = g_malloc0(sizeof(*info));
Expand All @@ -90,8 +91,8 @@ MachineInfoList *qmp_query_machines(bool has_compat_props, bool compat_props,
info->numa_mem_supported = mc->numa_mem_supported;
info->deprecated = !!mc->deprecation_reason;
info->acpi = !!object_class_property_find(OBJECT_CLASS(mc), "acpi");
if (mc->default_cpu_type) {
info->default_cpu_type = g_strdup(mc->default_cpu_type);
if (default_cpu_type) {
info->default_cpu_type = g_strdup(default_cpu_type);
}
if (mc->default_ram_id) {
info->default_ram_id = g_strdup(mc->default_ram_id);
Expand Down
1 change: 1 addition & 0 deletions hw/core/qdev-properties-system.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static void set_drive_helper(Object *obj, Visitor *v, const char *name,
if (ctx != bdrv_get_aio_context(bs)) {
error_setg(errp, "Different aio context is not supported for new "
"node");
return;
}

blk_replace_bs(blk, bs, errp);
Expand Down
Loading
Loading