Re: [PATCH v2 1/4] Move dbus-display1 out of ui

2023-12-15 Thread Akihiko Odaki
On 2023/12/15 21:00, Marc-André Lureau wrote: Hi On Fri, Dec 15, 2023 at 3:29 PM Akihiko Odaki wrote: Despite its name, dbus-display1 does not only provide DBus interfaces for the display but also for the audio. Signed-off-by: Akihiko Odaki It can actually do a lot more, since you can

[PATCH v3 2/3] meson: Add dbus_display1 to util_ss and genh

2023-12-15 Thread Akihiko Odaki
Adding dbus_display1 to util_ss ensures that the source will be linked with audio/dbus. It also avoids recompilation when linking with dbus-display-test. Adding dbus_display1 to genh ensures that dbus-display1.h is generated before compiling ui/dbus, audio/dbus, and dbus-display-test. Both

[PATCH v3 3/3] audio: Do not include ui/dbus.h

2023-12-15 Thread Akihiko Odaki
ui/dbusaudio.c does not depend on ui/dbus.h Signed-off-by: Akihiko Odaki --- audio/dbusaudio.c | 1 - audio/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c index 5222b3c68804..f6cdcec80aaa 100644 --- a/audio/dbusaudio.c +++

[PATCH v3 0/3] meson: Fixes for dbus modules

2023-12-15 Thread Akihiko Odaki
I found it was failing to build dbus modules when --enable-dbus so here are fixes. Signed-off-by: Akihiko Odaki --- Changes in v3: - Merged dbus_display1_lib into libqemuutil. - Added patch "audio: Do not include ui/dbus.h". - Link to v2: https://lore.kernel.org/r/20231215-dbus-v2-0

[PATCH v3 1/3] Move dbus-display1 out of ui

2023-12-15 Thread Akihiko Odaki
Despite its name, dbus-display1 does not only provide DBus interfaces for the display but also for the audio. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + meson.build | 21 + ui/dbus.h

Re: [External] Re: [PATCH v2 05/20] meson: Introduce new instruction set enqcmd to the build system.

2023-12-15 Thread Hao Xiang
On Mon, Dec 11, 2023 at 7:41 AM Fabiano Rosas wrote: > > Hao Xiang writes: > > > Enable instruction set enqcmd in build. > > > > Signed-off-by: Hao Xiang > > --- > > meson.build | 2 ++ > > meson_options.txt | 2 ++ > > scripts/meson-buildoptions.sh | 3 +++ > > 3

[PATCH RFC] linux-user: Allow gdbstub to ignore page protection

2023-12-15 Thread Ilya Leoshkevich
Hi, I've noticed that gdbstub behaves differently from gdbserver in that it doesn't allow reading non-readable pages. The below patch works for me, but I'm not sure if I haven't introduced layering violations or race conditions here, so I'm sending this as an RFC. Please let me know if the code

[PATCH 10/12] next-cube.c: remove val and size arguments from nextscr2_write()

2023-12-15 Thread Mark Cave-Ayland
These are now redundant with the scr2 and old_scr2 fields in NeXTPC. Rename the function from nextscr2_write() to next_scr2_rtc_update() to better reflect its purpose. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 17 ++--- 1 file changed, 6 insertions(+), 11

[PATCH 01/12] next-cube.c: add dummy Ethernet register to allow diagnostic to timeout

2023-12-15 Thread Mark Cave-Ayland
Add a dummy register at address 0x6000 in the MMIO memory region to allow the initial diagnostic test to timeout rather than getting stuck in a loop continuously writing "en_write: tx not ready" to the console. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 4 1 file changed, 4

[PATCH 05/12] next-cube.c: update and improve dma_ops

2023-12-15 Thread Mark Cave-Ayland
Rename dma_ops to next_dma_ops and the read/write functions to next_dma_read() and next_dma_write() respectively, mark next_dma_ops as DEVICE_BIG_ENDIAN and also improve the consistency of the val variable in next_dma_read() and next_dma_write(). Signed-off-by: Mark Cave-Ayland ---

[PATCH 12/12] next-cube.c: move machine MemoryRegions into NeXTState

2023-12-15 Thread Mark Cave-Ayland
These static memory regions are contained within the machine and do not need to be dynamically allocated. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/hw/m68k/next-cube.c

[PATCH 04/12] next-cube.c: update scr_ops to properly use modern memory API

2023-12-15 Thread Mark Cave-Ayland
The old QEMU memory accessors used in the original NextCube patch series had separate functions for 1, 2 and 4 byte accessors. When the series was finally merged a simple wrapper function was written to dispatch the memory accesses using the original functions. Convert scr_ops to use the memory

[PATCH 06/12] next-cube.c: move static led variable to NeXTPC

2023-12-15 Thread Mark Cave-Ayland
The state of the led is stored in the SCR2 register which is part of the NeXTPC device. Note that this is a migration break for the NeXTPC device, but as nothing will currently boot then we simply bump the migration version for now. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 13

[PATCH 00/12] next-cube: various tidy-ups and improvements

2023-12-15 Thread Mark Cave-Ayland
This series contains some tidy-ups/improvements for the next-cube machine with the aim of bringing the code up-to-date with our latest coding guidelines. The main aim of the series is to bring the memory accessors up-to-date with the memory API and improve some of basic machine modelling. There

[PATCH 11/12] next-cube.c: replace sysmem with get_system_memory() in next_cube_init()

2023-12-15 Thread Mark Cave-Ayland
Removing the intermediate variable helps simplify the code in next_cube_init(). Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index d9a1f234ec..73deef25ca

[PATCH 09/12] next-cube.c: move static old_scr2 variable to NeXTPC

2023-12-15 Thread Mark Cave-Ayland
Move the old_scr2 variable to NeXTPC so that the old SCR2 register state is stored along with the current SCR2 state. Since the SCR2 register is 32-bits wide, convert old_scr2 to uint32_t and update the SCR2 register access code to allow unaligned writes. Note that this is a migration break, but

[PATCH 08/12] next-cube.c: move LED logic to new next_scr2_led_update() function

2023-12-15 Thread Mark Cave-Ayland
Ensure that the LED status is updated by calling next_scr2_led_update() whenever the SC2 register is written. Signed-off-by: Mark Cave-Ayland --- hw/m68k/next-cube.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/m68k/next-cube.c

[PATCH 03/12] next-cube.c: update mmio_ops to properly use modern memory API

2023-12-15 Thread Mark Cave-Ayland
The old QEMU memory accessors used in the original NextCube patch series had separate functions for 1, 2 and 4 byte accessors. When the series was finally merged a simple wrapper function was written to dispatch the memory accesses using the original functions. Convert mmio_ops to use the memory

[PATCH 02/12] next-cube.c: don't pulse SCSI DMA IRQ upon reception of FLUSH command

2023-12-15 Thread Mark Cave-Ayland
Normally a DMA FLUSH command is used to ensure that data is completely written to the device and/or memory, so remove the pulse of the SCSI DMA IRQ if a DMA FLUSH command is received. This enables the NeXT ROM monitor to start to load from a SCSI disk. Signed-off-by: Mark Cave-Ayland ---

[PATCH 07/12] next-cube.c: move static phase variable to NextRtc

2023-12-15 Thread Mark Cave-Ayland
The phase variable represents part of the state machine used to clock data out of the NextRtc device. Note that this is a migration break for the NeXTRtc struct, but as nothing will currently boot then we simply bump the migration version for now. Signed-off-by: Mark Cave-Ayland ---

Re: [PATCH v3 00/16] tests: enable meson test timeouts to improve debuggability

2023-12-15 Thread Alex Bennée
Thomas Huth writes: > This is a respin of Daniel's series that re-enables the meson test > runner timeouts. To make sure that we do not get into trouble on > older systems, I ran all the tests with "make check SPEED=slow -j32" > on my laptop that has only 16 SMT threads, so each test was running

[PATCH for 9.0 02/12] vdpa: make batch_begin_once early return

2023-12-15 Thread Eugenio Pérez
Prefer early return so it is easier to merge vhost_vdpa_listener_begin_batch here and make iotlb baches begin and end symmetrical. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c

[PATCH for 9.0 10/12] vdpa: add vhost_vdpa_net_load_setup NetClient callback

2023-12-15 Thread Eugenio Pérez
So the vDPA backend knows when a migration incoming starts. NicState argument is needed so we can get the dma address space. Signed-off-by: Eugenio Pérez --- RFC v2: * Solve git conflict with .set_steering_ebpf * Fix x-svq=on use case which did not allocated iova_tree. --- include/net/net.h |

[PATCH for 9.0 00/12] Map memory at destination .load_setup in vDPA-net migration

2023-12-15 Thread Eugenio Pérez
Current memory operations like pinning may take a lot of time at the destination. Currently they are done after the source of the migration is stopped, and before the workload is resumed at the destination. This is a period where neigher traffic can flow, nor the VM workload can continue

[PATCH for 9.0 03/12] vdpa: merge _begin_batch into _batch_begin_once

2023-12-15 Thread Eugenio Pérez
There was only one call. This way we can make the begin and end of the batch symmetrical. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index

[PATCH for 9.0 08/12] vdpa: add vhost_vdpa_load_setup

2023-12-15 Thread Eugenio Pérez
Callers can use this function to setup the incoming migration thread. This thread is able to map the guest memory while the migration is ongoing, without blocking QMP or other important tasks. While this allows the destination QEMU not to block, it expands the mapping time during migration

[PATCH for 9.0 12/12] virtio_net: register incremental migration handlers

2023-12-15 Thread Eugenio Pérez
This way VirtIONet can detect when the incoming migration starts. While registering in the backend (nc->peer) seems more logical, we need nic dma address space, and we cannot get it from the backend. Signed-off-by: Eugenio Pérez --- This could be done in vhost_vdpa or VirtIODevice struct, but

[PATCH for 9.0 07/12] vdpa: set backend capabilities at vhost_vdpa_init

2023-12-15 Thread Eugenio Pérez
The backend does not reset them until the vdpa file descriptor is closed so there is no harm in doing it only once. This allows the destination of a live migration to premap memory in batches, using VHOST_BACKEND_F_IOTLB_BATCH. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 50

[PATCH for 9.0 11/12] vdpa: add vhost_vdpa_net_switchover_ack_needed

2023-12-15 Thread Eugenio Pérez
Use migration switchover ack capability to make sure QEMU has mapped all the guest memory to the device before the source stops the VM and attempts to complete the migration. All net vdpa devices support this early map of guest memory, so return always true. Signed-off-by: Eugenio Pérez ---

[PATCH for 9.0 06/12] vdpa: check for iova tree initialized at net_client_start

2023-12-15 Thread Eugenio Pérez
To map the guest memory while it is migrating we need to create the iova_tree, as long as the destination uses x-svq=on. Checking to not override it. The function vhost_vdpa_net_client_stop clear it if the device is stopped. If the guest starts the device again, the iova tree is recreated by

[PATCH for 9.0 05/12] vdpa: factor out stop path of vhost_vdpa_dev_start

2023-12-15 Thread Eugenio Pérez
This makes easier to build an error path in next patches. No functional change. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 57a8043cd4..449c3794b2

[PATCH for 9.0 01/12] vdpa: do not set virtio status bits if unneeded

2023-12-15 Thread Eugenio Pérez
Next commits will set DRIVER and ACKNOWLEDGE flags repeatedly in the case of a migration destination. Let's save ioctls with this. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c

[PATCH for 9.0 04/12] vdpa: extract out _dma_end_batch from _listener_commit

2023-12-15 Thread Eugenio Pérez
So we can call out vhost_vdpa_dma_end_batch out of the listener callbacks. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index a533fc5bc7..57a8043cd4 100644

[PATCH for 9.0 09/12] vdpa: approve switchover after memory map in the migration destination

2023-12-15 Thread Eugenio Pérez
If the VM migrates before finishing all the maps, the source will stop but the destination is still not ready to continue, and it will wait until all guest RAM is mapped. The destination can use switchover_ack to prevent source to stop until all the memory is mapped at the destination.

Re: [PATCH] tests/avocado: Add a test for a little-endian microblaze machine

2023-12-15 Thread Alex Bennée
Thomas Huth writes: > We've already got a test for a big endian microblaze machine, but so > far we lack one for a little endian machine. Now that the QEMU advent > calendar featured such an image, we can test the little endian mode, > too. > > Signed-off-by: Thomas Huth Queued to

[PATCH] tests/avocado: Add a test for a little-endian microblaze machine

2023-12-15 Thread Thomas Huth
We've already got a test for a big endian microblaze machine, but so far we lack one for a little endian machine. Now that the QEMU advent calendar featured such an image, we can test the little endian mode, too. Signed-off-by: Thomas Huth --- tests/avocado/machine_microblaze.py | 26

Re: [PATCH v2] vfio: Include libgen.h for basename API

2023-12-15 Thread Cédric Le Goater
Hello, On 12/12/23 02:02, Khem Raj wrote: Glibc has two implementation one based on POSIX which is used when libgen.h is included and second implementation is GNU implementation which is used when string.h is included. The functions are no identical in behavior. Musl C library does not

Re: "Instant clone" with Qemu?

2023-12-15 Thread Stefan Hajnoczi
On Fri, 15 Dec 2023 at 06:01, Philipp Hahn wrote: > > Hello Stefan, > > thank you for your kind reply. > > Am 05.12.23 um 15:44 schrieb Stefan Hajnoczi: > > On Tue, 5 Dec 2023 at 04:53, Philipp Hahn wrote: > > > >> by accident I stumbled over "VMware Instant Clone" ¹, which allows > >> cloning

Re: [PATCH v7 0/4] gdbstub and TCG plugin improvements

2023-12-15 Thread Alex Bennée
Akihiko Odaki writes: > This series extracts fixes and refactorings that can be applied > independently from "[PATCH v9 00/23] plugins: Allow to read registers". > > The patch "target/riscv: Move MISA limits to class" was replaced with > patch "target/riscv: Move misa_mxl_max to class" since I

[PATCH] target/arm/helper: Propagate MDCR_EL2.HPMN into PMCR_EL0.N

2023-12-15 Thread Jean-Philippe Brucker
MDCR_EL2.HPMN allows an hypervisor to limit the number of PMU counters available to EL1 and EL0 (to keep the others to itself). QEMU already implements this split correctly, except for PMCR_EL0.N reads: the number of counters read by EL1 or EL0 should be the one configured in MDCR_EL2.HPMN.

Re: [PATCH] tests/qtest/npcm7xx_pwm-test: Only do full testing in slow mode

2023-12-15 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 03:35:24PM +0100, Thomas Huth wrote: > The npcm7xx_pwm-test can take quite a while when running with > --enable-debug on a loaded system. The tests here are quite > repetitive - by default it should be fine if we only execute > some of them and only execute all when running

[PATCH] tests/qtest/npcm7xx_pwm-test: Only do full testing in slow mode

2023-12-15 Thread Thomas Huth
The npcm7xx_pwm-test can take quite a while when running with --enable-debug on a loaded system. The tests here are quite repetitive - by default it should be fine if we only execute some of them and only execute all when running in slow testing mode. Signed-off-by: Thomas Huth ---

Re: [PATCH] hw/arm/musicpal: Convert to qemu_add_kbd_event_handler()

2023-12-15 Thread Peter Maydell
Ping for code review, since we're approaching the end of the 8.2 freeze ? thanks -- PMM On Fri, 3 Nov 2023 at 18:27, Peter Maydell wrote: > > Convert the musicpal key input device to use > qemu_add_kbd_event_handler(). This lets us simplify it because we no > longer need to track whether we're

[PATCH v4] fsl-imx: add simple RTC emulation for i.MX6 and i.MX7 boards

2023-12-15 Thread Nikita Ostrenkov
Signed-off-by: Nikita Ostrenkov --- hw/misc/imx7_snvs.c | 93 ++--- hw/misc/trace-events| 4 +- include/hw/misc/imx7_snvs.h | 7 ++- 3 files changed, 94 insertions(+), 10 deletions(-) diff --git a/hw/misc/imx7_snvs.c b/hw/misc/imx7_snvs.c index

Re: [PATCH for-9.0 5/5] target/riscv/kvm: rename riscv_reg_id() to riscv_reg_id_ulong()

2023-12-15 Thread Andrew Jones
On Fri, Dec 08, 2023 at 03:38:35PM -0300, Daniel Henrique Barboza wrote: > kvm_riscv_reg_id() returns an id encoded with an ulong size, i.e. an u32 > size when running TARGET_RISCV32 and u64 when running TARGET_RISCV64. > > Rename it to kvm_riscv_reg_id_ulong() to enhance code readability. It'll

Re: [PATCH for-9.0 4/5] target/riscv/kvm: add RISCV_CONFIG_REG()

2023-12-15 Thread Andrew Jones
On Fri, Dec 08, 2023 at 03:38:34PM -0300, Daniel Henrique Barboza wrote: > Create a RISCV_CONFIG_REG() macro, similar to what other regs use, to > hide away some of the boilerplate. > > Signed-off-by: Daniel Henrique Barboza > --- > target/riscv/kvm/kvm-cpu.c | 25 +++-- > 1

Re: [PATCH for-9.0 3/5] target/riscv/kvm: change timer regs size to u64

2023-12-15 Thread Andrew Jones
On Fri, Dec 08, 2023 at 03:38:33PM -0300, Daniel Henrique Barboza wrote: > KVM_REG_RISCV_TIMER regs are always u64 according to the KVM API, but at > this moment we'll return u32 regs if we're running a RISCV32 target. > > Use the kvm_riscv_reg_id_u64() helper in RISCV_TIMER_REG() to fix it. > >

Re: [PATCH for-9.0 2/5] target/riscv/kvm: change KVM_REG_RISCV_FP_D to u64

2023-12-15 Thread Andrew Jones
On Fri, Dec 08, 2023 at 03:38:32PM -0300, Daniel Henrique Barboza wrote: > KVM_REG_RISCV_FP_D regs are always u64 size. Using kvm_riscv_reg_id() in > RISCV_FP_D_REG() ends up encoding the wrong size if we're running with > TARGET_RISCV32. > > Create a new helper that returns a KVM ID with u64

Re: [PATCH for-9.0 1/5] target/riscv/kvm: change KVM_REG_RISCV_FP_F to u32

2023-12-15 Thread Andrew Jones
On Fri, Dec 08, 2023 at 03:38:31PM -0300, Daniel Henrique Barboza wrote: > KVM_REG_RISCV_FP_F regs have u32 size according to the API, but by using > kvm_riscv_reg_id() in RISCV_FP_F_REG() we're returning u64 sizes when > running with TARGET_RISCV64. The most likely reason why no one noticed >

Re: [PATCH] vl: Print display options for -display help

2023-12-15 Thread BALATON Zoltan
On Fri, 15 Dec 2023, Daniel P. Berrangé wrote: On Fri, Dec 15, 2023 at 01:43:37PM +0100, BALATON Zoltan wrote: On Fri, 15 Dec 2023, Akihiko Odaki wrote: On 2023/12/14 22:00, BALATON Zoltan wrote: So we go from: $ ./qemu-system-aarch64 -display help Available display backend types: none gtk

Re: [PATCH] vl: Print display options for -display help

2023-12-15 Thread Daniel P . Berrangé
On Fri, Dec 15, 2023 at 01:43:37PM +0100, BALATON Zoltan wrote: > On Fri, 15 Dec 2023, Akihiko Odaki wrote: > > On 2023/12/14 22:00, BALATON Zoltan wrote: > > > > So we go from: > > > > > > > > $ ./qemu-system-aarch64 -display help > > > > Available display backend types: > > > > none > > > > gtk

[PATCH 9.0 v2 06/13] vdpa: move file descriptor to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 07/13] vdpa: move iotlb_batch_begin_sent to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 12/13] vdpa: use dev_shared in vdpa_iommu

2023-12-15 Thread Eugenio Pérez
The memory listener functions can call these too. Make vdpa_iommu work with VhostVDPAShared. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- include/hw/virtio/vhost-vdpa.h | 2 +- hw/virtio/vhost-vdpa.c | 16 2 files changed, 9 insertions(+), 9 deletions(-)

[PATCH 9.0 v2 02/13] vdpa: move iova tree to the shared struct

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 03/13] vdpa: move iova_range to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 05/13] vdpa: use vdpa shared for tracing

2023-12-15 Thread Eugenio Pérez
By the end of this series dma_map and dma_unmap functions don't have the vdpa device for tracing. Movinge trace function to shared member one. Print it also in the vdpa initialization so log reader can relate them. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c |

[PATCH 9.0 v2 11/13] vdpa: use VhostVDPAShared in vdpa_dma_map and unmap

2023-12-15 Thread Eugenio Pérez
The callers only have the shared information by the end of this series. Start converting this functions. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- include/hw/virtio/vhost-vdpa.h | 4 +-- hw/virtio/vhost-vdpa.c | 50 +- net/vhost-vdpa.c

[PATCH 9.0 v2 09/13] vdpa: remove msg type of vhost_vdpa

2023-12-15 Thread Eugenio Pérez
It is always VHOST_IOTLB_MSG_V2. We can always make it back per vhost_dev if needed. This change makes easier for vhost_vdpa_map and unmap not to depend on vhost_vdpa but only in VhostVDPAShared. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- include/hw/virtio/vhost-vdpa.h | 1 -

[PATCH 9.0 v2 10/13] vdpa: move iommu_list to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 13/13] vdpa: move memory listener to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 08/13] vdpa: move backend_cap to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 04/13] vdpa: move shadow_data to vhost_vdpa_shared

2023-12-15 Thread Eugenio Pérez
Next patches will register the vhost_vdpa memory listener while the VM is migrating at the destination, so we can map the memory to the device before stopping the VM at the source. The main goal is to reduce the downtime. However, the destination QEMU is unaware of which vhost_vdpa device will

[PATCH 9.0 v2 00/13] Consolidate common vdpa members in VhostVDPAShared

2023-12-15 Thread Eugenio Pérez
Current memory operations like pinning may take a lot of time at the destination. Currently they are done after the source of the migration is stopped, and before the workload is resumed at the destination. This is a period where neigher traffic can flow, nor the VM workload can continue

[PATCH 9.0 v2 01/13] vdpa: add VhostVDPAShared

2023-12-15 Thread Eugenio Pérez
It will hold properties shared among all vhost_vdpa instances associated with of the same device. For example, we just need one iova_tree or one memory listener for the entire device. Next patches will register the vhost_vdpa memory listener at the beginning of the VM migration at the

Re: [PATCH 2/3] ui/gtk: unblock pipeline only if fence hasn't been signaled yet

2023-12-15 Thread BALATON Zoltan
On Fri, 15 Dec 2023, Marc-André Lureau wrote: Hi On Thu, Dec 14, 2023 at 8:26 AM Dongwon Kim wrote: It is needed to unblock the pipeline only if there is an active dmabuf to be rendered and the fence for it is not yet signaled. Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by:

Re: [PATCH] vl: Print display options for -display help

2023-12-15 Thread BALATON Zoltan
On Fri, 15 Dec 2023, Akihiko Odaki wrote: On 2023/12/14 22:00, BALATON Zoltan wrote: On Thu, 14 Dec 2023, Philippe Mathieu-Daudé wrote: Hi Akihiko, On 14/12/23 07:47, Akihiko Odaki wrote: -display lists display backends, but does not tell their options. Use the help messages from

[PATCH] tests/tcg/xtensa: add test for OOB TLB reads

2023-12-15 Thread Max Filippov
Add a test reading *TLB ways 0..15. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_mmu.S | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/tcg/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S index 1006c8cf77b2..94cd09563c7a 100644 --- a/tests/tcg/xtensa/test_mmu.S

Re: [PATCH v2 4/4] tests/qtest: Depend on dbus_display1_dep

2023-12-15 Thread Marc-André Lureau
On Fri, Dec 15, 2023 at 3:29 PM Akihiko Odaki wrote: > > It ensures dbus-display1.c will not be recompiled. > > Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau > --- > tests/qtest/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v2 3/4] meson: Explicitly specify dbus-display1.h dependency

2023-12-15 Thread Marc-André Lureau
Hi On Fri, Dec 15, 2023 at 3:29 PM Akihiko Odaki wrote: > > Explicitly specify dbus-display1.h as a dependency so that files > depending on it will not get compiled too early. > > Fixes: 1222070e7728 ("meson: ensure dbus-display generated code is built > before other units") > Signed-off-by:

[PATCH] target/xtensa: fix OOB TLB entry access

2023-12-15 Thread Max Filippov
r[id]tlb[01], [iw][id]tlb opcodes use TLB way index passed in a register by the guest. The host uses 3 bits of the index for ITLB indexing and 4 bits for DTLB, but there's only 7 entries in the ITLB array and 10 in the DTLB array, so a malicious guest may trigger out-of-bound access to these

Re: [PATCH v2 2/4] audio: Depend on dbus_display1_dep

2023-12-15 Thread Marc-André Lureau
Hi On Fri, Dec 15, 2023 at 3:29 PM Akihiko Odaki wrote: > > dbusaudio needs dbus_display1_dep. > > Fixes: 739362d4205c ("audio: add "dbus" audio backend") The build didn't fail, did it? You don't need to backport this, thus I don't think "Fixes" apply here. (furthermore, dbus_display1_dep was

Re: [PATCH v2 1/4] Move dbus-display1 out of ui

2023-12-15 Thread Marc-André Lureau
Hi On Fri, Dec 15, 2023 at 3:29 PM Akihiko Odaki wrote: > > Despite its name, dbus-display1 does not only provide DBus interfaces > for the display but also for the audio. > > Signed-off-by: Akihiko Odaki It can actually do a lot more, since you can arbitrarily redirect chardev devices.. USB,

Re: [PATCH] qemu_init: increase NOFILE soft limit on POSIX

2023-12-15 Thread Daniel P . Berrangé
On Tue, Dec 12, 2023 at 03:32:50PM +0100, Fiona Ebner wrote: > In many configurations, e.g. multiple vNICs with multiple queues or > with many Ceph OSDs, the default soft limit of 1024 is not enough. > QEMU is supposed to work fine with file descriptors >= 1024 and does > not use select() on

Re: [PATCH] accel/tcg: Expose translation block flags to plugins

2023-12-15 Thread Alex Bennée
Mikhail Tyutin writes: > Hi Alex, > >> > Exposing appropriate translation block flag allows plugins to >> > handle "memory only" blocks in appropriate way. >> >> We don't want to expose internal details to the plugin. It shouldn't >> need to care. >> >> Do you have a test case where you missed

Re: [PATCH] vl: Print display options for -display help

2023-12-15 Thread Akihiko Odaki
On 2023/12/14 22:00, BALATON Zoltan wrote: On Thu, 14 Dec 2023, Philippe Mathieu-Daudé wrote: Hi Akihiko, On 14/12/23 07:47, Akihiko Odaki wrote: -display lists display backends, but does not tell their options. Use the help messages from qemu-options.def, which include the list of options.

[PATCH v2 1/4] Move dbus-display1 out of ui

2023-12-15 Thread Akihiko Odaki
Despite its name, dbus-display1 does not only provide DBus interfaces for the display but also for the audio. Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + meson.build | 21 + ui/dbus.h

[PATCH v2 2/4] audio: Depend on dbus_display1_dep

2023-12-15 Thread Akihiko Odaki
dbusaudio needs dbus_display1_dep. Fixes: 739362d4205c ("audio: add "dbus" audio backend") Signed-off-by: Akihiko Odaki --- audio/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/meson.build b/audio/meson.build index c8f658611f42..608f35e6af78 100644 ---

[PATCH v2 3/4] meson: Explicitly specify dbus-display1.h dependency

2023-12-15 Thread Akihiko Odaki
Explicitly specify dbus-display1.h as a dependency so that files depending on it will not get compiled too early. Fixes: 1222070e7728 ("meson: ensure dbus-display generated code is built before other units") Signed-off-by: Akihiko Odaki --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 4/4] tests/qtest: Depend on dbus_display1_dep

2023-12-15 Thread Akihiko Odaki
It ensures dbus-display1.c will not be recompiled. Signed-off-by: Akihiko Odaki --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 47dabf91d048..3a1a79d7c72e 100644 --- a/tests/qtest/meson.build

[PATCH v2 0/4] meson: Fixes for dbus modules

2023-12-15 Thread Akihiko Odaki
I found it was failing to build dbus modules when --enable-dbus so here are fixes. Signed-off-by: Akihiko Odaki --- Changes in v2: - Updated MAINTAINERS. - Link to v1: https://lore.kernel.org/r/20231215-dbus-v1-0-349e059ac...@daynix.com --- Akihiko Odaki (4): Move dbus-display1 out of ui

[PATCH v2] vl: Print display options for -display help

2023-12-15 Thread Akihiko Odaki
-display lists display backends, but does not tell their options. Use the help messages from qemu-options.def, which include the list of options. Note that this change also has an unfortunate side effect that it will no longer tell what UI modules are actually available. Signed-off-by: Akihiko

[PATCH 2/4] audio: Depend on dbus_display1_dep

2023-12-15 Thread Akihiko Odaki
dbusaudio needs dbus_display1_dep. Fixes: 739362d4205c ("audio: add "dbus" audio backend") Signed-off-by: Akihiko Odaki --- audio/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/meson.build b/audio/meson.build index c8f658611f42..608f35e6af78 100644 ---

[PATCH 3/4] meson: Explicitly specify dbus-display1.h dependency

2023-12-15 Thread Akihiko Odaki
Explicitly specify dbus-display1.h as a dependency so that files depending on it will not get compiled too early. Fixes: 1222070e7728 ("meson: ensure dbus-display generated code is built before other units") Signed-off-by: Akihiko Odaki --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 1/4] Move dbus-display1 out of ui

2023-12-15 Thread Akihiko Odaki
Despite its name, dbus-display1 does not only provide DBus interfaces for the display but also for the audio. Signed-off-by: Akihiko Odaki --- meson.build | 21 + ui/dbus.h | 2 +- audio/dbusaudio.c

[PATCH 4/4] tests/qtest: Depend on dbus_display1_dep

2023-12-15 Thread Akihiko Odaki
It ensures dbus-display1.c will not be recompiled. Signed-off-by: Akihiko Odaki --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 47dabf91d048..3a1a79d7c72e 100644 --- a/tests/qtest/meson.build

[PATCH 0/4] meson: Fixes for dbus modules

2023-12-15 Thread Akihiko Odaki
/dbus-display1.xml => dbus-display1.xml | 0 tests/qtest/meson.build | 2 +- ui/meson.build| 18 -- 8 files changed, 27 insertions(+), 23 deletions(-) --- base-commit: 4705fc0c8511d073bee4751c3c974aab2b10a970 change-id: 20231215-d

Re: "Instant clone" with Qemu?

2023-12-15 Thread Philipp Hahn
Hello Stefan, thank you for your kind reply. Am 05.12.23 um 15:44 schrieb Stefan Hajnoczi: On Tue, 5 Dec 2023 at 04:53, Philipp Hahn wrote: > by accident I stumbled over "VMware Instant Clone" ¹, which allows cloning of running VMs by copy-on-write-sharing the disk images and memory

[PATCH v2] scripts/checkpatch: Support codespell checking

2023-12-15 Thread Zhao Liu
From: Zhao Liu Add two spelling check options (--codespell and --codespellfile) to enhance spelling check through dictionary, which copied the Linux kernel's implementation in checkpatch.pl. This check uses the dictionary at "/usr/share/codespell/dictionary.txt" by default, if there is no

Re: [PATCH v4] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2023-12-15 Thread Sebastian Ott
On Fri, 15 Dec 2023, Sebastian Ott wrote: On Thu, 14 Dec 2023, Eric Auger wrote: On 12/7/23 11:36, Shaoqin Huang wrote: +if (kvm_vcpu_ioctl(cs, KVM_HAS_DEVICE_ATTR, )) { +warn_report("The kernel doesn't support the PMU Event Filter!\n"); +return; +} + +/*

Re: [PATCH v2] spapr: Tag pseries-2.1 - 2.11 machines as deprecated

2023-12-15 Thread Daniel Henrique Barboza
On 12/14/23 15:17, Cédric Le Goater wrote: pseries machines before version 2.11 have undergone many changes to correct issues, mostly regarding migration compatibility. This is obfuscating the code uselessly and makes maintenance more difficult. Remove them and only keep the last version of

[PATCH v2 0/4] hw/loongarch/virt: Set iocsr address space per-board rather percpu

2023-12-15 Thread Bibo Mao
On LoongArch system, there is iocsr address space simliar system io address space on x86. And each cpu has its separate iocsr address space now, with this patch, iocsr address space is changed with per-board, and MemTxAttrs.requester_id is used to differentiate cpu cores. --- Changes in v2: 1.

[PATCH v2 1/4] hw/intc/loongarch_ipi: Use MemTxAttrs interface for ipi ops

2023-12-15 Thread Bibo Mao
There are two interface pairs for MemoryRegionOps, read/write and read_with_attrs/write_with_attrs. The later is better for ipi device emulation since initial cpu can be parsed from attrs.requester_id. And requester_id can be overrided for IOCSR_IPI_SEND and mail_send function when it is to

[PATCH v2 3/4] hw/intc/loongarch_extioi: Add dynamic cpu number support

2023-12-15 Thread Bibo Mao
On LoongArch physical machine, one extioi interrupt controller only supports 4 cpus. With processor more than 4 cpus, there are multiple extioi interrupt controllers; if interrupts need to be routed to other cpus, they are forwarded from extioi node0 to other extioi nodes. On virt machine model,

[PATCH v2 4/4] hw/intc/loongarch_extioi: Add vmstate post_load support

2023-12-15 Thread Bibo Mao
There are elements sw_ipmap and sw_coremap, which is usd to speed up irq injection flow. They are saved and restored in vmstate during migration, indeed they can calculated from hw registers. Here post_load is added for get sw_ipmap and sw_coremap from extioi hw state. Signed-off-by: Bibo Mao

[PATCH v2 2/4] hw/loongarch/virt: Set iocsr address space per-board rather than percpu

2023-12-15 Thread Bibo Mao
LoongArch system has iocsr address space, most iocsr registers are per-board, however some iocsr register spaces banked for percpu such as ipi mailbox and extioi interrupt status. For banked iocsr space, each cpu has the same iocsr space, but separate data. This patch changes iocsr address space

Re: [PATCH v4] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2023-12-15 Thread Sebastian Ott
On Thu, 14 Dec 2023, Eric Auger wrote: On 12/7/23 11:36, Shaoqin Huang wrote: +if (kvm_vcpu_ioctl(cs, KVM_HAS_DEVICE_ATTR, )) { +warn_report("The kernel doesn't support the PMU Event Filter!\n"); +return; +} + +/* The filter only needs to be initialized for 1 vcpu.

Re: [PATCH for 8.2] target/riscv: Fix th.dcache.cval1 priviledge check

2023-12-15 Thread Alistair Francis
On Fri, Dec 8, 2023 at 7:45 PM LIU Zhiwei wrote: > > According to the specification, the th.dcache.cvall1 can be executed > under all priviledges. > The specification about xtheadcmo located in, > https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadcmo/dcache_cval1.adoc > >

Re: [PATCH for 8.2] target/riscv: Fix th.dcache.cval1 priviledge check

2023-12-15 Thread Alistair Francis
On Fri, Dec 8, 2023 at 7:45 PM LIU Zhiwei wrote: > > According to the specification, the th.dcache.cvall1 can be executed > under all priviledges. > The specification about xtheadcmo located in, > https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadcmo/dcache_cval1.adoc > >

Re: [PATCH 2/3] ui/gtk: unblock pipeline only if fence hasn't been signaled yet

2023-12-15 Thread Marc-André Lureau
Hi On Thu, Dec 14, 2023 at 8:26 AM Dongwon Kim wrote: > > It is needed to unblock the pipeline only if there is an active dmabuf > to be rendered and the fence for it is not yet signaled. > > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > ui/gtk.c | 14

  1   2   >