Re: [PATCH] amd_iommu: Fix APIC address check

2023-09-20 Thread Akihiko Odaki
On 2023/09/10 1:23, Akihiko Odaki wrote: An MSI from I/O APIC may not exactly equal to APIC_DEFAULT_ADDRESS. In fact, Windows 17763.3650 configures I/O APIC to set the dest_mode bit. Check only the 12 bits that are known to be fixed for I/O APIC-generated MSIs. Fixes: 577c470f43 ("x86_iommu/amd:

Re: [PATCH] target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC

2023-09-20 Thread Yang, Weijiang
On 9/20/2023 11:41 PM, Paolo Bonzini wrote: On parts that enumerate IA32_VMX_BASIC MSR bit as 1, any exception vector can be delivered with or without an error code if the other consistency checks are satisfied. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 1 + target/i386/cpu.h | 1

RE: [PATCH v2 4/4] vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation

2023-09-20 Thread Liu, Jing2
Hi Cédric, > On 9/19/2023 11:21 PM, Cédric Le Goater wrote: > > On 9/18/23 11:45, Jing Liu wrote: > > During migration restoring, vfio_enable_vectors() is called to restore > > enabling MSI-X interrupts for assigned devices. It sets the range from > > 0 to nr_vectors to kernel to enable MSI-X and

Re: [virtio-dev] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Chen, Jiqian
Hi Jason, On 2023/9/21 12:22, Jason Wang wrote: > On Tue, Sep 19, 2023 at 7:43 PM Jiqian Chen wrote: >> >> When guest vm does S3, Qemu will reset and clear some things of virtio >> devices, but guest can't aware that, so that may cause some problems. >> For excample, Qemu calls virtio_reset->virt

Re: [PATCH v2 0/6] target/riscv: Add RISC-V Virtual IRQs and IRQ filtering support

2023-09-20 Thread Rajnesh Kanwal
Hey Daniel, Sorry I was on holiday. There is no new work on this AFAIK. I will rebase and send a new version for this shortly. Thanks Rajnesh On Wed, Sep 6, 2023 at 3:38 PM Daniel Henrique Barboza wrote: > > Hey, > > > What's the latest on this work? It seems that all patches are acked: > > htt

Re: [PATCH 2/3] backends: Initial support for SPDM socket support

2023-09-20 Thread Alistair Francis
On Mon, Sep 18, 2023 at 8:28 PM Jonathan Cameron wrote: > > On Mon, 18 Sep 2023 13:16:01 +1000 > Alistair Francis wrote: > > > On Sat, Sep 16, 2023 at 1:19 AM Jonathan Cameron > > wrote: > > > > > > On Fri, 15 Sep 2023 21:27:22 +1000 > > > Alistair Francis wrote: > > > > > > > From: Huai-Cheng

Re: [PATCH v1 13/22] vfio: Add base container

2023-09-20 Thread Eric Auger
Hi, On 9/21/23 05:35, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Sent: Thursday, September 21, 2023 1:31 AM >> Subject: Re: [PATCH v1 13/22] vfio: Add base container >> >> Hi Zhenzhong, >> >> On 9/19/23 19:23, Cédric Le Goater wrote: >>> On 8/30/23 1

RE: [PATCH v1 07/22] vfio/common: Refactor vfio_viommu_preset() to be group agnostic

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Sent: Thursday, September 21, 2023 6:51 AM >Subject: Re: [PATCH v1 07/22] vfio/common: Refactor vfio_viommu_preset() to >be group agnostic > >On Wed, 30 Aug 2023 18:37:39 +0800 >Zhenzhong Duan wrote: > >> So that it doesn't need to be moved i

[PATCH] plugins/hotblocks: Fix potential deadlock in plugin_exit() function

2023-09-20 Thread Cong Liu
This patch fixes a potential deadlock in the plugin_exit() function of QEMU. The original code does not release the lock mutex if it is NULL. This patch adds a check for it being NULL and releases the mutex in that case. Signed-off-by: Cong Liu --- contrib/plugins/hotblocks.c | 2 ++ 1 file chan

Re: [PATCH v2 2/7] migration: Clean up local variable shadowing

2023-09-20 Thread Zhijian Li (Fujitsu)
On 21/09/2023 02:31, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename variables. > > Sig

RE: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Sent: Thursday, September 21, 2023 5:40 AM >Subject: Re: [PATCH v1 05/22] vfio/common: Extract out >vfio_kvm_device_[add/del]_fd > >On Wed, 30 Aug 2023 18:37:37 +0800 >Zhenzhong Duan wrote: > >> ...which will be used by both legacy and iommuf

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
Eric Blake writes: > On Wed, Sep 20, 2023 at 08:31:49PM +0200, Markus Armbruster wrote: > ... >> The only reliable way to prevent unintended variable name capture is >> -Wshadow. >> >> One blocker for enabling it is shadowing hiding in function-like >> macros like >> >> qdict_put(dict, "na

Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-20 Thread Jason Wang
On Tue, Sep 19, 2023 at 7:43 PM Jiqian Chen wrote: > > When guest vm does S3, Qemu will reset and clear some things of virtio > devices, but guest can't aware that, so that may cause some problems. > For excample, Qemu calls virtio_reset->virtio_gpu_gl_reset when guest > resume, that function will

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 9:02 PM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On 9/20/23 14:51, Jason Gunthorpe wrote: >> On Wed, Sep 20, 2023 at 02:19:42PM +0200, Cédric Le Goater wrote: >>> On 9/20/23 05:42, Duan

[PATCH] eeprom_at24c: Model 8-bit data addressing for 16-bit devices

2023-09-20 Thread Andrew Jeffery
It appears some (many?) EEPROMs that implement 16-bit data addressing will accept an 8-bit address and clock out non-uniform data for the read. This behaviour is exploited by an EEPROM detection routine in part of OpenBMC userspace with a reasonably broad user base: https://github.com/openbmc/enti

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Gunthorpe >Sent: Thursday, September 21, 2023 2:20 AM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On Wed, Sep 20, 2023 at 12:17:24PM -0600, Alex Williamson wrote: > >> > The iommufd design requires one open of the /dev/iommu to be shar

RE: [PATCH v1 13/22] vfio: Add base container

2023-09-20 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Thursday, September 21, 2023 1:31 AM >Subject: Re: [PATCH v1 13/22] vfio: Add base container > >Hi Zhenzhong, > >On 9/19/23 19:23, Cédric Le Goater wrote: >> On 8/30/23 12:37, Zhenzhong Duan wrote: >>> From: Yi Liu >>> >>> Abstract th

RE: [PATCH v1 13/22] vfio: Add base container

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 9:54 PM >Subject: Re: [PATCH v1 13/22] vfio: Add base container > >Hi Cedric, > >On 9/19/23 19:23, Cédric Le Goater wrote: >> On 8/30/23 12:37, Zhenzhong Duan wrote: >>> From: Yi Liu >>> >>> Abstract the VFIOCont

RE: [PATCH v1 09/22] vfio/container: Introduce vfio_[attach/detach]_device

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 9:33 PM >Subject: Re: [PATCH v1 09/22] vfio/container: Introduce >vfio_[attach/detach]_device > >Hi Zhenzhong, > >In the commit title I would replace vfio/container by vfio/pci to match >next patches Make sense,

RE: [PATCH v1 08/22] vfio/common: Move legacy VFIO backend code into separate container.c

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 9:12 PM >Subject: Re: [PATCH v1 08/22] vfio/common: Move legacy VFIO backend code >into separate container.c > >Hi, > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> From: Yi Liu >> >> Move all the code really depend

RE: [PATCH v1 07/22] vfio/common: Refactor vfio_viommu_preset() to be group agnostic

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 9:01 PM >Subject: Re: [PATCH v1 07/22] vfio/common: Refactor vfio_viommu_preset() to >be group agnostic > > > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> So that it doesn't need to be moved into container.c as don

RE: [PATCH v1 13/22] vfio: Add base container

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 8:58 PM >Subject: Re: [PATCH v1 13/22] vfio: Add base container > >On 9/20/23 10:48, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédric Le Goater >>> Sent: Wednesday, September 20,

RE: [PATCH v1 17/22] util/char_dev: Add open_cdev()

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Sent: Wednesday, September 20, 2023 8:39 PM >Subject: Re: [PATCH v1 17/22] util/char_dev: Add open_cdev() > >On Wed, Aug 30, 2023 at 06:37:49PM +0800, Zhenzhong Duan wrote: >> From: Yi Liu >> >> /dev/vfio/devices/vfioX may not exist. In tha

RE: [PATCH v1 06/22] vfio/common: Add a vfio device iterator

2023-09-20 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 8:26 PM >Subject: Re: [PATCH v1 06/22] vfio/common: Add a vfio device iterator > >Hi Zhenzhong, > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> With a vfio device iterator added, we can make some migration a

RE: [PATCH v1 06/22] vfio/common: Add a vfio device iterator

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Subject: Re: [PATCH v1 06/22] vfio/common: Add a vfio device iterator > >On Wed, 30 Aug 2023 18:37:38 +0800 >Zhenzhong Duan wrote: > >> With a vfio device iterator added, we can make some migration and reset >> related functions group agnosti

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, September 20, 2023 8:20 PM >Subject: Re: [PATCH v1 15/22] Add iommufd configure option > >On 9/20/23 05:42, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédric Le Goater >>> Sent: Wednesday, September

RE: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-20 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Wednesday, September 20, 2023 7:49 PM >Subject: Re: [PATCH v1 05/22] vfio/common: Extract out >vfio_kvm_device_[add/del]_fd > >Hi Zhenzhong, > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> ...which will be used by both legacy and iommufd backend

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-20 Thread Zhijian Li (Fujitsu)
Sorry to all, i forgot to update my email address to lizhij...@fujitsu.com. Corrected it. On 20/09/2023 17:04, Li Zhijian wrote: > From: Li Zhijian > > Destination will fail with: > qemu-system-x86_64: rdma: Too many requests in this message > (3638950032).Bailing. > > migrate with RDMA is d

Re: [PATCH 2/2] migration/rdma: zore out head.repeat to make the error more clear

2023-09-20 Thread Zhijian Li (Fujitsu)
On 20/09/2023 21:01, Fabiano Rosas wrote: > Li Zhijian writes: > >> From: Li Zhijian >> >> Previously, we got a confusion error that complains >> the RDMAControlHeader.repeat: >> qemu-system-x86_64: rdma: Too many requests in this message >> (3638950032).Bailing. >> >> Actually, it's caused b

[PATCH v3 0/1] Qemu crashes on VM migration after an handled memory error

2023-09-20 Thread “William Roche
From: William Roche A Qemu VM can survive a memory error, as qemu can relay the error to the VM kernel which could also deal with it -- poisoning/off-lining the impacted page. This situation creates a hole in the VM memory address space that the VM kernel knows about (an unreadable page or set of

[PATCH v3 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-20 Thread “William Roche
From: William Roche A memory page poisoned from the hypervisor level is no longer readable. Thus, it is now treated as a zero-page for the ram saving migration phase. The migration of a VM will crash Qemu when it tries to read the memory address space and stumbles on the poisoned page with a sim

Re: [PATCH v1 07/22] vfio/common: Refactor vfio_viommu_preset() to be group agnostic

2023-09-20 Thread Alex Williamson
On Wed, 30 Aug 2023 18:37:39 +0800 Zhenzhong Duan wrote: > So that it doesn't need to be moved into container.c as done > in following patch. > > Signed-off-by: Zhenzhong Duan > --- > hw/vfio/common.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/h

[PATCH v2 09/11] hw/net: GMAC Rx Implementation

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - Implementation of Receive function for packets - Implementation for reading and writing from and to descriptors in memory for Rx NOTE: At this point in development we believe this function is working as intended, and the kernel supports these findings, but we need th

[PATCH v2 10/11] hw/net: GMAC Tx Implementation

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - Implementation of Transmit function for packets - Implementation for reading and writing from and to descriptors in memory for Tx NOTE: This function implements the steps detailed in the datasheet for transmitting messages from the GMAC. Signed-off-by: Nabih Estefan

[PATCH v2 11/11] tests/qtest: Adding PCS Module test to GMAC Qtest

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - Add PCS Register check to npcm_gmac-test Signed-off-by: Nabih Estefan Diaz --- tests/qtest/npcm_gmac-test.c | 134 ++- 1 file changed, 133 insertions(+), 1 deletion(-) diff --git a/tests/qtest/npcm_gmac-test.c b/tests/qtest/npcm_gmac

[PATCH v2 08/11] hw/net: General GMAC Implementation

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - General GMAC Register handling - GMAC IRQ Handling - Added traces in some methods for debugging - Lots of declarations for accessing information on GMAC Descriptors (npcm_gmac.h file) NOTE: With code on this state, the GMAC can boot-up properly and will show up in th

[PATCH v2 05/11] hw/arm: Add GMAC devices to NPCM7XX SoC

2023-09-20 Thread Nabih Estefan
From: Hao Wu Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 36 ++-- include/hw/arm/npcm7xx.h | 2 ++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c index c9e87162cb..12e11250e1 100644 --- a/hw/arm/npcm7

[PATCH v2 06/11] \tests/qtest: Creating qtest for GMAC Module

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - Created qtest to check initialization of registers in GMAC Module. - Implemented test into Build File. Signed-off-by: Nabih Estefan Diaz --- tests/qtest/meson.build | 11 +- tests/qtest/npcm_gmac-test.c | 209 +++ 2 files chang

[PATCH v2 04/11] hw/net: Add NPCMXXX GMAC device

2023-09-20 Thread Nabih Estefan
From: Hao Wu This patch implements the basic registers of GMAC device. Actual network communications are not supported yet. Signed-off-by: Hao Wu include/hw: Fix type problem in NPCMGMACState - Fix type problem in NPCMGMACState - Fix Register Initalization which was breaking boot-up in driver

[PATCH v2 01/11] hw/misc: Add Nuvoton's PCI Mailbox Module

2023-09-20 Thread Nabih Estefan
From: Hao Wu The PCI Mailbox Module is a high-bandwidth communcation module between a Nuvoton BMC and CPU. It features 16KB RAM that are both accessible by the BMC and core CPU. and supports interrupt for both sides. This patch implements the BMC side of the PCI mailbox module. Communication wit

[PATCH v2 07/11] include/hw/net: Implemented Classes and Masks for GMAC Descriptors

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz - Implemeted classes for GMAC Receive and Transmit Descriptors - Implemented Masks for said descriptors Signed-off-by: Nabih Estefan Diaz --- hw/net/npcm_gmac.c | 183 +++ hw/net/trace-events | 9 ++ include/hw/net

[PATCH v2 03/11] hw/misc: Add qtest for NPCM7xx PCI Mailbox

2023-09-20 Thread Nabih Estefan
From: Hao Wu This patches adds a qtest for NPCM7XX PCI Mailbox module. It sends read and write requests to the module, and verifies that the module contains the correct data after the requests. Signed-off-by: Hao Wu --- tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_pci_mbox-

[PATCH v2 02/11] hw/arm: Add PCI mailbox module to Nuvoton SoC

2023-09-20 Thread Nabih Estefan
From: Hao Wu This patch wires the PCI mailbox module to Nuvoton SoC. Google-Rebase-Count: 5 Google-Bug-Id: 262938292 Signed-off-by: Hao Wu Change-Id: Ifd858a7ed760557faa15a7a1cef66b2056f06e2e --- docs/system/arm/nuvoton.rst | 2 ++ hw/arm/npcm7xx.c| 3 ++- include/hw/arm/npcm7xx.h

[PATCH v2 00/11] Implementation of NPI Mailbox and GMAC Networking Module

2023-09-20 Thread Nabih Estefan
From: Nabih Estefan Diaz [Changes since v1] Fixed some errors in formatting. Fixed a merge error that I didn't see in v1. Removed Nuvoton 8xx references since that is a separate patch set. [Original Cover] Creates NPI Mailbox Module with data verification for read and write (internal and extern

Re: [PATCH v1 06/22] vfio/common: Add a vfio device iterator

2023-09-20 Thread Alex Williamson
On Wed, 30 Aug 2023 18:37:38 +0800 Zhenzhong Duan wrote: > With a vfio device iterator added, we can make some migration and reset > related functions group agnostic. > E.x: > vfio_mig_active > vfio_migratable_device_num > vfio_devices_all_dirty_tracking > vfio_devices_all_device_dirty_tracking >

Re: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-20 Thread Alex Williamson
On Wed, 30 Aug 2023 18:37:37 +0800 Zhenzhong Duan wrote: > ...which will be used by both legacy and iommufd backend. +1 to Eric's comments regarding complete sentences in the commit log and suggested description. > > Signed-off-by: Yi Liu > Signed-off-by: Zhenzhong Duan > --- > hw/vfio/comm

[PATCH 3/8] target/riscv/kvm/kvm-cpu.c: add missing property getters()

2023-09-20 Thread Daniel Henrique Barboza
We got along without property getters in the KVM driver because we never needed them. But the incoming query-cpu-model-expansion API will use property getters and setters to retrieve the CPU characteristics. Add the missing getters for the KVM driver for both MISA and multi-letter extension proper

[PATCH 1/8] target/riscv: add riscv_cpu_get_name()

2023-09-20 Thread Daniel Henrique Barboza
We'll introduce generic errors that will output a CPU type name via its RISCVCPU pointer. Create a helper for that. Use the helper in tcg_cpu_realizefn() instead of hardcoding the 'host' CPU name. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 11 +++ target/ris

[PATCH 5/8] target/riscv/tcg: add tcg_cpu_finalize_features()

2023-09-20 Thread Daniel Henrique Barboza
The query-cpu-model-expansion API is capable of passing extra properties to a given CPU model and tell callers if this custom configuration is valid. The RISC-V version of the API is not quite there yet. The reason is the realize() flow in the TCG driver, where most of the validation is done in tc

[PATCH 2/8] target/riscv/tcg-cpu.c: add extension properties for all cpus

2023-09-20 Thread Daniel Henrique Barboza
At this moment we do not expose extension properties for vendor CPUs because that would allow users to change them via command line. But that comes at a cost: if we were to add an API that shows all CPU properties, e.g. qmp-query-cpu-model-expansion, we won't be able to show the extension state of

[PATCH 7/8] target/riscv: add riscv_cpu_accelerator_compatible()

2023-09-20 Thread Daniel Henrique Barboza
Add an API to check if a given CPU is compatible with the current accelerator. This will allow query-cpu-model-expansion to work properly in conditions where QEMU supports both accelerators (TCG and KVM), QEMU is then launched using TCG, and the API requests information about a KVM only CPU (e.g.

[PATCH 8/8] target/riscv/riscv-qmp-cmds.c: check CPU accel in query-cpu-model-expansion

2023-09-20 Thread Daniel Henrique Barboza
Use the recently added API to filter unavailable CPUs for a given accelerator. At this moment this is the case for a QEMU built with KVM and TCG support querying a binary running with TCG: qemu-system-riscv64 -S -M virt,accel=tcg -display none -qmp tcp:localhost:1234,server,wait=off ./qemu/sc

[PATCH 0/8] riscv: query-cpu-model-expansion API

2023-09-20 Thread Daniel Henrique Barboza
Based-on: 20230920112020.651006-1-dbarb...@ventanamicro.com ("[PATCH v3 00/19] riscv: split TCG/KVM accelerators from cpu.c") Hi, The parent series is in a more stable state so I decided to go ahead and post this work. This series implements query-cpu-model-expansion for RISC-V. The implementati

[PATCH 6/8] target/riscv: handle custom props in qmp_query_cpu_model_expansion

2023-09-20 Thread Daniel Henrique Barboza
Callers can add 'props' when querying for a cpu model expansion to see if a given CPU model supports a certain criteria, and what's the resulting CPU object. If we have 'props' to handle, gather it in a QDict and use the new riscv_cpuobj_validate_qdict_in() helper to validate it. This helper will

[PATCH 4/8] qapi,risc-v: add query-cpu-model-expansion

2023-09-20 Thread Daniel Henrique Barboza
This API is used to inspect the characteristics of a given CPU model. It also allows users to validate a CPU model with a certain configuration, e.g. if "-cpu X,a=true,b=false" is a valid setup for a given QEMU binary. We'll start implementing the first part. The second requires more changes in RIS

Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section

2023-09-20 Thread Alex Bennée
Michael Tokarev writes: > 09.09.2023 13:27, Michael Tokarev wrote: >> From: Richard Henderson >> Acked-by: Alex Bennée >> Suggested-by: Alex Bennée >> Signed-off-by: Richard Henderson >> (cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc) >> Signed-off-by: Michael Tokarev

[PULL v3 0/9] testing updates (back to green!)

2023-09-20 Thread Alex Bennée
The following changes since commit 4907644841e3200aea6475c0f72d3d987e9f3d93: Merge tag 'mem-2023-09-19' of https://github.com/davidhildenbrand/qemu into staging (2023-09-19 13:22:19 -0400) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-testing-200923-1

Re: stable-8.1.1: which bug do we keep?

2023-09-20 Thread Michael Tokarev
20.09.2023 12:17, Daniel P. Berrangé wrote: On Wed, Sep 20, 2023 at 07:46:36AM +0300, Michael Tokarev wrote: Hi! I'm in somewhat doubt what to do with 8.1.1 release. There are 2 compelling issues, fixing one discovers the other. https://gitlab.com/qemu-project/qemu/-/issues/1864 "x86 VM with

Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section

2023-09-20 Thread Alex Bennée
Michael Tokarev writes: > 18.09.2023 12:19, Michael Tokarev wrote: >> 09.09.2023 13:27, Michael Tokarev wrote: >>> From: Richard Henderson >>> >>> Acked-by: Alex Bennée >>> Suggested-by: Alex Bennée >>> Signed-off-by: Richard Henderson >>> (cherry picked from commit 86e4f93d827d3c1efd00cd8a

Re: [PATCH v4 00/14] simpletrace: refactor and general improvements

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:15AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > I wanted to use simpletrace.py for an internal project, so I tried to update > and polish the code. Some of the commits resolve specific issues, while some > are more subjective. Hi Mads, Apologies for the very

Re: [PULL 00/22] implement discard operation for Parallels images

2023-09-20 Thread Denis V. Lunev
On 9/20/23 19:55, Stefan Hajnoczi wrote: On Wed, 20 Sept 2023 at 05:22, Denis V. Lunev wrote: The following changes since commit 4907644841e3200aea6475c0f72d3d987e9f3d93: Merge tag 'mem-2023-09-19' of https://github.com/davidhildenbrand/qemu into staging (2023-09-19 13:22:19 -0400) are av

Re: [PATCH v4 14/14] scripts/analyse-locks-simpletrace.py: changed iteritems() to items()

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:29AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This > means the script curerntly doesn't work on Python 3. > > Signed-off-by: Mads Ynddal > --- > scripts/analyse-locks-simpletrace.py | 2 +- >

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

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:28AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > In my work to refactor simpletrace.py, I noticed that there's no > maintainer of it, and has the status of "odd fixes". I'm using it from > time to time, so I'd like to maintain the script. > > I've added myself

Re: [PATCH v1 15/22] Add iommufd configure option

2023-09-20 Thread Alex Williamson
On Wed, 20 Sep 2023 15:12:59 -0300 Jason Gunthorpe wrote: > On Wed, Sep 20, 2023 at 12:01:42PM -0600, Alex Williamson wrote: > > On Wed, 20 Sep 2023 03:42:20 + > > "Duan, Zhenzhong" wrote: > > > > > >-Original Message- > > > >From: Cédric Le Goater > > > >Sent: Wednesday, Septemb

Re: [PATCH v4 12/14] simpletrace: added simplified Analyzer2 class

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:27AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > By moving the dynamic argument construction to keyword-arguments, > we can remove all of the specialized handling, and streamline it. > If a tracing method wants to access these, they can define the > kwargs, or

Re: [PATCH v4 12/14] simpletrace: added simplified Analyzer2 class

2023-09-20 Thread Stefan Hajnoczi
On Wed, Sep 06, 2023 at 09:57:32AM +0100, Daniel P. Berrangé wrote: > On Wed, Sep 06, 2023 at 10:32:14AM +0200, Mads Ynddal wrote: > > > > > AFAIK, we don't consider simpletrace.py python code to be a > > > supported public API, just a command line tool. > > > > > > IOW, we can change the python

Re: [PATCH RFC] vfio/common: Add an option to relax vIOMMU migration blocker

2023-09-20 Thread Joao Martins
On 08/09/2023 13:05, Joao Martins wrote: > Add an option 'x-migration-iommu-pt' to VFIO that allows it to relax > whether the vIOMMU usage blocks the migration. The current behaviour > is kept and we block migration in the following conditions: > > * By default if the guest does try to use vIOMMU

Re: [PATCH v4 11/14] simpletrace: move event processing to Analyzer class

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:26AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Moved event processing to the Analyzer class to separate specific analyzer > logic (like caching and function signatures) from the _process function. > This allows for new types of Analyzer-based subclasses witho

Re: [PATCH v4 10/14] simpletrace: move logic of process into internal function

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:25AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > To avoid duplicate code depending on input types and to better handle > open/close of log with a context-manager, we move the logic of process into > _process. > > Signed-off-by: Mads Ynddal > --- > scripts/si

Re: [PATCH v4 09/14] simpletrace: refactor to separate responsibilities

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:24AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Moved event_mapping and event_id_to_name down one level in the function > call-stack to keep variable instantiation and usage closer (`process` > and `run` has no use of the variables; `read_trace_records` does).

Re: [PATCH v4 08/14] simpletrace: made Analyzer into context-manager

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:23AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Instead of explicitly calling `begin` and `end`, we can change the class > to use the context-manager paradigm. This is mostly a styling choice, > used in modern Python code. But it also allows for more advanced

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Eric Blake
On Wed, Sep 20, 2023 at 08:31:49PM +0200, Markus Armbruster wrote: ... > The only reliable way to prevent unintended variable name capture is > -Wshadow. > > One blocker for enabling it is shadowing hiding in function-like > macros like > > qdict_put(dict, "name", qobject_ref(...)) > > qdic

Re: [PATCH v4 07/14] simpletrace: define exception and add handling

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:22AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Define `SimpleException` to differentiate our exceptions from generic > exceptions (IOError, etc.). Adapted simpletrace to support this and > output to stderr. > > Signed-off-by: Mads Ynddal > Reviewed-by: Phil

Re: [PULL v2 0/8] Hppa btlb patches

2023-09-20 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/57] loongarch-to-apply queue

2023-09-20 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 12/12] vfio: Remove 64-bit IOVA address space assumption

2023-09-20 Thread Alex Williamson
On Wed, 13 Sep 2023 10:01:47 +0200 Eric Auger wrote: > Now we retrieve the usable IOVA ranges from the host, > we now the physical IOMMU aperture and we can remove > the assumption of 64b IOVA space when calling > vfio_host_win_add(). > > This works fine in general but in case of an IOMMU memory

Re: [PATCH v4 06/14] simpletrace: improved error handling on struct unpack

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:21AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > A failed call to `read_header` wouldn't be handled the same for the two > different code paths (one path would try to use `None` as a list). > Changed to raise exception to be handled centrally. This also allows

Re: [PATCH v4 04/14] simpletrace: changed naming of edict and idtoname to improve readability

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:19AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > Readability is subjective, but I've expanded the naming of the variables > and arguments, to help with understanding for new eyes on the code. > > Signed-off-by: Mads Ynddal > Reviewed-by: Philippe Mathieu-Daud

Re: [PATCH v2 28/28] bsd-user: Implement pdfork(2) system call.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:40 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Acked-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 32 > bsd-user/freebsd/os-syscall.c | 4 > 2 files chan

Re: [PATCH v2 27/28] bsd-user: Implement rfork(2) system call.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 39 +++ > bsd-user/freebsd/os-syscall.c | 4 > 2 file

Re: [PATCH v2 26/28] bsd-user: Implement fork(2) and vfork(2) system calls.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 34 ++ > bsd-user/freebsd/os-syscall.c | 8 > 2 f

Re: [PATCH v2 25/28] bsd-user: Implement pdgetpid(2) and the undocumented setugid.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 23 +++ > bsd-user/freebsd/os-syscall.c | 8 > 2 files change

Re: [PATCH v2 24/28] bsd-user: Implement setloginclass(2) and getloginclass(2) system calls.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 32 > bsd-user/freebsd/os-syscall.c | 8 > 2 fil

Re: [PATCH v2 23/28] bsd-user: Implement wait4(2) and wait6(2) system calls.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 77 +++ > bsd-user/freebsd/os-syscall.c | 15 +++ > 2 f

Re: [PATCH v2 22/28] bsd-user: Implement execve(2) and fexecve(2) system calls.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/os-proc.h| 49 +++ > bsd-user/freebsd/os-syscall.c | 11 +++- > 2 files changed, 59 inse

Re: [PATCH v2 21/28] bsd-user: Implement procctl(2) along with necessary conversion functions.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Implement t2h_procctl_cmd, h2t_reaper_status, h2t_reaper_pidinfo and > h2t/t2h reaper_kill conversion functions. > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > --- > bsd-user/freebsd/os-proc.c| 223

Re: [PATCH v2 20/28] bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > --- > bsd-user/freebsd/os-proc.c | 177 + > bsd-user/main.c| 2 +- > bsd-user/qemu.h| 1 + > 3 file

Re: [PATCH v4 03/14] simpletrace: improve parsing of sys.argv; fix files never closed.

2023-09-20 Thread Stefan Hajnoczi
On Wed, Aug 23, 2023 at 10:54:18AM +0200, Mads Ynddal wrote: > From: Mads Ynddal > > The arguments extracted from `sys.argv` named and unpacked to make it > clear what the arguments are and what they're used for. > > The two input files were opened, but never explicitly closed. File usage > chan

Re: [PATCH v2 19/28] bsd-user: Implement get_filename_from_fd.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/freebsd/meson.build | 1 + > bsd-user/freebsd/os-proc.c | 80 > 2 files changed, 81 insertions(+

Re: [PATCH v2 18/28] bsd-user: Implement getpriority(2) and setpriority(2).

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > --- > bsd-user/bsd-proc.h | 24 > bsd-user/freebsd/os-syscall.c | 8 > 2 files changed, 32 insertions(+) > Reviewed-b

Re: [PATCH v2 17/28] bsd-user: Add stubs for profil(2), ktrace(2), utrace(2) and ptrace(2).

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/bsd-proc.h | 28 > bsd-user/freebsd/os-syscall.c | 16 > 2

Re: [PATCH v2 16/28] bsd-user: Implement get/set[resuid/resgid/sid] and issetugid.

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/bsd-proc.h | 76 +++ > bsd-user/freebsd/os-syscall.c | 28 +

Re: [PATCH v2 15/28] bsd-user: Implement several get/set system calls:

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > getpid(2), getppid(2), getpgrp(2) > setreuid(2), setregid(2) > getuid(2), geteuid(2), getgid(2), getegid(2), getpgid(2) > setuid(2), seteuid(2), setgid(2), setegid(2), setpgid(2) > > Signed-off-by: Stacey Son > Signed-off

Re: [PATCH v2 14/28] bsd-user: Implement getrlimit(2) and setrlimit(2)

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/bsd-proc.h | 59 +++ > bsd-user/freebsd/os-syscall.c | 8 + > 2 fil

Re: [PATCH 10/21] q800: add easc bool machine class property to switch between ASC and EASC

2023-09-20 Thread Markus Armbruster
Mark Cave-Ayland writes: > On 11/09/2023 06:15, Markus Armbruster wrote: > >> Philippe Mathieu-Daudé writes: [...] >>> I'm not sure when we want a write-only QOM boolean property, so I >>> genuinely ask, since I agree introspecting QOM object fields from >>> the monitor is helpful. >> >> I sus

Re: [PATCH v2 13/28] bsd-user: Implement getrusage(2).

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/bsd-proc.h | 13 + > bsd-user/freebsd/os-syscall.c | 4 > 2 files changed, 17 insertio

Re: [PATCH v2 12/28] bsd-user: Implement umask(2), setlogin(2) and getlogin(2)

2023-09-20 Thread Warner Losh
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha wrote: > From: Stacey Son > > Signed-off-by: Stacey Son > Signed-off-by: Karim Taha > Reviewed-by: Richard Henderson > --- > bsd-user/bsd-proc.h | 39 +++ > bsd-user/freebsd/os-syscall.c | 12 +++ >

[PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-20 Thread Markus Armbruster
Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \ int ret = (exp);

[PATCH v2 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-20 Thread Markus Armbruster
qemu_rdma_save_page() reports polling error with error_report(), then succeeds anyway. This is because the variable holding the polling status *shadows* the variable the function returns. The latter remains zero. Broken since day one, and duplicated more recently. Fixes: 2da776db4846 (rdma: cor

[PATCH v2 3/7] ui: Clean up local variable shadowing

2023-09-20 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell -

  1   2   3   >