Re: [PATCH 04/13] cxl/mailbox: make range overlap check more readable

2024-07-21 Thread Philippe Mathieu-Daudé
On 22/7/24 06:07, Yao Xingtao via wrote: use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/cxl/cxl-mailbox-utils.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathi

Re: [PATCH 02/13] arm/boot: make range overlap check more readable

2024-07-21 Thread Philippe Mathieu-Daudé
On 22/7/24 06:07, Yao Xingtao via wrote: use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/arm/boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c i

Re: [PATCH 01/13] range: Make ranges_overlap() return bool

2024-07-21 Thread Philippe Mathieu-Daudé
On 22/7/24 06:07, Yao Xingtao via wrote: Just like range_overlaps_range(), use the returned bool value to check whether 2 given ranges overlap. Signed-off-by: Yao Xingtao --- include/qemu/range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v3 3/7] acpi/ghes: Support GPIO error source.

2024-07-21 Thread Mauro Carvalho Chehab
From: Jonathan Cameron Add error notification to GHES v2 using the GPIO source. Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/acpi/ghes.c | 8 ++-- include/hw/acpi/ghes.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/acpi/gh

[PATCH v3 1/7] arm/virt: place power button pin number on a define

2024-07-21 Thread Mauro Carvalho Chehab
Having magic numbers inside the code is not a good idea, as it is error-prone. So, instead, create a macro with the number definition. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- hw/arm/virt-acpi-build.c | 6 +++--- hw/arm/virt.c| 7 --- include/hw/arm

[PATCH v3 2/7] arm/virt: Wire up GPIO error source for ACPI / GHES

2024-07-21 Thread Mauro Carvalho Chehab
From: Jonathan Cameron Creates a GED - Generic Event Device and set a GPIO to be used or error injection. [mchehab: use a define for the generic event pin number and do some cleanups] Signed-off-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- hw/arm/virt-acpi-build.c | 30 ++

[PATCH v3 0/7] Add ACPI CPER firmware first error injection for Arm Processor

2024-07-21 Thread Mauro Carvalho Chehab
Testing OS kernel ACPI APEI CPER support is tricky, as one depends on having hardware with special-purpose BIOS and/or hardware. With QEMU, it becomes a lot easier, as it can be done via QMP. This series add support for ARM Processor CPER error injection, according with ACPI 6.x and UEFI 2.9A/2.1

[PATCH v3 4/7] acpi/ghes: Add a logic to handle block addresses and FW first ARM processor error injection

2024-07-21 Thread Mauro Carvalho Chehab
From: Jonathan Cameron 1. Some GHES functions require handling addresses. Add a helper function to support it. 2. Add support for ACPI CPER (firmware-first) ARM processor error injection. Compliance with N.2.4.4 ARM Processor Error Section in UEFI 2.6 and upper specs, using error type bit en

[PATCH v3 5/7] target/arm: preserve mpidr value

2024-07-21 Thread Mauro Carvalho Chehab
There is a logic at helper to properly fill the mpidr information. This is needed for ARM Processor error injection, so store the value inside a cpu opaque value, to allow it to be used. Signed-off-by: Mauro Carvalho Chehab --- target/arm/cpu.h| 1 + target/arm/helper.c | 10 -- 2 f

[PATCH v3 7/7] acpi/ghes: extend arm error injection logic

2024-07-21 Thread Mauro Carvalho Chehab
Enrich CPER error injection logic for ARM processor to allow setting values to from UEFI 2.10 tables N.16 and N.17. It should be noticed that, with such change, all arguments are now optional, so, once QMP is negotiated with: { "execute": "qmp_capabilities" } the simplest way to generat

[PATCH v3 6/7] acpi/ghes: update comments to point to newer ACPI specs

2024-07-21 Thread Mauro Carvalho Chehab
There is one reference to ACPI 4.0 and several references to ACPI 6.x versions. Update them to point to ACPI 6.5 whenever possible. There's one reference that was kept pointing to ACPI 6.4, though, with HEST revision 1. ACPI 6.5 now defines HEST revision 2, and defined a new way to handle source

Re: [PATCH 00/13] make range overlap check more readable

2024-07-21 Thread Philippe Mathieu-Daudé
Hi Yao, On 22/7/24 06:07, Yao Xingtao via wrote: Currently, some components still open-coding the range overlap check. Sometimes this check may be fail because some patterns are missed. How did you catch all these use cases? To avoid the above problems and improve the readability of the code

Re: [PATCH v6 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-07-21 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Thu, Jun 13, 2024 at 12:28 PM Dehan Meng wrote: > The Route information of the Linux VM needs to be used > by administrators and users when debugging network problems > and troubleshooting. > > Signed-off-by: Dehan Meng > --- > qga/commands-posix.c | 135 +++

Re: [PULL 00/15] aspeed queue

2024-07-21 Thread Philippe Mathieu-Daudé
available in the Git repository at:    https://github.com/legoater/qemu/ tags/pull-aspeed-20240721 for you to fetch changes up to 4db1c16441923fc152142ae4bcc1cba23064cb8b:    aspeed: fix coding style (2024-07-21 07:46:38 +0200) as

RE: [PATCH] hw/vfio/container: Fix SIGSEV on vfio_container_instance_finalize()

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: [PATCH] hw/vfio/container: Fix SIGSEV on >vfio_container_instance_finalize() > >In vfio_connect_container's error path, the base container is >removed twice form the VFIOAddressSpace QLIST: first on the >listener_release_exit label and sec

RE: [PATCH v5 11/13] vfio/iommufd: Implement VFIOIOMMUClass::query_dirty_bitmap support

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 11/13] vfio/iommufd: Implement >VFIOIOMMUClass::query_dirty_bitmap support > >ioctl(iommufd, IOMMU_HWPT_GET_DIRTY_BITMAP, arg) is the UAPI >that fetches the bitmap that tells what was dirty in an IOVA >range. > >A single bitmap

RE: [PATCH v5 10/13] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 10/13] vfio/iommufd: Implement >VFIOIOMMUClass::set_dirty_tracking support > >ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that >enables or disables dirty page tracking. The ioctl is used if the hwpt >has been

RE: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >In preparation to using the dirty tracking UAPI, probe whether the IOMMU >supports dirty tracking. This is done via the data stored in >hiod::caps::hw_ca

Re: [PATCH v4] Add timer_join to avoid racing in timer cleanup

2024-07-21 Thread Roman Kiryanov
Hi Paolo, could you please take a look? If you don't like my patch I will be happy if you suggest your solution for this problem. We can help with reviewing it. I grepped through the QEMU sources and found timer_del is called from a separate thread in accel/tcg/tcg-accel-ops-rr.c. It does not use

RE: [PATCH v5 08/13] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 08/13] vfio/{iommufd,container}: Invoke >HostIOMMUDevice::realize() during attach_device() > >Move the HostIOMMUDevice::realize() to be invoked during the attach of >the device >before we allocate IOMMUFD hardware pagetable obje

RE: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits > >Remove caps::aw_bits which requires the bcontainer::iova_ranges being >initialized after device is actually attached. Instead defer that to >.get_cap() and call vfio_devic

Re: [PULL 00/15] aspeed queue

2024-07-21 Thread Richard Henderson
https://github.com/legoater/qemu/ tags/pull-aspeed-20240721 for you to fetch changes up to 4db1c16441923fc152142ae4bcc1cba23064cb8b: aspeed: fix coding style (2024-07-21 07:46:38 +0200) aspeed queue: * SMC model fix (Coverity) * AS

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >1) The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. The process genera

RE: [PATCH v5 01/13] vfio/pci: Extract mdev check into an helper

2024-07-21 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Sent: Friday, July 19, 2024 8:05 PM >To: qemu-devel@nongnu.org >Cc: Liu, Yi L ; Eric Auger ; Duan, >Zhenzhong ; Alex Williamson >; Cedric Le Goater ; Jason >Gunthorpe ; Avihai Horon ; Joao >Martins >Subject: [PATCH v5 01/13] vfio/pci: Extract md

Re: [PATCH 07/13] qtest/fuzz: make range overlap check more readable

2024-07-21 Thread Alexander Bulekov
On 240722 0007, Yao Xingtao wrote: > use ranges_overlap() instead of open-coding the overlap check to improve > the readability of the code. > > Signed-off-by: Yao Xingtao Reviewed-by: Alexander Bulekov Thank you > --- > tests/qtest/fuzz/generic_fuzz.c | 3 ++- > 1 file changed, 2 insertions

[PATCH 06/13] aspeed_smc: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/ssi/aspeed_smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 49205ab76d38..cdca359e1

[PATCH 12/13] dump: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- dump/dump.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 84064d890d2c..45e84428aea5 100644 ---

[PATCH 13/13] block/qcow2-cluster: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use range_overlaps_range() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- block/qcow2-cluster.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-clust

[PATCH 11/13] crypto/block-luks: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- crypto/block-luks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 5b777c15d3cd..45347adeeb7

[PATCH 09/13] system/memory_mapping: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- system/memory_mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/memory_mapping.c b/system/memory_mapping.c index 6f884c5b90c

[PATCH 05/13] display/sm501: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/display/sm501.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 26dc8170d89b..c25

[PATCH 10/13] block/vhdx: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use range_overlaps_range() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- block/vhdx.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 5aa1a1350626..c31661b946b6 10

[PATCH 08/13] sparc/ldst_helper: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- target/sparc/ldst_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 2

[PATCH 07/13] qtest/fuzz: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- tests/qtest/fuzz/generic_fuzz.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fu

[PATCH 04/13] cxl/mailbox: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/cxl/cxl-mailbox-utils.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c inde

[PATCH 02/13] arm/boot: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/arm/boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d480a7da02cf..a004a90e87be 100644 --- a/

[PATCH 03/13] core/loader: make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
use ranges_overlap() instead of open-coding the overlap check to improve the readability of the code. Signed-off-by: Yao Xingtao --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 31593a117171..dac0df561b16 100644

[PATCH 01/13] range: Make ranges_overlap() return bool

2024-07-21 Thread Yao Xingtao via
Just like range_overlaps_range(), use the returned bool value to check whether 2 given ranges overlap. Signed-off-by: Yao Xingtao --- include/qemu/range.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index 4ce694a39831..d446a

[PATCH 00/13] make range overlap check more readable

2024-07-21 Thread Yao Xingtao via
Currently, some components still open-coding the range overlap check. Sometimes this check may be fail because some patterns are missed. To avoid the above problems and improve the readability of the code, it is better to use the ranges_overlap() to do this check. Yao Xingtao (13): range: Make

[PULL 38/63] accel/kvm: Extract common KVM vCPU {creation,parking} code

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta KVM vCPU creation is done once during the vCPU realization when Qemu vCPU thread is spawned. This is common to all the architectures as of now. Hot-unplug of vCPU results in destruction of the vCPU object in QOM but the corresponding KVM vCPU object in the Host KVM is not destr

[PULL 10/63] cxl/mailbox: move mailbox effect definitions to a header

2024-07-21 Thread Michael S. Tsirkin
From: Gregory Price Preparation for allowing devices to define their own CCI commands Signed-off-by: Gregory Price Link: https://lore.kernel.org/r/20230906001517.324380-2-gregory.pr...@memverge.com Signed-off-by: Jonathan Cameron Message-Id: <20240705123039.963781-2-jonathan.came...@huawei.co

[PULL 22/63] virtio: Add bool to VirtQueueElement

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Add the boolean 'in_order_filled' member to the VirtQueueElement structure. The use of this boolean will signify whether the element has been processed and is ready to be flushed (so long as the element is in-order). This boolean is used to support the VIRTIO_F_IN_ORDER feature

[PULL 08/63] hw/cxl/events: discard all event records during sanitation

2024-07-21 Thread Michael S. Tsirkin
From: Hyeonggon Yoo <42.hye...@gmail.com> Per CXL r3.1 Section 8.2.9.9.5.1: Sanitize (Opcode 4400h), the sanitize command should delete all event logs. Introduce cxl_discard_all_event_logs() and call this in __do_sanitization(). Signed-off-by: Hyeonggon Yoo <42.hye...@gmail.com> Reviewed-by: Davi

[PULL 57/63] tests/acpi: Add empty ACPI data files for RISC-V

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov Message-Id: <20240716144306.24322

[PULL 53/63] tests/acpi: Allow DSDT acpi table changes for aarch64

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L so that CI tests don't fail when those ACPI tables are updated in the next patch. This is as per the documentation in bios-tables-tests.c. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov Message-Id: <20240716144306.2432257-4-suni...@ventanamicro.com> Reviewed-by: Michael S.

[PULL 62/63] hw/nvme: Add SPDM over DOE support

2024-07-21 Thread Michael S. Tsirkin
From: Wilfred Mallawa Setup Data Object Exchange (DOE) as an extended capability for the NVME controller and connect SPDM to it (CMA) to it. Signed-off-by: Wilfred Mallawa Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron Acked-by: Klaus Jensen Message-Id: <20240703092027.644758-

[PULL 41/63] hw/acpi: Update GED _EVT method AML with CPU scan

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta OSPM evaluates _EVT method to map the event. The CPU hotplug event eventually results in start of the CPU scan. Scan figures out the CPU and the kind of event(plug/unplug) and notifies it back to the guest. Update the GED AML _EVT method with the call to method \\_SB.CPUS.CSCN (

[PULL 50/63] virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger Add a trace point on virtio_iommu_detach_endpoint_from_domain(). Signed-off-by: Eric Auger Message-Id: <20240716094619.1713905-7-eric.au...@redhat.com> Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 13/63] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-07-21 Thread Michael S. Tsirkin
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS) control feature. The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM Specification (JESD79-5) and allows the DRAM to internally read, correct single-bit errors, and write back corrected

[PULL 52/63] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L The requirement ACPI_060 in the RISC-V BRS specification [1], requires NS16550 compatible UART to have the HID RSCV0003. So, update the HID for the UART. [1] - https://github.com/riscv-non-isa/riscv-brs/releases/download/v0.0.2/riscv-brs-spec.pdf (Chapter 6) Signed-off-

[PULL 35/63] virtio-net: Implement SR-IOV VF

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki A virtio-net device can be added as a SR-IOV VF to another virtio-pci device that will be the PF. Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-7-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-

[PULL 43/63] physmem: Add helper function to destroy CPU AddressSpace

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also involves destruction of the CPU AddressSpace. Add common function to help destroy the CPU AddressSpace. Signed-off-by: Salil Mehta Tested-by: Vishnu Pajjuri Reviewed-by: Gavin Shan Tested-by: Xianglai L

[PULL 44/63] gdbstub: Add helper function to unregister GDB register space

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta Add common function to help unregister the GDB register space. This shall be done in context to the CPU unrealization. Note: These are common functions exported to arch specific code. For example, for ARM this code is being referred in associated arch specific patch-set: Link:

[PULL 12/63] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-07-21 Thread Michael S. Tsirkin
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. The patrol scrub control allows the request to configure patrol scrub input configurations. The patr

[PULL 40/63] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta ACPI GED (as described in the ACPI 6.4 spec) uses an interrupt listed in the _CRS object of GED to intimate OSPM about an event. Later then demultiplexes the notified event by evaluating ACPI _EVT method to know the type of event. Use ACPI GED to also notify the guest kernel abo

[PULL 31/63] pcie_sriov: Ensure PF and VF are mutually exclusive

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki A device cannot be a SR-IOV PF and a VF at the same time. Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-3-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_sriov.c | 5 + 1 file changed, 5 insertio

[PULL 26/63] vhost,vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost devices. The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these devices ensures that the backend is capable of offering and providing support for this feature, and that it can be disabled

[PULL 06/63] hw/cxl: Add get scan media capabilities cmd support

2024-07-21 Thread Michael S. Tsirkin
From: Davidlohr Bueso Use simple heuristics to determine the cost of scanning any given chunk, assuming cost is equal across the whole device, without differentiating between volatile or persistent partitions. This is aligned to the fact that these constraints are not enforced in respective poiso

[PULL 33/63] pcie_sriov: Allow user to create SR-IOV device

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki A user can create a SR-IOV device by specifying the PF with the sriov-pf property of the VFs. The VFs must be added before the PF. A user-creatable VF must have PCIDeviceClass::sriov_vf_user_creatable set. Such a VF cannot refer to the PF because it is created before the PF.

[PULL 30/63] hw/pci: Fix SR-IOV VF number calculation

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs to be non-zero when there are multiple VFs, but the specification does not prohibit to make it zero when there is only one VF. Do not perform the division for the first VF to avoid division by zero. Signe

[PULL 29/63] hw/pci: Do not add ROM BAR for SR-IOV VF

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki A SR-IOV VF cannot have a ROM BAR. Co-developed-by: Yui Washizu Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-1-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c | 8 1 file changed, 8 inser

RE: [PATCH 1/2] util/getauxval: Ensure setting errno if not found

2024-07-21 Thread Xingtao Yao (Fujitsu)
> -Original Message- > From: qemu-devel-bounces+yaoxt.fnst=fujitsu@nongnu.org > On Behalf Of Vivian > Wang > Sent: Sunday, July 21, 2024 5:08 PM > To: qemu-devel@nongnu.org > Cc: Vivian Wang ; Richard Henderson ; > Laurent Vivier > Subject: [PATCH 1/2] util/getauxval: Ensure settin

[PULL 56/63] tests/qtest/bios-tables-test.c: Remove the fall back path

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L The expected ACPI AML files are moved now under ${arch}/{machine} path. Hence, there is no need to search in old path which didn't have ${arch}. Remove the code which searches for the expected AML files under old path as well. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L

[PULL 46/63] virtio-iommu: Remove probe_done

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger Now we have switched to PCIIOMMUOps to convey host IOMMU information, the host reserved regions are transmitted when the PCIe topology is built. This happens way before the virtio-iommu driver calls the probe request. So let's remove the probe_done flag that allowed to check the

[PULL 07/63] hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()

2024-07-21 Thread Michael S. Tsirkin
From: Hyeonggon Yoo <42.hye...@gmail.com> The spec states that reads/writes should have no effect and a part of commands should be ignored when the media is disabled, not when the sanitize command is running. Introduce cxl_dev_media_disabled() to check if the media is disabled and replace sanitiz

[PULL 51/63] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L As per the requirement ACPI_080 in the RISC-V Boot and Runtime Services (BRS) specification [1], PLIC and APLIC should be in namespace as well. So, add them using the defined HID. [1] - https://github.com/riscv-non-isa/riscv-brs/releases/download/v0.0.2/riscv-brs-spec.pdf

[PULL 03/63] hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing

2024-07-21 Thread Michael S. Tsirkin
From: Fan Ni The whole mailbox output payload space is already zeroed after copying out the input payload, which happens before processing the specific mailbox command: https://elixir.bootlin.com/qemu/v8.2.1/source/hw/cxl/cxl-device-utils.c#L204 Signed-off-by: Fan Ni Link: https://lore.kernel.o

[PULL 28/63] contrib/vhost-user-blk: fix overflowing expression

2024-07-21 Thread Michael S. Tsirkin
From: Stefano Garzarella Coverity reported: >>> CID 1549454: Integer handling issues (OVERFLOW_BEFORE_WIDEN) >>> Potentially overflowing expression "le32_to_cpu(desc->num_sectors) << 9" with type "uint32_t" (32 bits, unsigned) is evaluated using 32-bit arithmeti

[PULL 25/63] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation. The goal of the virtqueue_ordered_flush operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to the used/descriptor ring in-order and then update used_idx. The function i

[PULL 60/63] hw/pci: Add all Data Object Types defined in PCIe r6.0

2024-07-21 Thread Michael S. Tsirkin
From: Alistair Francis Add all of the defined protocols/features from the PCIe-SIG r6.0 "Table 6-32 PCI-SIG defined Data Object Types (Vendor ID = 0001h)" table. Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron Reviewed-by: Wilfred Mallawa Message-Id: <20240703092027.644758-2-ali

[PULL 27/63] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer Message-Id: <20240710125522.

[PULL 34/63] virtio-pci: Implement SR-IOV PF

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki Allow user to attach SR-IOV VF to a virtio-pci PF. Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-6-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-pci.h | 1 + hw/virtio/virtio-pci.c

[PULL 39/63] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta CPU ctrl-dev MMIO region length could be used in ACPI GED and various other architecture specific places. Move ACPI_CPU_HOTPLUG_REG_LEN macro to more appropriate common header file. Signed-off-by: Salil Mehta Reviewed-by: Alex Bennée Reviewed-by: Jonathan Cameron Reviewed-by

[PULL 42/63] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change

2024-07-21 Thread Michael S. Tsirkin
From: Salil Mehta CPUs Control device(\\_SB.PCI0) register interface for the x86 arch is IO port based and existing CPUs AML code assumes _CRS objects would evaluate to a system resource which describes IO Port address. But on ARM arch CPUs control device(\\_SB.PRES) register interface is memory-

[PULL 45/63] Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged"

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger This reverts commit 1b889d6e39c32d709f1114699a014b381bcf1cb1. There are different problems with that tentative fix: - Some resources are left dangling (resv_regions, host_resv_ranges) and memory subregions are left attached to the root MR although freed as embedded in the sde

[PULL 24/63] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation. The goal of the virtqueue_ordered_fill operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to search for this now-used element, set its length, and mark the element as filled in the VirtQue

[PULL 23/63] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-07-21 Thread Michael S. Tsirkin
From: Jonah Palmer Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and virtqueue_packed_pop. VirtQueueElements popped from the available/descritpor ring are added to the VirtQueue's used_elems array in-order and in the same fashion as they would be added the used and descriptor ring

[PULL 49/63] hw/vfio/common: Add vfio_listener_region_del_iommu trace event

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger Trace when VFIO gets notified about the deletion of an IOMMU MR. Also trace the name of the region in the add_iommu trace message. Signed-off-by: Eric Auger Message-Id: <20240716094619.1713905-6-eric.au...@redhat.com> Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater

[PULL 55/63] tests/acpi: update expected DSDT blob for aarch64 and microvm

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L After PCI link devices are moved out of the scope of PCI root complex, the DSDT files of machines which use GPEX, will change. So, update the expected AML files with these changes for these machines. Mainly, there are 2 changes. 1) Since the link devices are created now directly

[PULL 47/63] virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger We are currently missing the deallocation of the [host_]resv_regions in case of hot unplug. Also to make things more simple let's rule out the case where multiple HostIOMMUDevices would be aliased and attached to the same IOMMUDevice. This allows to remove the handling of conflic

[PULL 61/63] backends: Initial support for SPDM socket support

2024-07-21 Thread Michael S. Tsirkin
From: Huai-Cheng Kuo SPDM enables authentication, attestation and key exchange to assist in providing infrastructure security enablement. It's a standard published by the DMTF [1]. SPDM supports multiple transports, including PCIe DOE and MCTP. This patch adds support to QEMU to connect to an ex

[PULL 58/63] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov Message-Id: <20240716144306.2432257-9-suni...@ventanamicro.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bio

[PULL 32/63] pcie_sriov: Check PCI Express for SR-IOV PF

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki SR-IOV requires PCI Express. Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-4-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_sriov.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/pci/pc

[PULL 05/63] hw/cxl/cxl-host: Fix segmentation fault when getting cxl-fmw property

2024-07-21 Thread Michael S. Tsirkin
From: Zhao Liu QEMU crashes (Segmentation fault) when getting cxl-fmw property via qmp: (QEMU) qom-get path=machine property=cxl-fmw This issue is caused by accessing wrong callback (opaque) type in machine_get_cfmw(). cxl_machine_init() sets the callback as `CXLState *` type but machine_get_c

[PULL 59/63] tests/acpi: Add expected ACPI AML files for RISC-V

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L As per the step 5 in the process documented in bios-tables-test.c, generate the expected ACPI AML data files for RISC-V using the rebuild-expected-aml.sh script and update the bios-tables-test-allowed-diff.h. These are all new files being added for the first time. Hence, iASL dif

[PULL 48/63] virtio-iommu: Remove the end point on detach

2024-07-21 Thread Michael S. Tsirkin
From: Eric Auger We currently miss the removal of the endpoint in case of detach. Signed-off-by: Eric Auger Message-Id: <20240716094619.1713905-5-eric.au...@redhat.com> Tested-by: Cédric Le Goater Reviewed-by: Cédric Le Goater Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[PULL 04/63] hw/cxl: Check for multiple mappings of memory backends.

2024-07-21 Thread Michael S. Tsirkin
From: Jonathan Cameron Similar protection to that provided for -numa memdev=x to make sure that memory used to back a type3 device is not also mapped as normal RAM, or for multiple type3 devices. This is an easy footgun to remove and seems multiple people have run into it. Signed-off-by: Jonath

[PULL 19/63] intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations

2024-07-21 Thread Michael S. Tsirkin
From: Clément Mathieu--Drif These 2 macros are for high 64-bit of the FRCD registers. Declarations have to be moved accordingly. Signed-off-by: Clément Mathieu--Drif Reviewed-by: Minwoo Im Reviewed-by: Yi Liu Message-Id: <20240709142557.317271-3-clement.mathieu--d...@eviden.com> Reviewed-by:

[PULL 54/63] acpi/gpex: Create PCI link devices outside PCI root bridge

2024-07-21 Thread Michael S. Tsirkin
From: Sunil V L Currently, PCI link devices (PNP0C0F) are always created within the scope of the PCI root bridge. However, RISC-V needs these link devices to be created outside to ensure the probing order in the OS. This matches the example given in the ACPI specification [1] as well. Hence, crea

[PULL 37/63] smbios: make memory device size configurable per Machine

2024-07-21 Thread Michael S. Tsirkin
From: Igor Mammedov Currently QEMU describes initial[1] RAM* in SMBIOS as a series of virtual DIMMs (capped at 16Gb max) using type 17 structure entries. Which is fine for the most cases. However when starting guest with terabytes of RAM this leads to too many memory device structures, which ev

[PULL 63/63] virtio: Always reset vhost devices

2024-07-21 Thread Michael S. Tsirkin
From: Hanna Czenczek Requiring `vhost_started` to be true for resetting vhost devices in `virtio_reset()` seems like the wrong condition: Most importantly, the preceding `virtio_set_status(vdev, 0)` call will (for vhost devices) end up in `vhost_dev_stop()` (through vhost devices' `.set_status` i

[PULL 11/63] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-07-21 Thread Michael S. Tsirkin
From: Shiju Jose CXL spec 3.1 section 8.2.9.6 describes optional device specific features. CXL devices supports features with changeable attributes. Get Supported Features retrieves the list of supported device specific features. The settings of a feature can be retrieved using Get Feature and op

[PULL 36/63] docs: Document composable SR-IOV device

2024-07-21 Thread Michael S. Tsirkin
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20240715-sriov-v5-8-3f5539093...@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + docs/system/index.rst | 1 + docs/system/sriov.rst | 36 +

[PULL 20/63] intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo

2024-07-21 Thread Michael S. Tsirkin
From: Clément Mathieu--Drif Per the below code, it can overflow as am can be larger than 8 according to the CH 6.5.2.3 IOTLB Invalidate. Use uint64_t to avoid overflows. Fixes: b5a280c00840 ("intel-iommu: add IOTLB using hash table") Signed-off-by: Clément Mathieu--Drif Reviewed-by: Minwoo Im

[PULL 21/63] intel_iommu: make type match

2024-07-21 Thread Michael S. Tsirkin
From: Clément Mathieu--Drif The 'level' field in vtd_iotlb_key is an unsigned integer. We don't need to store level as an int in vtd_lookup_iotlb. This is not an issue by itself, but using unsigned here seems cleaner. Signed-off-by: Clément Mathieu--Drif Reviewed-by: Yi Liu Message-Id: <20240

[PULL 16/63] virtio-snd: add max size bounds check in input cb

2024-07-21 Thread Michael S. Tsirkin
From: Manos Pitsidianakis When reading input audio in the virtio-snd input callback, virtio_snd_pcm_in_cb(), we do not check whether the iov can actually fit the data buffer. This is because we use the buffer->size field as a total-so-far accumulator instead of byte-size-left like in TX buffers.

[PULL 18/63] intel_iommu: fix FRCD construction macro

2024-07-21 Thread Michael S. Tsirkin
From: Clément Mathieu--Drif The constant must be unsigned, otherwise the two's complement overrides the other fields when a PASID is present. Fixes: 1b2b12376c8a ("intel-iommu: PASID support") Signed-off-by: Clément Mathieu--Drif Reviewed-by: Yi Liu Reviewed-by: Zhenzhong Duan Reviewed-by: Mi

[PULL 17/63] virtio-snd: check for invalid param shift operands

2024-07-21 Thread Michael S. Tsirkin
From: Manos Pitsidianakis When setting the parameters of a PCM stream, we compute the bit flag with the format and rate values as shift operand to check if they are set in supported_formats and supported_rates. If the guest provides a format/rate value which when shifting 1 results in a value bi

[PULL 00/63] virtio,pci,pc: features,fixes

2024-07-21 Thread Michael S. Tsirkin
A couple of fixes are outstanding, will merge later. The following changes since commit a87a7c449e532130d4fa8faa391ff7e1f04ed660: Merge tag 'pull-loongarch-20240719' of https://gitlab.com/gaosong/qemu into staging (2024-07-19 16:28:28 +1000) are available in the Git repository at: https:/

[PULL 14/63] hw/cxl: Support firmware updates

2024-07-21 Thread Michael S. Tsirkin
From: Davidlohr Bueso Implement transfer and activate functionality per 3.1 spec for supporting update metadata (no actual buffers). Transfer times are arbitrarily set to ten and two seconds for full and part transfers, respectively. cxl update-firmware mem0 -F fw.img cxl update-firmware mem0

  1   2   >