Re: [PATCH 03/12] util/filemonitor-inotify: qemu_file_monitor_watch(): avoid overflow

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:43, Vladimir Sementsov-Ogievskiy wrote: > > Prefer clear assertions instead of possible array overflow. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > util/filemonitor-inotify.c | 21 + > 1 file changed, 13 insertions(+), 8 deletions(-) > >

RE: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Salil Mehta via
Hi Xianglai, FYI. RFC V2 is out and you can now drop the arch agnostic patches from your patch-set. Please check the details in the cover letter which one you need to pick and rebase from: https://lore.kernel.org/qemu-devel/20230926100436.28284-1-salil.me...@huawei.com/T/#t I am planning to float

RE: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Salil Mehta via
Same with this patch. It already exists in the architecture agnostic patches part of below: https://lore.kernel.org/qemu-devel/20230926100436.28284-1-salil.me...@huawei.com/T/#t Thanks Salil. > From: xianglai li > Sent: Tuesday, September 26, 2023 10:54 AM > To: qemu-devel@nongnu.org > Cc: Sal

Re: [PATCH 05/12] device_tree: qmp_dumpdtb(): stronger assertion

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:42, Vladimir Sementsov-Ogievskiy wrote: > > Coverity mark this size, got from the buffer as untrasted value, it's > not good to use it as length when writing to file. Make the assertion > more strict to also check upper bound. > > Signed-off-by: Vladimir Sementsov-Ogievs

Re: [PATCH 01/12] hw/core/loader: load_at(): check size

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 26.09.23 13:33, Peter Maydell wrote: On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy wrote: This @size parameter often comes from fd. We'd better check it before doing read and allocation. Chose 1G as high enough empiric bound. Empirical for who? Signed-off-by: Vladimir Sem

Re: [PATCH 01/12] hw/core/loader: load_at(): check size

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 11:51, Vladimir Sementsov-Ogievskiy wrote: > > On 26.09.23 13:33, Peter Maydell wrote: > > On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> This @size parameter often comes from fd. We'd better check it before > >> doing read and allocation.

Re: [PATCH 06/12] mc146818rtc: rtc_set_time(): initialize tm to zeroes

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:42, Vladimir Sementsov-Ogievskiy wrote: > > set_time() function doesn't set all the fields, so it's better to > initialize tm structure. And Coverity will be happier about it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > hw/rtc/mc146818rtc.c | 2 +- > 1 file

RE: [PATCH v3 7/7] Update the ACPI table for the Loongarch CPU

2023-09-26 Thread Salil Mehta via
Hi Xianglai, > From: xianglai li > Sent: Tuesday, September 26, 2023 10:55 AM > To: qemu-devel@nongnu.org > Cc: Bernhard Beschow ; Salil Mehta > ; Salil Mehta ; Xiaojuan > Yang ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost

Re: [PATCH 08/12] block/nvme: nvme_process_completion() fix bound for cid

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:42, Vladimir Sementsov-Ogievskiy wrote: > > NVMeQueuePair::reqs as length NVME_NUM_REQS, which less than > NVME_QUEUE_SIZE by 1. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nvme.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff

Re: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 11:04:23AM +0100, Salil Mehta wrote: > ACPI GED shall be used to convey to the guest kernel about any CPU > hot-(un)plug > events. Therefore, existing ACPI GED framework inside QEMU needs to be > enhanced > to support CPU hotplug state and events. > > Co-developed-by: Sal

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: > ACPI GED shall be used to convey to the guest kernel about any cpu > hot-(un)plug > events. Therefore, existing ACPI GED framework inside QEMU needs to be > enhanced > to support CPU hot-(un)plug state and events. > > Co-authored-by:

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
Hi David, > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org bounces+salil.mehta=huawei@nongnu.org> On Behalf Of David Hildenbrand > Sent: Tuesday, September 12, 2023 8:00 AM > To: xianglai li ; qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsir

Re: [PATCH 09/12] kvm-all: introduce limits for name_size and num_desc

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:43, Vladimir Sementsov-Ogievskiy wrote: > > Coverity doesn't like when the value with unchecked bounds that comes > from fd is used as length for IO or allocation. And really, that's not > a good practice. Let's introduce at least an empirical limits for these > values.

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
> From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org bounces+salil.mehta=huawei@nongnu.org> On Behalf Of lixianglai > Sent: Thursday, September 14, 2023 2:01 PM > To: David Hildenbrand ; qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igo

Re: [PATCH 10/12] hw/core/loader: gunzip(): initialize z_stream

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy wrote: > > Coverity signals that variable as being used uninitialized. And really, > when work with external APIs that's better to zero out the structure, > where we set some fields by hand. > > Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH 11/12] hw/core/loader: read_targphys(): add upper bound

2023-09-26 Thread Peter Maydell
On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy wrote: > > Coverity doesn't like using "untrusted" values, coming from buffers and > fd-s as length to do IO and allocations. And that's make sense. The > function is used three times with "untrusted" nbytes parameter. Let's > introduce a

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
Hi Xianglai, > From: lixianglai > Sent: Friday, September 15, 2023 3:48 AM > To: David Hildenbrand ; qemu-devel@nongnu.org; Salil > Mehta > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost >

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:49:08AM +, Salil Mehta wrote: > Hi Xianglai, > FYI. RFC V2 is out and you can now drop the arch agnostic patches from > your patch-set. Please check the details in the cover letter which one > you need to pick and rebase from: > > https://lore.kernel.org/qemu-devel/2

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
Hi David, > From: David Hildenbrand > Sent: Friday, September 15, 2023 9:07 AM > To: lixianglai ; qemu-devel@nongnu.org; Salil Mehta > > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost > ; M

FreeBSD 13.2 installer does not see AHCI devices on aarch64/sbsa-ref and x86-64/q35

2023-09-26 Thread Marcin Juszkiewicz
I work on SBSA Reference Platform (sbsa-ref) at Linaro. And yesterday I wanted to check how non-Linux operating systems work on sbsa-ref machine. One of them was FreeBSD 13.2 - the latest one. Fetched bootonly ISO image [1] and booted system. 1. https://download.freebsd.org/releases/arm64/aarch

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Friday, September 15, 2023 4:22 PM > To: Philippe Mathieu-Daudé ; lixianglai > ; qemu-devel@nongnu.org; Salil Mehta > > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduar

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread lixianglai
Hi, Michael S. Tsirkin : On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: ACPI GED shall be used to convey to the guest kernel about any cpu hot-(un)plug events. Therefore, existing ACPI GED framework inside QEMU needs to be enhanced to support CPU hot-(un)plug state and events. C

RE: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread Salil Mehta via
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 12:02 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron ; > lpieral...@kernel.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org; imamm...@

Re: [PATCH 01/12] hw/core/loader: load_at(): check size

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 26.09.23 13:54, Peter Maydell wrote: On Tue, 26 Sept 2023 at 11:51, Vladimir Sementsov-Ogievskiy wrote: On 26.09.23 13:33, Peter Maydell wrote: On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy wrote: This @size parameter often comes from fd. We'd better check it before doing

RE: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Salil Mehta via
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 12:12 PM > To: Salil Mehta > Cc: xianglai li ; qemu-devel@nongnu.org; Bernhard > Beschow ; Salil Mehta ; Xiaojuan > Yang ; Song Gao ; Igor > Mammedov ; Ani Sinha ; Paolo > Bonzini ; Richard Henderson > ; Eduardo Habkost ; > Marcel A

[PATCH v2 01/12] scripts/update-linux-headers: Add iommufd.h

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger Update the script to import iommufd.h Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan --- scripts/update-linux-headers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linu

[PATCH v2 00/12] Prerequisite change for IOMMUFD support

2023-09-26 Thread Zhenzhong Duan
Hi All, Per Cédric's suggestion, the IOMMUFD patchset v1[1] will be splited to two series, prerequisite patchset and pure IOMMUFD support patchset to facilitate review. This is the prerequisite one. The main purpose of this series is to make common.c group agnostic, all group related code are mov

[PATCH v2 05/12] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-26 Thread Zhenzhong Duan
Introduce two new helpers, vfio_kvm_device_[add/del]_fd which take as input a file descriptor which can be either a group fd or a cdev fd. This uses the new KVM_DEV_VFIO_FILE VFIO KVM device group, which aliases to the legacy KVM_DEV_VFIO_GROUP. vfio_kvm_device_[add/del]_group then call those new

[PATCH v2 02/12] linux-headers: Add iommufd.h

2023-09-26 Thread Zhenzhong Duan
Since commit da3c22c74a3c ("linux-headers: Update to Linux v6.6-rc1"), linux-headers has been updated to v6.6-rc1. As previous patch added iommufd.h to update-linux-headers.sh, run the script again against TAG v6.6-rc1 to have iommufd.h included. Signed-off-by: Zhenzhong Duan --- linux-headers/

[PATCH v2 11/12] vfio/common: Introduce two kinds of VFIO device lists

2023-09-26 Thread Zhenzhong Duan
In VFIO subsystem, there are different VFIO device iteration requirements. One requirement is to iterate all VFIO devices, the other is to iterate VFIO device in same container. Currently VFIO device is iterated through VFIO group list which is group perceivable and less efficient. Introduce two

[PATCH v2 07/12] vfio/platform: Use vfio_[attach/detach]_device

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger Let the vfio-platform device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Drop the trace event for vfio-platform as we have similar one in vfio_attach_device. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-

[PATCH v2 03/12] vfio/common: Move IOMMU agnostic helpers to a separate file

2023-09-26 Thread Zhenzhong Duan
From: Yi Liu Move low-level iommu agnostic helpers to a separate helpers.c file. They relate to regions, interrupts, device/region capabilities and etc. Signed-off-by: Eric Auger Signed-off-by: Yi Sun Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h |

[PATCH v2 10/12] vfio/common: Move VFIO reset handler registration to a group agnostic function

2023-09-26 Thread Zhenzhong Duan
Move the reset handler registration/unregistration to a place that is not group specific. vfio_[get/put]_address_space are the best places for that purpose. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan --- hw/vfio/common.c | 15 +++ 1 file changed,

[PATCH v2 08/12] vfio/ap: Use vfio_[attach/detach]_device

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger Let the vfio-ap device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan --- hw/vfio/ap.c | 68 +

[PATCH v2 12/12] vfio/common: Move legacy VFIO backend code into separate container.c

2023-09-26 Thread Zhenzhong Duan
From: Yi Liu Move all the code really dependent on the legacy VFIO container/group into a separate file: container.c. What does remain in common.c is the code related to VFIOAddressSpace, MemoryListeners, migration and all other general operations. Signed-off-by: Eric Auger Signed-off-by: Yi Li

[PATCH v2 06/12] vfio/pci: Introduce vfio_[attach/detach]_device

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger We want the VFIO devices to be able to use two different IOMMU backends, the legacy VFIO one and the new iommufd one. Introduce vfio_[attach/detach]_device which aim at hiding the underlying IOMMU backend (IOCTLs, datatypes, ...). Once vfio_attach_device completes, the device i

[PATCH v2 09/12] vfio/ccw: Use vfio_[attach/detach]_device

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Also now all the devices have been migrated to use the new vfio_attach_device/vfio_detach_device API, let's turn the legacy functions into static functi

[PATCH v2 04/12] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-26 Thread Zhenzhong Duan
From: Eric Auger Introduce helper functions that isolate the code used for VFIO_SPAPR_TCE_v2_IOMMU. Those helpers hide implementation details beneath the container object and make the vfio_listener_region_add/del() implementations more readable. No code change intended. Signed-off-by: Eric Auge

Re: [PATCH 50/52] migration/rdma: Silence qemu_rdma_cleanup()

2023-09-26 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:42, Markus Armbruster wrote: >> Functions that use an Error **errp parameter to return errors should >> not also report them to the user, because reporting is the caller's >> job. When the caller does, the error is reported twice. When it >> doe

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 11:45:19AM +, Salil Mehta wrote: > > > From: Michael S. Tsirkin > > Sent: Tuesday, September 26, 2023 12:12 PM > > To: Salil Mehta > > Cc: xianglai li ; qemu-devel@nongnu.org; Bernhard > > Beschow ; Salil Mehta ; Xiaojuan > > Yang ; Song Gao ; Igor > > Mammedov ; Ani

Re: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 11:37:38AM +, Salil Mehta wrote: > > From: Michael S. Tsirkin > > Sent: Tuesday, September 26, 2023 12:02 PM > > To: Salil Mehta > > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- > > phili...@linaro.org; Jonathan Cameron ; > > lpieral...@kernel

RE: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Salil Mehta via
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 12:54 PM > To: Salil Mehta > Cc: xianglai li ; qemu-devel@nongnu.org; Bernhard > Beschow ; Salil Mehta ; Xiaojuan > Yang ; Song Gao ; Igor > Mammedov ; Ani Sinha ; Paolo > Bonzini ; Richard Henderson > ; Eduardo Habkost ; > Marcel Apf

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: > ACPI GED shall be used to convey to the guest kernel about any cpu > hot-(un)plug > events. Therefore, existing ACPI GED framework inside QEMU needs to be > enhanced > to support CPU hot-(un)plug state and events. > > Co-authored-by:

Re: FreeBSD 13.2 installer does not see AHCI devices on aarch64/sbsa-ref and x86-64/q35

2023-09-26 Thread Niklas Cassel
Hello Marcin, I will have a look at this. Kind regards, Niklas On 26 September 2023 13:23:46 CEST, Marcin Juszkiewicz wrote: >I work on SBSA Reference Platform (sbsa-ref) at Linaro. And yesterday I >wanted to check how non-Linux operating systems work on sbsa-ref machine. > >One of them was

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 12:03:46PM +, Salil Mehta wrote: > Sure, ARM patch-set follows exactly above rules. > Almost. Co-developed-by: Salil Mehta Signed-off-by: Salil Mehta Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Sali

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 07:26:40PM +0800, lixianglai wrote: > > Hi, Michael S. Tsirkin : > > On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: > > > ACPI GED shall be used to convey to the guest kernel about any cpu > > > hot-(un)plug > > > events. Therefore, existing ACPI GED framewor

[PATCH v24 00/21] s390x: CPU Topology

2023-09-26 Thread Nina Schoetterl-Glausch
Changes since v23 (range-diff below): * qapi documentation changes (thanks Markus) * avoid compiler warning about multiplication in bool expression Changes since v22: * fix compile issues (thanks Thomas, Cédric) * incorporate feedback (thanks Thomas!), most notably * forbid books and drawers in o

[PATCH v24 02/21] CPU topology: extend with s390 specifics

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390 adds two new SMP levels, drawers and books to the CPU topology. S390 CPUs have specific topology features like dedication and entitlement. These indicate to the guest information on host vCPU scheduling and help the guest make better scheduling decisions. Let us provide t

[PATCH v24 11/21] machine: adding s390 topology to info hotpluggable-cpus

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 in

[PATCH v24 14/21] docs/s390x/cpu topology: document s390x cpu topology

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Signed-off-by: Nina Schoetterl-Glausch --- MAINTAINERS| 2 + docs/devel/index-inter

[PATCH v24 20/21] tests/avocado: s390x cpu topology dedicated errors

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 48 ++ 1 file changed, 48 insertions(+) diff --git a/tests/avocad

[PATCH v24 16/21] tests/avocado: s390x cpu topology polarization

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-

[PATCH v24 15/21] tests/avocado: s390x cpu topology core

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Introduction of the s390x cpu topology core functions and basic tests. We test the correlation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Sc

[PATCH v24 01/21] qapi: machine.json: change docs regarding CpuInstanceProperties

2023-09-26 Thread Nina Schoetterl-Glausch
Clarify roles of different architectures. Also change things a bit in anticipation of additional members being added. Suggested-by: Markus Armbruster Signed-off-by: Nina Schoetterl-Glausch --- Reference to s390x docs added in patch 14 qapi/machine.json | 17 + 1 file changed

[PATCH v24 18/21] tests/avocado: s390x cpu topology test dedicated CPU

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this from both host and guest point of view. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Signed-off

[PATCH v24 12/21] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glaus

[PATCH v24 17/21] tests/avocado: s390x cpu topology entitlement tests

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Test changes in the entitlement from both a guest and a host point of view, depending on the polarization. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch --- tests/avocado/s3

[PATCH v24 07/21] s390x/cpu topology: interception of PTF instruction

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function cod

[PATCH v24 10/21] machine: adding s390 topology to query-cpu-fast

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth S

[PATCH v24 08/21] target/s390x/cpu topology: activate CPU topology

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced f

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread lixianglai
Hi  Salil Mehta via : Hi Xianglai, FYI. RFC V2 is out and you can now drop the arch agnostic patches from your patch-set. Please check the details in the cover letter which one you need to pick and rebase from: https://lore.kernel.org/qemu-devel/20230926100436.28284-1-salil.me...@huawei.com/T/#

[PATCH v24 03/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books and sockets in the case they are not specified. - verify the CPU attributes - check that we

[PATCH v24 09/21] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifier

Re: [PATCH] m68k: Silence -Wshadow=local warnings in the m68k code

2023-09-26 Thread Markus Armbruster
Thomas Huth writes: > Rename the innermost variables to make the code compile > without warnings when using -Wshadow=local. > > Signed-off-by: Thomas Huth Clashes with patches from Philippe and Laurent: [PATCH v2 05/22] target/m68k: Clean up local variable shadowing [PATCH] disas/m68k:

[PATCH v24 05/21] s390x/sclp: reporting the maximum nested topology entries

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina

[PATCH v24 19/21] tests/avocado: s390x cpu topology test socket full

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/avocado/s390_topo

[PATCH v24 21/21] tests/avocado: s390x cpu topology bad move

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel This test verifies that QEMU refuses to move a CPU to an nonexistent location. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topology.

[PATCH v24 06/21] s390x/cpu topology: resetting the Topology-Change-Report

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl

[PATCH v24 13/21] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel The query-s390x-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch ---

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread lixianglai
Hi Salil Mehta via: Same with this patch. It already exists in the architecture agnostic patches part of below: https://lore.kernel.org/qemu-devel/20230926100436.28284-1-salil.me...@huawei.com/T/#t OK, I will remove the first two patches in the next version. Thanks, Xianglai. Thanks S

[PATCH v24 04/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Signed-off-by: Nina Schoetterl-Glausch ---

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread David Hildenbrand
On 26.09.23 13:55, Salil Mehta wrote: From: Salil Mehta Sent: Tuesday, September 26, 2023 12:21 PM To: 'David Hildenbrand' ; lixianglai ; qemu-devel@nongnu.org Cc: Salil Mehta ; Xiaojuan Yang ; Song Gao ; Michael S. Tsirkin ; Igor Mammedov ; Ani Sinha ; Paolo Bonzini ; Richard Henderson ; Eduardo

RE: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread Salil Mehta via
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 1:00 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron ; > lpieral...@kernel.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org; imamm...@r

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Daniel P . Berrangé
On Tue, Sep 26, 2023 at 07:54:04AM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 26, 2023 at 11:45:19AM +, Salil Mehta wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, September 26, 2023 12:12 PM > > > To: Salil Mehta > > > Cc: xianglai li ; qemu-devel@nongnu.org; Bernhard > >

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
> From: Salil Mehta > Sent: Tuesday, September 26, 2023 12:21 PM > To: 'David Hildenbrand' ; lixianglai > ; qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost > ; Marcel Ap

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Tuesday, September 26, 2023 1:24 PM > > On 26.09.23 13:55, Salil Mehta wrote: > >> From: Salil Mehta > >> Sent: Tuesday, September 26, 2023 12:21 PM > >> To: 'David Hildenbrand' ; lixianglai > >> ; qemu-devel@nongnu.org > >> Cc: Salil Mehta ; Xiaojuan Yang > >> ;

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread David Hildenbrand
On 26.09.23 14:32, Salil Mehta wrote: From: David Hildenbrand Sent: Tuesday, September 26, 2023 1:24 PM On 26.09.23 13:55, Salil Mehta wrote: From: Salil Mehta Sent: Tuesday, September 26, 2023 12:21 PM To: 'David Hildenbrand' ; lixianglai ; qemu-devel@nongnu.org Cc: Salil Mehta ; Xiaojuan Yan

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Tuesday, September 26, 2023 1:37 PM > To: Salil Mehta ; lixianglai > ; qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost > ; Marcel Apfe

Re: [PATCH] m48t59-test: remove shadowed variables and cleanup

2023-09-26 Thread Markus Armbruster
Thomas Huth writes: > On 25/09/2023 16.47, Paolo Bonzini wrote: >> Rename the variable "s" and, while at it, avoid the chance of an overflow in >> the >> computation of ABS(t - s). >> Signed-off-by: Paolo Bonzini >> --- >> tests/qtest/m48t59-test.c | 17 ++--- >> 1 file changed,

Re: [PATCH] pm_smbus: rename variable to avoid shadowing

2023-09-26 Thread Corey Minyard
On Mon, Sep 25, 2023 at 04:47:39PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > hw/i2c/pm_smbus.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) This looks ok to me. Acked-by: Corey Minyard > > diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c > index 9ad6

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread lixianglai
Hi Salil Mehta via  And Michael S. Tsirkin: From: Michael S. Tsirkin Sent: Tuesday, September 26, 2023 12:54 PM To: Salil Mehta Cc: xianglai li ; qemu-devel@nongnu.org; Bernhard Beschow ; Salil Mehta ; Xiaojuan Yang ; Song Gao ; Igor Mammedov ; Ani Sinha ; Paolo Bonzini ; Richard Henderson ;

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread David Hildenbrand
On 26.09.23 14:44, Salil Mehta wrote: From: David Hildenbrand Sent: Tuesday, September 26, 2023 1:37 PM To: Salil Mehta ; lixianglai ; qemu-devel@nongnu.org Cc: Salil Mehta ; Xiaojuan Yang ; Song Gao ; Michael S. Tsirkin ; Igor Mammedov ; Ani Sinha ; Paolo Bonzini ; Richard Henderson ; Eduardo H

RE: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Salil Mehta via
Hi Michael, > From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 1:08 PM > > On Tue, Sep 26, 2023 at 07:26:40PM +0800, lixianglai wrote: > > > > Hi, Michael S. Tsirkin : > > > On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: > > > > ACPI GED shall be used to convey to the g

Re: [PATCH] m68k: Silence -Wshadow=local warnings in the m68k code

2023-09-26 Thread Thomas Huth
On 26/09/2023 14.19, Markus Armbruster wrote: Thomas Huth writes: Rename the innermost variables to make the code compile without warnings when using -Wshadow=local. Signed-off-by: Thomas Huth Clashes with patches from Philippe and Laurent: [PATCH v2 05/22] target/m68k: Clean up loca

Re: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread lixianglai
Hi Michael S. Tsirkin : On Tue, Sep 26, 2023 at 11:37:38AM +, Salil Mehta wrote: From: Michael S. Tsirkin Sent: Tuesday, September 26, 2023 12:02 PM To: Salil Mehta Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- phili...@linaro.org; Jonathan Cameron ; lpieral...@k

Re: [PATCH] m68k: Silence -Wshadow=local warnings in the m68k code

2023-09-26 Thread Markus Armbruster
Thomas Huth writes: > On 26/09/2023 14.19, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> Rename the innermost variables to make the code compile >>> without warnings when using -Wshadow=local. >>> >>> Signed-off-by: Thomas Huth >> >> Clashes with patches from Philippe and Laurent: >>

Re: [PATCH] target/i386/seg_helper: remove shadowed variable

2023-09-26 Thread Markus Armbruster
I still get these: ../target/i386/tcg/seg_helper.c: In function ‘switch_tss_ra’: ../target/i386/tcg/seg_helper.c:344:22: warning: declaration of ‘ptr’ shadows a previous local [-Wshadow=compatible-local] 344 | target_ulong ptr; | ^~~ ../target/i386/tcg/seg_hel

Re: [Virtio-fs] [PATCH v3 0/5] vhost-user: Back-end state migration

2023-09-26 Thread Hanna Czenczek
On 25.09.23 22:48, Stefan Hajnoczi wrote: On Fri, Sep 15, 2023 at 12:25:25PM +0200, Hanna Czenczek wrote: RFC: https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg04263.html v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html v2: https://lists.nongnu.org/archive/

Re: [PATCH v2 5/5] elf2dmp: rework PDB_STREAM_INDEXES::segments obtaining

2023-09-26 Thread Peter Maydell
On Fri, 15 Sept 2023 at 18:02, Viktor Prutyanov wrote: > > PDB for Windows 11 kernel has slightly different structure compared to > previous versions. Since elf2dmp don't use the other fields, copy only > 'segments' field from PDB_STREAM_INDEXES. > > Signed-off-by: Viktor Prutyanov Hi; this patc

Re: [PATCH] mailmap: Fix Andrey Drobyshev author email

2023-09-26 Thread Eric Blake
On Tue, Sep 26, 2023 at 01:28:01PM +0300, andrey.drobys...@virtuozzo.com wrote: > From: Andrey Drobyshev > > This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing > list rewrote the "From:" field in the corresponding patches. See commit > 3bd2608db7 ("maint: Add .mailmap entries

Re: [PATCH v2 1/5] elf2dmp: replace PE export name check with PDB name check

2023-09-26 Thread Peter Maydell
On Fri, 15 Sept 2023 at 18:02, Viktor Prutyanov wrote: > > PE export name check introduced in d399d6b179 isn't reliable enough, > because a page with the export directory may be not present for some > reason. On the other hand, elf2dmp retrieves the PDB name in any case. > It can be also used to c

Re: [PATCH v4 13/14] MAINTAINERS: add maintainer of simpletrace.py

2023-09-26 Thread Stefan Hajnoczi
On Tue, Sep 26, 2023, 06:27 Mads Ynddal wrote: > > > You're welcome to be the maintainer. I haven't touched it in years. > > > > When you have reviewed future simpletrace.py patches you can either post > > your Reviewed-by and I'll include them in my tracing pull requests, or > > you could send p

Re: [PATCH] mailmap: Fix Andrey Drobyshev author email

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 14:40, Eric Blake wrote: > > On Tue, Sep 26, 2023 at 01:28:01PM +0300, andrey.drobys...@virtuozzo.com > wrote: > > From: Andrey Drobyshev > > > > This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing > > list rewrote the "From:" field in the corresponding

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-09-26 Thread Vaishnav Achath
Hi Kishon, all, On 26/09/23 15:17, Shunsuke Mie wrote: > > On 2023/09/21 18:11, Kishon Vijay Abraham I wrote: >> +Vaishnav >> >> Hi Shunsuke, >> >> On 8/18/2023 7:16 PM, Shunsuke Mie wrote: >>> Hi all, >>> >>> We are proposing to add a new test syste to Linux for PCIe Endpoint. That >>> can be ru

Re: [PATCH v3 2/5] vhost-user.rst: Clarify enabling/disabling vrings

2023-09-26 Thread Hanna Czenczek
On 25.09.23 21:15, Stefan Hajnoczi wrote: On Fri, Sep 15, 2023 at 12:25:27PM +0200, Hanna Czenczek wrote: Currently, the vhost-user documentation says that rings are to be initialized in a disabled state when VHOST_USER_F_PROTOCOL_FEATURES is negotiated. However, by the time of feature negotiat

Re: [PATCH 02/12] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): reduce magic numbers

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 26.09.23 13:37, Peter Maydell wrote: On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy wrote: Add a constant and clear assertion. The assertion also tells Coverity that we are not going to overflow the array. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/i386/intel_iommu.

Re: [PATCH 02/12] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): reduce magic numbers

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 15:12, Vladimir Sementsov-Ogievskiy wrote: > > On 26.09.23 13:37, Peter Maydell wrote: > > On Mon, 25 Sept 2023 at 20:41, Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Add a constant and clear assertion. The assertion also tells Coverity > >> that we are not going to o

Re: [PATCH 05/12] device_tree: qmp_dumpdtb(): stronger assertion

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 26.09.23 13:51, Peter Maydell wrote: On Mon, 25 Sept 2023 at 20:42, Vladimir Sementsov-Ogievskiy wrote: Coverity mark this size, got from the buffer as untrasted value, it's not good to use it as length when writing to file. Make the assertion more strict to also check upper bound. Signed-

Re: [PATCH 05/12] device_tree: qmp_dumpdtb(): stronger assertion

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 15:20, Vladimir Sementsov-Ogievskiy wrote: > > On 26.09.23 13:51, Peter Maydell wrote: > > On Mon, 25 Sept 2023 at 20:42, Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Coverity mark this size, got from the buffer as untrasted value, it's > >> not good to use it as leng

Re: [PATCH] target/i386/seg_helper: remove shadowed variable

2023-09-26 Thread Paolo Bonzini
Il mar 26 set 2023, 15:16 Markus Armbruster ha scritto: > I still get these: > > ../target/i386/tcg/seg_helper.c: In function ‘switch_tss_ra’: > ../target/i386/tcg/seg_helper.c:344:22: warning: declaration of ‘ptr’ > shadows a previous local [-Wshadow=compatible-local] > 344 | target_ul

<    1   2   3   4   >