Re: [PATCH v3] intel-iommu: Document iova_tree

2022-12-22 Thread Jason Wang
On Wed, Dec 7, 2022 at 6:13 AM Peter Xu wrote: > > It seems not super clear on when iova_tree is used, and why. Add a rich > comment above iova_tree to track why we needed the iova_tree, and when we > need it. > > Also comment for the map/unmap messages, on how they're used and > implications

Re: [PATCH v2 0/3] Add OCP extended log to nvme QEMU

2022-12-22 Thread Christoph Hellwig
Please don't do this. OCP is acting as a counter standard to the proper NVMe standard here and should in absolutely no way be supported by open source projects that needs to stick to the actual standards. Please work with the NVMe technical working group to add this (very useful) functionality

Re: [PATCH 1/6] hw/arm/aspeed: Fix smpboot[] on big-endian hosts

2022-12-22 Thread Cédric Le Goater
On 12/22/22 22:55, Philippe Mathieu-Daudé wrote: ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. This is fine on little-endian host, but on big-endian ones the smpboot[] array ends swapped. Use the const_le32() macro so the instructions

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Bin Meng
Hi Anup, On Fri, Dec 23, 2022 at 12:56 AM Anup Patel wrote: > > On Thu, Dec 22, 2022 at 6:27 PM Bin Meng wrote: > > > > On Thu, Dec 22, 2022 at 6:47 PM Daniel Henrique Barboza > > wrote: > > > > > > > > > > > > On 12/22/22 07:24, Bin Meng wrote: > > > > On Thu, Dec 22, 2022 at 2:29 AM Daniel

Re: [PATCH v21 00/10] vhost-vdpa: add support for configure interrupt

2022-12-22 Thread Jason Wang
在 2022/12/22 15:04, Cindy Lu 写道: These patches introduced the support for configure interrupt These codes are tested on x86_64 and aarch64 platforms. the test scenario is based on vp-vdpa/vdpa_sim_net /vhost/vhost_user/testpmd, with/without irqfd. Tested in virtio-pci bus and virtio-mmio

Re: [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes

2022-12-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, Dec 22, 2022 at 11:48:25AM +0100, Markus Armbruster wrote: >> Bernhard Beschow writes: >> >> > Am 22. Dezember 2022 10:03:23 UTC schrieb Markus Armbruster >> > : >> >>Back in 2016, we discussed[1] rules for headers, and these were >> >>generally liked:

Re: [PULL 0/6] testing updates

2022-12-22 Thread Mukilan Thiyagarajan
Thank you, Alex! Here is the patch to fix the issue. I've also removed the comment which is no longer applicable. Regards, Mukilan --- .gitlab-ci.d/container-cross.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml

Re: [PATCH 5/6] hw/arm/xilinx_zynq: Remove tswap32() calls and constify smpboot[]

2022-12-22 Thread Edgar E. Iglesias
On Thu, Dec 22, 2022 at 10:55:48PM +0100, Philippe Mathieu-Daudé wrote: > ARM CPUs fetch instructions in little-endian. > > smpboot[] encoded instructions are written in little-endian. > > We call tswap32() on the array. tswap32 function swap a 32-bit > value if the target endianness doesn't

Re: [PATCH v2 1/4] include/hw/virtio: Break inclusion loop

2022-12-22 Thread Edgar E. Iglesias
On Fri, Dec 23, 2022 at 10:58:06AM +0800, Jason Wang wrote: > On Thu, Dec 22, 2022 at 8:08 PM Markus Armbruster wrote: > > > > hw/virtio/virtio.h and hw/virtio/vhost.h include each other. The > > former doesn't actually need the latter, so drop that inclusion to > > break the loop. > > > >

Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV

2022-12-22 Thread Jason Wang
On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman wrote: > > A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter > with SR-IOV support. > > Start qemu with the following parameters. >qemu-system-x86_64 -enable-kvm -M q35 \ >... >-device

Re: [PATCH 06/15] hw/riscv/spike.c: load initrd right after riscv_load_kernel()

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:28 AM Daniel Henrique Barboza wrote: > > This will make the code more in line with what the other boards are > doing. We'll also avoid an extra check to machine->kernel_filename since > we already checked that before executing riscv_load_kernel(). > > Signed-off-by:

Re: [PATCH 05/15] hw/riscv/boot.c: introduce riscv_default_firmware_name()

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:28 AM Daniel Henrique Barboza wrote: > > Some boards are duplicating the 'riscv_find_and_load_firmware' call > because the 32 and 64 bits images have different names. Create > a function to handle this detail instead of hardcoding it in the boards. > > Ideally we would

Re: [PATCH 04/15] hw/riscv/boot.c: make riscv_find_firmware() static

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:26 AM Daniel Henrique Barboza wrote: > > The only caller is riscv_find_and_load_firmware(), which is in the same > file. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/boot.c | 44

Re: [PATCH 03/15] hw/riscv/sifive_u: use 'fdt' from MachineState

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:29 AM Daniel Henrique Barboza wrote: > > The MachineState object provides a 'fdt' pointer that is already being > used by other RISC-V machines, and it's also used by the 'dumpdtb' QMP > command. > > Remove the 'fdt' pointer from SiFiveUState and use MachineState::fdt >

Re: [PATCH 02/15] hw/riscv/spike: use 'fdt' from MachineState

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:30 AM Daniel Henrique Barboza wrote: > > The MachineState object provides a 'fdt' pointer that is already being > used by other RISC-V machines, and it's also used by the 'dumpdtb' QMP > command. > > Remove the 'fdt' pointer from SpikeState and use MachineState::fdt >

Re: [PATCH v2 1/4] include/hw/virtio: Break inclusion loop

2022-12-22 Thread Jason Wang
On Thu, Dec 22, 2022 at 8:08 PM Markus Armbruster wrote: > > hw/virtio/virtio.h and hw/virtio/vhost.h include each other. The > former doesn't actually need the latter, so drop that inclusion to > break the loop. > > Signed-off-by: Markus Armbruster > Reviewed-by: Philippe Mathieu-Daudé >

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Alistair Francis
On Thu, Dec 22, 2022 at 4:29 AM Daniel Henrique Barboza wrote: > > This test is used to do a quick sanity check to ensure that we're able > to run the existing QEMU FW image. > > 'sifive_u', 'spike' and 'virt' riscv64 machines, and 'sifive_u' and > 'virt' 32 bit machines are able to run the

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2022-12-22 Thread Huang, Kai
On Thu, 2022-12-22 at 18:15 +, Sean Christopherson wrote: > On Wed, Dec 21, 2022, Chao Peng wrote: > > On Tue, Dec 20, 2022 at 08:33:05AM +, Huang, Kai wrote: > > > On Tue, 2022-12-20 at 15:22 +0800, Chao Peng wrote: > > > > On Mon, Dec 19, 2022 at 08:48:10AM +, Huang, Kai wrote: > > >

Re: [PATCH 0/6] hw/arm: Fix smpboot[] on big-endian hosts and remove tswap32()

2022-12-22 Thread Philippe Mathieu-Daudé
On 22/12/22 22:55, Philippe Mathieu-Daudé wrote: ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is

[PATCH 4/6] hw/arm/npcm7xx: Remove tswap32() calls and constify smpboot[]

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is a NOP. * On a little-endian host, the array is

[PATCH 6/6] hw/arm/boot: Remove tswap32() calls and constify board_setup_blob[]

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. board_setup_blob[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is a NOP. * On a little-endian host, the

[PATCH 5/6] hw/arm/xilinx_zynq: Remove tswap32() calls and constify smpboot[]

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is a NOP. * On a little-endian host, the array is

[PATCH 0/6] hw/arm: Fix smpboot[] on big-endian hosts and remove tswap32()

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is a NOP. * On a little-endian host, the array is

[PATCH 1/6] hw/arm/aspeed: Fix smpboot[] on big-endian hosts

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. This is fine on little-endian host, but on big-endian ones the smpboot[] array ends swapped. Use the const_le32() macro so the instructions are always in little-endian in the smpboot[]

[PATCH 2/6] hw/arm/raspi: Fix smpboot[] on big-endian hosts

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. This is fine on little-endian host, but on big-endian ones the smpboot[] array ends swapped. Use the const_le32() macro so the instructions are always in little-endian in the smpboot[]

[PATCH 3/6] hw/arm/exynos4210: Remove tswap32() calls and constify smpboot[]

2022-12-22 Thread Philippe Mathieu-Daudé
ARM CPUs fetch instructions in little-endian. smpboot[] encoded instructions are written in little-endian. We call tswap32() on the array. tswap32 function swap a 32-bit value if the target endianness doesn't match the host one. Otherwise it is a NOP. * On a little-endian host, the array is

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Daniel Henrique Barboza
On 12/22/22 13:56, Anup Patel wrote: On Thu, Dec 22, 2022 at 6:27 PM Bin Meng wrote: On Thu, Dec 22, 2022 at 6:47 PM Daniel Henrique Barboza wrote: On 12/22/22 07:24, Bin Meng wrote: On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza wrote: This test is used to do a quick sanity

[PATCH v4 04/12] libvhost-user: Use unsigned int i for some for-loop iterations

2022-12-22 Thread Marcel Holtmann
The sign-compare warning also hits some of the for-loops, but it easy fixed by just making the iterator variable unsigned int. CC libvhost-user.o libvhost-user.c: In function ‘vu_gpa_to_va’: libvhost-user.c:223:19: error: comparison of integer expressions of different signedness: ‘int’

[PATCH v4 07/12] libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-22 Thread Marcel Holtmann
When the libvduse sources are used by another project, it can not be guaranteed that _GNU_SOURCE is set by the build system. If it is for example not set, errors like this show up. CC libvduse.o libvduse.c: In function ‘vduse_log_get’: libvduse.c:172:9: error: implicit declaration of

[PATCH v4 05/12] libvhost-user: Declare uffdio_register early to make it C90 compliant

2022-12-22 Thread Marcel Holtmann
When using libvhost-user source in an external project that wants to comply with the C90 standard, it is best to declare variables before code. CC libvhost-user.o libvhost-user.c: In function ‘generate_faults’: libvhost-user.c:683:9: error: ISO C90 forbids mixed declarations and code

[PATCH v4 00/12] Compiler warning fixes for libvhost-user,libvduse

2022-12-22 Thread Marcel Holtmann
The libvhost-user and libvduse libraries are also useful for external usage outside of QEMU and thus it would be nice if their files could be just copied and used. However due to different compiler settings, a lot of manual fixups are needed. This is the first attempt at some obvious fixes that

[PATCH v4 03/12] libvhost-user: Cast rc variable to avoid compiler warning

2022-12-22 Thread Marcel Holtmann
The assert from recvmsg() return value against an uint32_t size field from a protocol struct throws a compiler warning. CC libvhost-user.o In file included from libvhost-user.c:27: libvhost-user.c: In function ‘vu_message_read_default’: libvhost-user.c:363:19: error: comparison of integer

[PATCH v4 02/12] libvhost-user: Replace typeof with __typeof__

2022-12-22 Thread Marcel Holtmann
Strictly speaking only -std=gnu99 support the usage of typeof and for easier inclusion in external projects, it is better to use __typeof__. CC libvhost-user.o libvhost-user.c: In function ‘vu_log_queue_fill’: libvhost-user.c:86:13: error: implicit declaration of function ‘typeof’

[PATCH v4 09/12] libvduse: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
Since the assignment is causing a compiler warning, fix it by using memcpy instead. CC libvduse.o libvduse.c: In function ‘vring_set_avail_event’: libvduse.c:603:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasin] 603 | *((uint16_t

[PATCH v4 08/12] libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

2022-12-22 Thread Marcel Holtmann
It seems there is no need to keep the inuse field signed and end up with compiler warnings for sign-compare. CC libvduse.o libvduse.c: In function ‘vduse_queue_pop’: libvduse.c:789:19: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’

[PATCH v4 12/12] libvduse: Add extra compiler warnings

2022-12-22 Thread Marcel Holtmann
In case libvhost-user is used externally, that projects compiler warnings might be more strict. Enforce an extra set of compiler warnings to catch issues early on. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvduse/meson.build | 8 +++- 1 file changed, 7

Re: [PATCH v3 10/10] libvduse: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
Hi Paolo, >> static inline void vring_set_avail_event(VduseVirtq *vq, uint16_t val) >> { >> -*((uint16_t *)>vring.used->ring[vq->vring.num]) = htole16(val); >> +uint16_t *avail; >> + >> +avail = (uint16_t *)>vring.used->ring[vq->vring.num]; >> +*avail = htole16(val); > > That

[PATCH v4 11/12] libvhost-user: Add extra compiler warnings

2022-12-22 Thread Marcel Holtmann
In case libvhost-user is used externally, that projects compiler warnings might be more strict. Enforce an extra set of compiler warnings to catch issues early on. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvhost-user/meson.build | 8 +++- 1 file changed,

[PATCH v4 10/12] libvhost-user: Fix assignment in vring_set_avail_event

2022-12-22 Thread Marcel Holtmann
Since it was proposed to change the code in libvduse.c to use memcpy instead of an assignment, the code in libvhost-user.c should also be changed to use memcpy. Signed-off-by: Marcel Holtmann Suggested-by: Paolo Bonzini --- subprojects/libvhost-user/libvhost-user.c | 5 ++--- 1 file changed, 2

Re: [PATCH v3 02/10] libvhost-user: Replace typeof with __typeof__

2022-12-22 Thread Marcel Holtmann
Hi Paolo, >> Strictly speaking only -std=gnu99 support the usage of typeof and for >> easier inclusion in external projects, it is better to use __typeof__. >> CC libvhost-user.o >> libvhost-user.c: In function ‘vu_log_queue_fill’: >> libvhost-user.c:86:13: error: implicit declaration of

[PATCH v4 01/12] libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

2022-12-22 Thread Marcel Holtmann
Then the libvhost-user sources are used by another project, it can not be guaranteed that _GNU_SOURCE is set by the build system. If it is for example not set, errors like this show up. CC libvhost-user.o libvhost-user.c: In function ‘vu_panic’: libvhost-user.c:195:9: error: implicit

[PATCH v4 06/12] libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

2022-12-22 Thread Marcel Holtmann
The assignment of dev->postcopy_ufd can be moved into an else clause and then the code becomes C90 compliant. CC libvhost-user.o libvhost-user.c: In function ‘vu_set_postcopy_advise’: libvhost-user.c:1625:5: error: ISO C90 forbids mixed declarations and code

Re: [PULL 0/6] testing updates

2022-12-22 Thread Alex Bennée
"Mukilan Thiyagarajan (QUIC)" writes: > I believe the error is caused by the QEMU_JOB_ONLY_FORKS: 1 line > which needs to be removed from the definition of hexagon-cross-container. > > Alex, Peter, > > Shall I raise a patch to remove this line? Should the patch be > created against the

Re: [PULL 0/6] testing updates

2022-12-22 Thread Alex Bennée
Peter Maydell writes: > On Wed, 21 Dec 2022 at 14:40, Alex Bennée wrote: >> >> The following changes since commit 8540a1f69578afb3b37866b1ce5bec46a9f6efbc: >> >> Merge tag 'hppa-fixes-pull-request' of >> https://github.com/hdeller/qemu-hppa into staging (2022-12-20 >> 15:32:27 +) >> >>

Re: [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes

2022-12-22 Thread Michael S. Tsirkin
On Thu, Dec 22, 2022 at 11:48:25AM +0100, Markus Armbruster wrote: > Bernhard Beschow writes: > > > Am 22. Dezember 2022 10:03:23 UTC schrieb Markus Armbruster > > : > >>Back in 2016, we discussed[1] rules for headers, and these were > >>generally liked: > >> > >>1. Have a carefully curated

[PATCH] linux-user: Add strace for prlimit64() syscall

2022-12-22 Thread Helge Deller
Add proper prlimit64() strace output. Signed-off-by: Helge Deller --- linux-user/strace.c| 89 ++ linux-user/strace.list | 3 +- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2022-12-22 Thread Sean Christopherson
On Wed, Dec 21, 2022, Chao Peng wrote: > On Tue, Dec 20, 2022 at 08:33:05AM +, Huang, Kai wrote: > > On Tue, 2022-12-20 at 15:22 +0800, Chao Peng wrote: > > > On Mon, Dec 19, 2022 at 08:48:10AM +, Huang, Kai wrote: > > > > On Mon, 2022-12-19 at 15:53 +0800, Chao Peng wrote: > > But for

Re: [PATCH] nubus-device: fix memory leak in nubus_device_realize

2022-12-22 Thread Laurent Vivier
Le 22/12/2022 à 18:29, Mauro Matteo Cascella a écrit : Local variable "name" is allocated through strdup_printf and should be freed with g_free() to avoid memory leak. Fixes: 3616f424 ("nubus-device: add romfile property for loading declaration ROMs") Signed-off-by: Mauro Matteo Cascella ---

[PATCH] nubus-device: fix memory leak in nubus_device_realize

2022-12-22 Thread Mauro Matteo Cascella
Local variable "name" is allocated through strdup_printf and should be freed with g_free() to avoid memory leak. Fixes: 3616f424 ("nubus-device: add romfile property for loading declaration ROMs") Signed-off-by: Mauro Matteo Cascella --- hw/nubus/nubus-device.c | 1 + 1 file changed, 1

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Anup Patel
On Thu, Dec 22, 2022 at 6:27 PM Bin Meng wrote: > > On Thu, Dec 22, 2022 at 6:47 PM Daniel Henrique Barboza > wrote: > > > > > > > > On 12/22/22 07:24, Bin Meng wrote: > > > On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza > > > wrote: > > >> This test is used to do a quick sanity check

Re: [PATCH 02/15] hw/riscv/spike: use 'fdt' from MachineState

2022-12-22 Thread Daniel Henrique Barboza
On 12/22/22 11:25, Philippe Mathieu-Daudé wrote: On 21/12/22 19:22, Daniel Henrique Barboza wrote: The MachineState object provides a 'fdt' pointer that is already being used by other RISC-V machines, and it's also used by the 'dumpdtb' QMP command. Remove the 'fdt' pointer from SpikeState

[PATCH v1 1/2] Linux header update

2022-12-22 Thread Claudio Imbrenda
Signed-off-by: Claudio Imbrenda --- linux-headers/linux/kvm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ebdafa576d..122b273433 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1175,6 +1175,7 @@

[PATCH v1 0/2] s390x/pv: Add support for asynchronous teardown for reboot

2022-12-22 Thread Claudio Imbrenda
The first patch is just a minimal header update to compile the second patch; it can be safely discarded once the Linux headers are updated to 6.2. The second patch adds support for asynchronous teardown of protected guests when rebooting. First the existing guest is prepared for asynchronous

[PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot

2022-12-22 Thread Claudio Imbrenda
This patch adds support for the asynchronous teardown for reboot for protected VMs. When attempting to tear down a protected VM, try to use the new asynchronous interface first. If that fails, fall back to the classic synchronous one. The asynchronous interface involves invoking the new

Re: [PATCH v9 08/14] hw/nvram: NPCM7xx OTP device model

2022-12-22 Thread Philippe Mathieu-Daudé
Hi, (old patch) On 11/9/20 07:20, Havard Skinnemoen wrote: This supports reading and writing OTP fuses and keys. Only fuse reading has been tested. Protection is not implemented. Reviewed-by: Avi Fishman Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Tested-by:

[PATCH 0/5] hw/net/igb: emulated network device with SR-IOV

2022-12-22 Thread Sriram Yagnaraman
A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter with SR-IOV support. Start qemu with the following parameters. qemu-system-x86_64 -enable-kvm -M q35 \ ... -device pcie-root-port,slot=3,id=pcie_port.3 \ -netdev

[PATCH 2/5] hw/net/net_tx_pkt: helper function to get l2 hdr

2022-12-22 Thread Sriram Yagnaraman
Also add return value for to send functions Signed-off-by: Sriram Yagnaraman --- hw/net/net_tx_pkt.c | 17 +++-- hw/net/net_tx_pkt.h | 8 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_pkt.c index 1cb1125d9f..f2e14008b6

[PATCH 3/5] hw/net/igb: register definitions

2022-12-22 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/net/e1000_regs.h| 363 + hw/net/e1000x_common.c | 13 ++ hw/net/e1000x_common.h | 29 3 files changed, 376 insertions(+), 29 deletions(-) diff --git a/hw/net/e1000_regs.h b/hw/net/e1000_regs.h index

[PATCH 1/5] pcie: add helper function to get number of VFs

2022-12-22 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/pci/pcie_sriov.c | 6 ++ include/hw/pci/pcie_sriov.h | 5 + 2 files changed, 11 insertions(+) diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index 8e3faf1f59..88ba642a20 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_sriov.c @@

[PATCH 5/5] hw/net/igb: build support for igb/igbvf devices

2022-12-22 Thread Sriram Yagnaraman
Signed-off-by: Sriram Yagnaraman --- hw/i386/Kconfig| 1 + hw/net/Kconfig | 5 + hw/net/igb_core.c | 4 +--- hw/net/meson.build | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index d22ac4a4b9..97a0b08842 100644 ---

Re: [PATCH 12/15] hw/riscv/boot.c: make riscv_load_initrd() static

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: The only remaining caller is riscv_load_kernel() which belongs to the same file. Signed-off-by: Daniel Henrique Barboza --- hw/riscv/boot.c | 76 - include/hw/riscv/boot.h | 1 - 2 files

Re: [PATCH 10/15] hw/riscv/boot.c: use MachineState in riscv_load_kernel()

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: All callers are using kernel_filename as machine->kernel_filename. This will also simplify the changes in riscv_load_kernel() that we're going to do next. Cc: Palmer Dabbelt Signed-off-by: Daniel Henrique Barboza --- hw/riscv/boot.c

Re: [PATCH 09/15] hw/riscv/boot.c: use MachineState in riscv_load_initrd()

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: 'filename', 'mem_size' and 'fdt' from riscv_load_initrd() can all be retrieved by the MachineState object for all callers. Cc: Palmer Dabbelt Signed-off-by: Daniel Henrique Barboza --- hw/riscv/boot.c| 6 --

Re: [PATCH 06/15] hw/riscv/spike.c: load initrd right after riscv_load_kernel()

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: This will make the code more in line with what the other boards are doing. We'll also avoid an extra check to machine->kernel_filename since we already checked that before executing riscv_load_kernel(). Signed-off-by: Daniel Henrique Barboza

Re: [PATCH 04/15] hw/riscv/boot.c: make riscv_find_firmware() static

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: The only caller is riscv_find_and_load_firmware(), which is in the same file. Signed-off-by: Daniel Henrique Barboza --- hw/riscv/boot.c | 44 - include/hw/riscv/boot.h | 1 - 2 files

Re: [PATCH 02/15] hw/riscv/spike: use 'fdt' from MachineState

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: The MachineState object provides a 'fdt' pointer that is already being used by other RISC-V machines, and it's also used by the 'dumpdtb' QMP command. Remove the 'fdt' pointer from SpikeState and use MachineState::fdt instead. Signed-off-by:

Re: [PATCH 03/15] hw/riscv/sifive_u: use 'fdt' from MachineState

2022-12-22 Thread Philippe Mathieu-Daudé
On 21/12/22 19:22, Daniel Henrique Barboza wrote: The MachineState object provides a 'fdt' pointer that is already being used by other RISC-V machines, and it's also used by the 'dumpdtb' QMP command. Remove the 'fdt' pointer from SiFiveUState and use MachineState::fdt instead. Cc: Palmer

[PATCH v3] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Eric Auger
To avoid compilation errors when -Werror=maybe-uninitialized is used, add a default case with g_assert_not_reached(). Otherwise with GCC 11.3.1 "cc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)" we get: ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: ../target/i386/ops_sse.h:2495:13:

Re: [PATCH] usbredir: Do not detach usb if backend chardev disconnect

2022-12-22 Thread Minglei Liu
ping ! please review this patch : [PATCH] usbredir: Do not detach usb if backend chardev disconnect - minglei.liu (kernel.org) minglei.liu 于2022年11月9日周三 19:56写道: > If the network between qemu and usbredirserver

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Bin Meng
On Thu, Dec 22, 2022 at 6:47 PM Daniel Henrique Barboza wrote: > > > > On 12/22/22 07:24, Bin Meng wrote: > > On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza > > wrote: > >> This test is used to do a quick sanity check to ensure that we're able > >> to run the existing QEMU FW image. >

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Philippe Mathieu-Daudé
On 22/12/22 13:32, Stefan Weil wrote: Am 22.12.22 um 12:51 schrieb Philippe Mathieu-Daudé: On 22/12/22 12:18, Eric Auger wrote: Hi All, On 12/22/22 12:09, Daniel P. Berrangé wrote: On Thu, Dec 22, 2022 at 11:07:31AM +0100, Eric Auger wrote: Hi Philippe, On 12/22/22 10:01, Philippe

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Stefan Weil via
Am 22.12.22 um 12:51 schrieb Philippe Mathieu-Daudé: On 22/12/22 12:18, Eric Auger wrote: Hi All, On 12/22/22 12:09, Daniel P. Berrangé wrote: On Thu, Dec 22, 2022 at 11:07:31AM +0100, Eric Auger wrote: Hi Philippe, On 12/22/22 10:01, Philippe Mathieu-Daudé wrote: On 22/12/22 09:18, Paolo

[PATCH v2 1/4] include/hw/virtio: Break inclusion loop

2022-12-22 Thread Markus Armbruster
hw/virtio/virtio.h and hw/virtio/vhost.h include each other. The former doesn't actually need the latter, so drop that inclusion to break the loop. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Stefano Garzarella ---

[PATCH v2 0/4] Clean up includes

2022-12-22 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are

[PATCH v2 2/4] include: Include headers where needed

2022-12-22 Thread Markus Armbruster
A number of headers neglect to include everything they need. They compile only if the headers they need are already included from elsewhere. Fix that. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis --- include/exec/plugin-gen.h | 1 + include/hw/acpi/erst.h

[PATCH v2 4/4] docs/devel: Rules on #include in headers

2022-12-22 Thread Markus Armbruster
Rules for headers were proposed a long time ago, and generally liked: Message-ID: <87h9g8j57d@blackfin.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html Wortk them into docs/devel/style.rst. Suggested-by: Bernhard Beschow Signed-off-by: Markus

Re: [PATCH v2 0/4] Clean up includes

2022-12-22 Thread Markus Armbruster
Michael, I forgot to add your R-bys. I'll fix that in the next revision if I need one, else in the pull request.

[PATCH v2 3/4] include: Don't include qemu/osdep.h

2022-12-22 Thread Markus Armbruster
docs/devel/style.rst mandates: The "qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like . It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Philippe Mathieu-Daudé
On 22/12/22 12:18, Eric Auger wrote: Hi All, On 12/22/22 12:09, Daniel P. Berrangé wrote: On Thu, Dec 22, 2022 at 11:07:31AM +0100, Eric Auger wrote: Hi Philippe, On 12/22/22 10:01, Philippe Mathieu-Daudé wrote: On 22/12/22 09:18, Paolo Bonzini wrote: On 12/21/22 17:36, Eric Auger wrote:

RE: [PULL 0/6] testing updates

2022-12-22 Thread Mukilan Thiyagarajan (QUIC)
I believe the error is caused by the QEMU_JOB_ONLY_FORKS: 1 line which needs to be removed from the definition of hexagon-cross-container. Alex, Peter, Shall I raise a patch to remove this line? Should the patch be created against the testing/next branch? Thanks, Mukilan -Original

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Eric Auger
Hi All, On 12/22/22 12:09, Daniel P. Berrangé wrote: > On Thu, Dec 22, 2022 at 11:07:31AM +0100, Eric Auger wrote: >> Hi Philippe, >> >> On 12/22/22 10:01, Philippe Mathieu-Daudé wrote: >>> On 22/12/22 09:18, Paolo Bonzini wrote: On 12/21/22 17:36, Eric Auger wrote: > To avoid

Re: [PATCH v3 4/5] coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h

2022-12-22 Thread Paolo Bonzini
On 12/22/22 09:56, Markus Armbruster wrote: +/** + * Mark a function that executes in coroutine context + * + * + * Functions that execute in coroutine context cannot be called + * directly from normal functions. Use @coroutine_fn to mark such + * functions. For example: + * + * static void

Re: [PULL 0/6] testing updates

2022-12-22 Thread Peter Maydell
On Wed, 21 Dec 2022 at 14:40, Alex Bennée wrote: > > The following changes since commit 8540a1f69578afb3b37866b1ce5bec46a9f6efbc: > > Merge tag 'hppa-fixes-pull-request' of https://github.com/hdeller/qemu-hppa > into staging (2022-12-20 15:32:27 +) > > are available in the Git repository

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Daniel P . Berrangé
On Thu, Dec 22, 2022 at 11:07:31AM +0100, Eric Auger wrote: > Hi Philippe, > > On 12/22/22 10:01, Philippe Mathieu-Daudé wrote: > > On 22/12/22 09:18, Paolo Bonzini wrote: > >> On 12/21/22 17:36, Eric Auger wrote: > >>> To avoid compilation errors when -Werror=maybe-uninitialized is used, > >>>

Re: [PATCH] dockerfiles: update to Fedora 36

2022-12-22 Thread Daniel P . Berrangé
On Thu, Dec 22, 2022 at 09:27:56AM +0100, Paolo Bonzini wrote: > lcitool has removed the fedora-35 target, so let's follow > suit. > > Signed-off-by: Paolo Bonzini > --- > tests/docker/dockerfiles/fedora-win32-cross.docker | 4 ++-- > tests/docker/dockerfiles/fedora-win64-cross.docker | 4 ++--

[PATCH v2 3/4] include/hw/ppc: Don't include hw/pci-host/pnv_phb.h from pnv.h

2022-12-22 Thread Markus Armbruster
The next commit needs to include hw/ppc/pnv.h from hw/pci-host/pnv_phb.h. Avoid an inclusion loop. Signed-off-by: Markus Armbruster Reviewed-by: Cédric Le Goater Reviewed-by: Daniel Henrique Barboza --- include/hw/pci-host/pnv_phb4.h | 3 ++- include/hw/ppc/pnv.h | 3 ++-

[PATCH v3 2/6] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST()

2022-12-22 Thread David Hildenbrand
We'll make use of both next in the context of virtio-mem. Signed-off-by: David Hildenbrand --- include/migration/vmstate.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 79eb2409a2..73ad1ae0eb

[PATCH v3 6/6] virtio-mem: Proper support for preallocation with migration

2022-12-22 Thread David Hildenbrand
Ordinary memory preallocation runs when QEMU starts up and creates the memory backends, before processing the incoming migration stream. With virtio-mem, we don't know which memory blocks to preallocate before migration started. Now that we migrate the virtio-mem bitmap early, before migrating any

[PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2022-12-22 Thread David Hildenbrand
For virtio-mem, we want to have the plugged/unplugged state of memory blocks available before migrating any actual RAM content. This information is immutable on the migration source while migration is active, For example, we want to use this information for proper preallocation support with

[PATCH v3 3/6] migration: Factor out checks for advised and listening incomming postcopy

2022-12-22 Thread David Hildenbrand
Let's factor out both checks, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Signed-off-by: David Hildenbrand --- include/migration/misc.h | 6 +- migration/migration.c| 14 ++ migration/ram.c | 16 ++--

[PATCH v3 5/6] virtio-mem: Migrate bitmap, size and sanity checks early

2022-12-22 Thread David Hildenbrand
The bitmap and the size are immutable while migration is active: see virtio_mem_is_busy(). We can migrate this information early, before migrating any actual RAM content. Having this information in place early will, for example, allow for properly preallocating memory before touching these memory

[PATCH v3 0/6] virtio-mem: Handle preallocation with migration

2022-12-22 Thread David Hildenbrand
While playing with migration of virtio-mem with an ordinary file backing, I realized that migration and prealloc doesn't currently work as expected for virtio-mem. Further, Jing Qi reported that setup issues (insufficient huge pages on the destination) result in QEMU getting killed with SIGBUS

[PATCH v2 1/4] include/hw/ppc: Split pnv_chip.h off pnv.h

2022-12-22 Thread Markus Armbruster
PnvChipClass, PnvChip, Pnv8Chip, Pnv9Chip, and Pnv10Chip are defined in pnv.h. Many users of the header don't actually need them. One instance is this inclusion loop: hw/ppc/pnv_homer.h includes hw/ppc/pnv.h for typedef PnvChip, and vice versa for struct PnvHomer. Similar structs live in their

[PATCH v3 4/6] virtio-mem: Fail if a memory backend with "prealloc=on" is specified

2022-12-22 Thread David Hildenbrand
"prealloc=on" for the memory backend does not work as expected, as virtio-mem will simply discard all preallocated memory immediately again. In the best case, it's an expensive NOP. In the worst case, it's an unexpected allocation error. Instead, "prealloc=on" should be specified for the

[PATCH v2 4/4] include/hw/ppc include/hw/pci-host: Drop extra typedefs

2022-12-22 Thread Markus Armbruster
PnvChip is typedef'ed in five places, and PnvPhb4PecState in two. Keep one, drop the others. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.h | 2 +-

Re: [PATCH v2] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2022-12-22 Thread Bernhard Beschow
Am 22. Dezember 2022 09:01:34 UTC schrieb "Philippe Mathieu-Daudé" : >On 22/12/22 09:18, Paolo Bonzini wrote: >> On 12/21/22 17:36, Eric Auger wrote: >>> To avoid compilation errors when -Werror=maybe-uninitialized is used, >>> replace 'case 3' by 'default'. >>> >>> Otherwise we get: >>> >>>

Re: [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes

2022-12-22 Thread Markus Armbruster
Bernhard Beschow writes: > Am 22. Dezember 2022 10:03:23 UTC schrieb Markus Armbruster > : >>Back in 2016, we discussed[1] rules for headers, and these were >>generally liked: >> >>1. Have a carefully curated header that's included everywhere first. We >> got that already thanks to Peter:

[PATCH v2 0/4] hw/ppc: Clean up includes

2022-12-22 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are

[PATCH v2 2/4] include/hw/ppc: Supply a few missing includes

2022-12-22 Thread Markus Armbruster
A few headers neglect to include headers they need. They compile only if something else includes the required header(s) first. Fix that. Signed-off-by: Markus Armbruster Reviewed-by: Cédric Le Goater Reviewed-by: Daniel Henrique Barboza --- include/hw/ppc/pnv_lpc.h| 3 ++-

Re: [PATCH 01/15] tests/avocado: add RISC-V opensbi boot test

2022-12-22 Thread Daniel Henrique Barboza
On 12/22/22 07:24, Bin Meng wrote: On Thu, Dec 22, 2022 at 2:29 AM Daniel Henrique Barboza wrote: This test is used to do a quick sanity check to ensure that we're able to run the existing QEMU FW image. 'sifive_u', 'spike' and 'virt' riscv64 machines, and 'sifive_u' and 'virt' 32 bit

  1   2   >