Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-06 Thread Jason Wang
On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > When the guest calls virtio_stop and then virtio_reset, Guests could not call those functions directly, it is triggered by for example writing to some of the registers like reset or others. > the vector will change > to VIRTIO_NO_VECTOR and

Re: [PATCH] vdpa-dev: Fix the issue of device status not updating when configuration interruption is triggered

2024-04-06 Thread Jason Wang
On Sun, Apr 7, 2024 at 11:22 AM lyx634449800 wrote: > > The set_config callback function vhost_vdpa_device_get_config in > vdpa-dev does not fetch the current device status from the hardware > device, causing the GUEST OS to not receive the latest device status nit: no need for upper case here.

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-06 Thread Jason Wang
On Tue, Apr 2, 2024 at 11:03 AM Chen, Jiqian wrote: > > On 2024/3/29 18:44, Michael S. Tsirkin wrote: > > On Fri, Mar 29, 2024 at 03:20:59PM +0800, Jason Wang wrote: > >> On Fri, Mar 29, 2024 at 3:07 PM Chen, Jiqian wrote: > >>> > >>> On 2024/3/28 20:36, Michael S. Tsirkin wrote: > >>> +} >

[PATCH v2] mem/cxl_type3: support 3, 6, 12 and 16 interleave ways

2024-04-06 Thread Yao Xingtao via
Since the kernel does not check the interleave capability, a 3-way, 6-way, 12-way or 16-way region can be create normally. Applications can access the memory of 16-way region normally because qemu can convert hpa to dpa correctly for the power of 2 interleave ways, after kernel implementing the

Re: [PATCH v12 10/23] hw/arm/virt: Wire NMI and VINMI irq lines from GIC to CPU

2024-04-06 Thread Jinjie Ruan via
On 2024/4/4 22:47, Peter Maydell wrote: > On Wed, 3 Apr 2024 at 11:18, Jinjie Ruan wrote: >> >> Wire the new NMI and VINMI interrupt line from the GIC to each CPU. >> >> Signed-off-by: Jinjie Ruan >> Reviewed-by: Richard Henderson >> --- >> v9: >> - Rename ARM_CPU_VNMI to ARM_CPU_VINMI. >> -

[PATCH v4] hw/virtio: Fix packed virtqueue flush used_idx

2024-04-06 Thread Wafer
If a virtio-net device has the VIRTIO_NET_F_MRG_RXBUF feature but not the VIRTIO_RING_F_INDIRECT_DESC feature, 'VirtIONetQueue->rx_vq' will use the merge feature to store data in multiple 'elems'. The 'num_buffers' in the virtio header indicates how many elements are merged. If the value of

Re: [PATCH v2] migration/postcopy: ensure preempt channel is ready before loading states

2024-04-06 Thread Wang, Lei
On 4/6/2024 5:53, Peter Xu wrote:> On Fri, Apr 05, 2024 at 11:40:56AM +0800, Wei Wang wrote: >> Before loading the guest states, ensure that the preempt channel has been >> ready to use, as some of the states (e.g. via virtio_load) might trigger >> page faults that will be handled through the

RE: [PATCH] mem/cxl_type3: fix hpa to dpa logic

2024-04-06 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: Jonathan Cameron > Sent: Saturday, April 6, 2024 12:46 AM > To: Jonathan Cameron via > Cc: Jonathan Cameron ; Yao, Xingtao/姚 幸涛 > ; fan...@samsung.com; Cao, Quanquan/曹 全全 > > Subject: Re: [PATCH] mem/cxl_type3: fix hpa to dpa logic > > On Mon, 1 Apr 2024

RE: [PATCH v2] migration/postcopy: ensure preempt channel is ready before loading states

2024-04-06 Thread Wang, Wei W
On Saturday, April 6, 2024 5:53 AM, Peter Xu wrote: > On Fri, Apr 05, 2024 at 11:40:56AM +0800, Wei Wang wrote: > > Before loading the guest states, ensure that the preempt channel has > > been ready to use, as some of the states (e.g. via virtio_load) might > > trigger page faults that will be

Re: [PATCH] meson: Make DEBUG_REMAP a meson option

2024-04-06 Thread Richard Henderson
On 3/11/24 14:23, Ilya Leoshkevich wrote: Currently DEBUG_REMAP is a macro that needs to be manually #defined to be activated, which makes it hard to have separate build directories dedicated to testing the code with it. Promote it to a meson option. Signed-off-by: Ilya Leoshkevich ---

[PATCH 4/9] target/hppa: Use insn_start from DisasContextBase

2024-04-06 Thread Richard Henderson
To keep the multiple update check, replace insn_start with insn_start_updated. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index

[PATCH 3/9] target/arm: Use insn_start from DisasContextBase

2024-04-06 Thread Richard Henderson
To keep the multiple update check, replace insn_start with insn_start_updated. Signed-off-by: Richard Henderson --- target/arm/tcg/translate.h | 12 ++-- target/arm/tcg/translate-a64.c | 2 +- target/arm/tcg/translate.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)

[PATCH 1/9] tcg: Add TCGContext.emit_before_op

2024-04-06 Thread Richard Henderson
Allow operations to be emitted via normal expanders into the middle of the opcode stream. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 6 ++ tcg/tcg.c | 14 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git

[PATCH 5/9] target/i386: Preserve DisasContextBase.insn_start across rewind

2024-04-06 Thread Richard Henderson
When aborting translation of the current insn, restore the previous value of insn_start. Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 07f642dc9e..76a42c679c

[PATCH 8/9] target/s390x: Use insn_start from DisasContextBase

2024-04-06 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 57b7db1ee9..90a74ee795 100644 --- a/target/s390x/tcg/translate.c +++

[PATCH 7/9] target/riscv: Use insn_start from DisasContextBase

2024-04-06 Thread Richard Henderson
To keep the multiple update check, replace insn_start with insn_start_updated. Signed-off-by: Richard Henderson --- target/riscv/translate.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index

[PATCH 6/9] target/microblaze: Use insn_start from DisasContextBase

2024-04-06 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4e52ef32db..fc451befae 100644 --- a/target/microblaze/translate.c +++

[PATCH 9/9] accel/tcg: Improve can_do_io management

2024-04-06 Thread Richard Henderson
We already attempted to set and clear can_do_io before the first and last insns, but only used the initial value of max_insns and the call to translator_io_start to find those insns. Now that we track insn_start in DisasContextBase, and now that we have emit_before_op, we can wait until we have

[PATCH 2/9] accel/tcg: Add insn_start to DisasContextBase

2024-04-06 Thread Richard Henderson
This is currently target-specific for many; begin making it target independent. Signed-off-by: Richard Henderson --- include/exec/translator.h | 3 +++ accel/tcg/translator.c| 2 ++ 2 files changed, 5 insertions(+) diff --git a/include/exec/translator.h b/include/exec/translator.h index

[PATCH for-9.0? 0/9] accel/tcg: Fix can_do_io vs 2nd page mmio

2024-04-06 Thread Richard Henderson
Bug report is https://lore.kernel.org/qemu-devel/33748bb7-e617-4661-bde3-5d29780fc...@wdc.com Jørgen properly identified the problem, though calling set_can_do_io in the middle of translator_access is incorrect. It forced me to do something that's been in the back of my mind for a while and

Looking for developers who know how to use Seccomp for a paid study

2024-04-06 Thread Maysara Alhindi
Hello As QEMU uses Seccomp to implement its sandbox, I thought that I might be able to find participants for a study I am running on the usability of Seccomp. I hope that it is okay to post this in the mailing list. I am looking for C developers who have experience with Seccomp for a 1.5-hour

Re: [PATCH] linux-user: replace calloc() with g_new0()

2024-04-06 Thread Richard Henderson
On 3/17/24 07:17, Nguyen Dinh Phi wrote: Use glib allocation as recommended by the coding convention Signed-off-by: Nguyen Dinh Phi --- linux-user/main.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index

Re: [PATCH v2] pc-bios/optionrom: Fix pvh.img ld build failure on fedora rawhide

2024-04-06 Thread Cole Robinson
It doesn't appear this patch is neccessary to build on fedora rawhide anymore, qemu 9.0.0-rc2 is building fine there Thanks, Cole On 2/1/24 2:36 PM, Cole Robinson wrote: > binutils 2.39 shows some warnings when building pvh.img > > /usr/bin/ld: warning: pvh.o: missing .note.GNU-stack section

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-06 Thread Durrant, Paul
On 04/04/2024 15:08, Ross Lagerwall wrote: A malicious or buggy guest may generated buffered ioreqs faster than QEMU can process them in handle_buffered_iopage(). The result is a livelock - QEMU continuously processes ioreqs on the main thread without iterating through the main loop which

Re: [RFC PATCH-for-9.1 09/29] hw/i386/pc: Pass PCMachineState argument to acpi_setup()

2024-04-06 Thread Bernhard Beschow
Am 28. März 2024 15:54:17 UTC schrieb "Philippe Mathieu-Daudé" : >acpi_setup() caller knows about the machine state, so pass >it as argument to avoid a qdev_get_machine() call. > >We already resolved X86_MACHINE(pcms) as 'x86ms' so use the >latter. > >Signed-off-by: Philippe Mathieu-Daudé

Re: [RFC PATCH-for-9.1 13/29] hw/i386/pc: Remove non-PCI code from pc_system_firmware_init()

2024-04-06 Thread Bernhard Beschow
Am 28. März 2024 15:54:21 UTC schrieb "Philippe Mathieu-Daudé" : >x86_bios_rom_init() is the single non-PCI-machine call >from pc_system_firmware_init(). Extract it to the caller. > >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/i386/pc.c | 6 +- > hw/i386/pc_sysfw.c | 5 + > 2