[PATCH RFC 1/2] hw/arm: Add minimal support for the STM32L475VG SoC

2023-11-15 Thread ~inesvarhol
From: Inès Varhol This patch adds a new STM32L475VG SoC, it is necessary to add support for the B-L475E-IOT01A board. The implementation is derived from the STM32F405 SoC. The implementation contains no peripherals, only memory regions are implemented. Signed-off-by: Arnaud Minier

Re: [PATCH trivial 13/21] hw/net/cadence_gem.c: spelling fixes: Octects

2023-11-15 Thread Luc Michel
On 19:58 Tue 14 Nov , Michael Tokarev wrote: > Fixes: c755c943aa2e "hw/net/cadence_gem: use REG32 macro for register > definitions" > Cc: Luc Michel > Cc: Peter Maydell > Signed-off-by: Michael Tokarev Reviewed-by: Luc Michel > --- > hw/net/cadence_gem.c | 8 > 1 file changed,

[PATCH RFC 2/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-15 Thread ~inesvarhol
From: Inès Varhol This commit adds a new B-L475E-IOT01A board using the STM32L475VG SoC. The implementation is derived from the Netduino Plus 2 machine. There are no peripherals implemented, only memory regions. Signed-off-by: default avatarArnaud Minier Signed-off-by: Inès Varhol ---

[PATCH RFC 0/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-15 Thread ~inesvarhol
This patch allows to emulate the B-L475E-IOT01A ARM Cortex-M4 board. This is RFC since the implementation isn't complete yet, there are no implemented peripherals, and it's a first contribution to QEMU. Inès Varhol (2): hw/arm: Add minimal support for the STM32L475VG SoC hw/arm: Add minimal

Re: [PATCH trivial 06/21] docs/devel/migration.rst: spelling fix: doen't

2023-11-15 Thread Michael Tokarev
15.11.2023 09:46, Thomas Huth: .. The "really-really-fixed" one (without resending): -  This combination is not possible as the qemu-5.1 doen't understand +  This combination is not possible as the qemu-5.1 doesn't understand     pc-5.2 machine type.  So nothing to worry here. ;) Actually

Re: [PATCH for-8.2] linux-user: Fix loaddr computation for some elf files

2023-11-15 Thread Michael Tokarev
14.11.2023 23:17, Richard Henderson: The file offset of the load segment is not relevant to the low address, only the beginning of the virtual address page. Cc: qemu-sta...@nongnu.org Fixes: a93934fecd4 ("elf: take phdr offset into account when calculating the program load address") Resolves:

Re: [PATCH v5 02/31] target/hppa: Remove object_class_is_abstract()

2023-11-15 Thread BALATON Zoltan
On Wed, 15 Nov 2023, Gavin Shan wrote: No need to check if @oc is abstract because it has been covered by cpu_class_by_name(). Signed-off-by: Gavin Shan --- target/hppa/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 04de1689d7..fc4d2abad7

Re: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init

2023-11-15 Thread Cédric Le Goater
On 11/15/23 09:32, Zhenzhong Duan wrote: Some of the VFIODevice initializations is in vfio_realize, move all of them in vfio_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 10 ++ 1 file changed, 6

Re: [PATCH v6 03/21] vfio/common: return early if space isn't empty

2023-11-15 Thread Eric Auger
On 11/14/23 11:09, Zhenzhong Duan wrote: > This is a trivial optimization. If there is active container in space, > vfio_reset_handler will never be unregistered. So revert the check of > space->containers and return early. > > Signed-off-by: Zhenzhong Duan Reviewed-by: Eric Auger Thanks

[PATCH] docs/system: Add recommendations to Hyper-V enlightenments doc

2023-11-15 Thread Vitaly Kuznetsov
While hyperv.rst already has all currently implemented Hyper-V enlightenments documented, it may be unclear what is the recommended set to achieve the best result. Add the corresponding section to the doc. Signed-off-by: Vitaly Kuznetsov --- docs/system/i386/hyperv.rst | 30

Re: [PATCH] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2023-11-15 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > From: Leonid Kaplan > > BLOCK_IO_ERROR events comes from guest, so we must throttle them. Really? Can you describe how a guest can trigger these errors? > We still want per-device throttling, so let's use device id as a key. > > Signed-off-by: Leonid

Re: [PATCH v3 1/2] qom: new object to associate device to numa node

2023-11-15 Thread Markus Armbruster
writes: > From: Ankit Agrawal > > NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows > partitioning of the GPU device resources (including device memory) into > several (upto 8) isolated instances. Each of the partitioned memory needs > a dedicated NUMA node to operate. The

[PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init

2023-11-15 Thread Zhenzhong Duan
Some of the VFIODevice initializations is in vfio_realize, move all of them in vfio_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH 2/4] vfio/platform: Move VFIODevice initializations in vfio_platform_instance_init

2023-11-15 Thread Zhenzhong Duan
Some of the VFIODevice initializations is in vfio_platform_realize, move all of them in vfio_platform_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/platform.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 4/4] vfio/ccw: Move VFIODevice initializations in vfio_ccw_instance_init

2023-11-15 Thread Zhenzhong Duan
Some of the VFIODevice initializations is in vfio_ccw_realize, move all of them in vfio_ccw_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/ccw.c | 30 +++--- 1 file changed, 15 insertions(+), 15

[PATCH 0/4] VFIO device init cleanup

2023-11-15 Thread Zhenzhong Duan
Hi, This is a clean up based on Cedric's suggestion at https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg02722.html VFIO device initializations are all moved from realize to instance_init. Based on https://github.com/legoater/qemu/commits/vfio-8.2 Thanks Zhenzhong Zhenzhong Duan (4):

[PATCH RESEND v2 2/2] i386: Exclude 'hv-syndbg' from 'hv-passthrough'

2023-11-15 Thread Vitaly Kuznetsov
Windows with Hyper-V role enabled doesn't boot with 'hv-passthrough' when no debugger is configured, this significantly limits the usefulness of the feature as there's no support for subtracting Hyper-V features from CPU flags at this moment (e.g. "-cpu host,hv-passthrough,-hv-syndbg" does not

Re: [PATCH] softmmu/memory: use memcpy for multi-byte accesses

2023-11-15 Thread Peter Maydell
On Tue, 14 Nov 2023 at 21:18, Richard Henderson wrote: > > On 11/14/23 12:55, Patrick Venture wrote: > > Avoids unaligned pointer issues. > > > > Reviewed-by: Chris Rauer > > Reviewed-by: Peter Foley > > Signed-off-by: Patrick Venture > > --- > > system/memory.c | 16 > > 1

Re: [PATCH v3 18/70] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:27AM -0500, Xiaoyao Li wrote: > KVM provides TDX capabilities via sub command KVM_TDX_CAPABILITIES of > IOCTL(KVM_MEMORY_ENCRYPT_OP). Get the capabilities when initializing > TDX context. It will be used to validate user's setting later. > > Since there is no

Re: [PATCH v1] target/i386/host-cpu: Use IOMMU addr width for passthrough devices on Intel platforms

2023-11-15 Thread Gerd Hoffmann
Hi, > > +if (iommu_phys_bits && phys_bits > iommu_phys_bits) { > > +phys_bits = iommu_phys_bits; > > +if (!warned2) { > > +warn_report("Using physical bits (%u)" > > +" to prevent VFIO mapping failures", > > +

[PATCH 2/2] hw/pci-host: Designware: Add outbound iATU no address match behavior

2023-11-15 Thread Max Hsu
IMX6DQRM Rev4, in chapter 48.3.9.2, specifies for outbound iATU with no address match: 'If there is no address match, then the address is untranslated.' The current model implementation only considers inbound occurrences, neglecting outbound scenarios. To address this, we introduce a new

Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-15 Thread Cédric Le Goater
On 11/15/23 05:06, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Tuesday, November 14, 2023 9:29 PM Subject: Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object On 11/14/23 11:09, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd

Re: [PATCH] monitor: flush messages on abort

2023-11-15 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Nov 03, 2023 at 03:51:00PM -0400, Steven Sistare wrote: >> On 11/3/2023 1:33 PM, Daniel P. Berrangé wrote: >> > On Fri, Nov 03, 2023 at 09:01:29AM -0700, Steve Sistare wrote: >> >> Buffered monitor output is lost when abort() is called. The pattern >> >>

Re: [PATCH v2 3/3] hw/nvme: Add SPDM over DOE support

2023-11-15 Thread Klaus Jensen
On Oct 17 15:21, Alistair Francis wrote: > From: Wilfred Mallawa > > Setup Data Object Exchance (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 Acked-by: Klaus Jensen I have

Re: [PATCH] migration: free 'saddr' since be no longer used

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 11:27:39AM +0800, Zongmin Zhou wrote: > Since socket_parse() will allocate memory for 'saddr', > and its value will pass to 'addr' that allocated > by migrate_uri_parse(),so free 'saddr' to avoid memory leak. > > Fixes: 72a8192e225c ("migration: convert migration 'uri'

Re: [PATCH v3 06/70] kvm: Introduce support for memory_attributes

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:15AM -0500, Xiaoyao Li wrote: > Introduce the helper functions to set the attributes of a range of > memory to private or shared. > > This is necessary to notify KVM the private/shared attribute of each gpa > range. KVM needs the information to decide the GPA needs

Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-15 Thread Eric Auger
Hi Zhenzhong, On 11/14/23 11:09, Zhenzhong Duan wrote: > From: Eric Auger > > Introduce an iommufd object which allows the interaction > with the host /dev/iommu device. > > The /dev/iommu can have been already pre-opened outside of qemu, > in which case the fd can be passed directly along with

[PATCH 0/2] hw/pci-host: Fix Designware no address match behavior

2023-11-15 Thread Max Hsu
IMX6DQRM Rev4, in chapter 48.3.9.1, specifies that iATU is instantiated inside the PCIe core, translating TLPs in and out of the PCIe core. Currently, the model faces issues with TLPs using memory addresses not registered on the iATU. The Designware spec (48.3.9.2 for outbound, 48.3.9.3 for

[PATCH 1/2] hw/pci-host: Designware: Fix inbound iATU no address match behavior

2023-11-15 Thread Max Hsu
IMX6DQRM Rev4, in chapter 48.3.9.3, specifies that for inbound iATU with no address match: 'If there is no match, then the address is untranslated.' The current model implementation registers inbound region 0 as untranslated dummy, intending to serve as a passing medium for the no-match address

Re: [PATCH v3 0/8] Add powernv10 I2C devices and tests

2023-11-15 Thread Cédric Le Goater
Nick, On 11/14/23 20:56, Glenn Miles wrote: This series of patches includes support, tests and fixes for adding PCA9552 and PCA9554 I2C devices to the powernv10 chip. The PCA9552 device is used for PCIe slot hotplug power control and monitoring, while the PCA9554 device is used for presence

Re: [PATCH] softmmu/memory: use memcpy for multi-byte accesses

2023-11-15 Thread Peter Maydell
On Tue, 14 Nov 2023 at 20:55, Patrick Venture wrote: > Avoids unaligned pointer issues. > It would be nice to be more specific in the commit message here, by describing what kind of guest behaviour or machine config runs into this problem, and whether this happens in a situation users are likely

Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-15 Thread Cédric Le Goater
On 11/15/23 13:09, Philippe Mathieu-Daudé wrote: Hi Zhenzhong, On 14/11/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node.

Re: [PATCH] tests/qtest: remove unused variables

2023-11-15 Thread Thomas Huth
On 15/11/2023 09.00, zhujun2 wrote: These variables are never referenced in the code, just remove them Signed-off-by: zhujun2 --- tests/qtest/test-filter-mirror.c | 2 +- tests/qtest/test-filter-redirector.c | 4 ++-- tests/qtest/virtio-net-test.c| 2 +- 3 files changed, 4

Re: [PATCH v3 02/70] RAMBlock: Add support of KVM private guest memfd

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:11AM -0500, Xiaoyao Li wrote: > Add KVM guest_memfd support to RAMBlock so both normal hva based memory > and kvm guest memfd based private memory can be associated in one RAMBlock. > > Introduce new flag RAM_GUEST_MEMFD. When it's set, it calls KVM ioctl to > create

[PATCH RESEND v2 1/2] i386: Fix conditional CONFIG_SYNDBG enablement

2023-11-15 Thread Vitaly Kuznetsov
Putting HYPERV_FEAT_SYNDBG entry under "#ifdef CONFIG_SYNDBG" in 'kvm_hyperv_properties' array is wrong: as HYPERV_FEAT_SYNDBG is not the highest feature number, the result is an empty (zeroed) entry in the array (and not a skipped entry!). hyperv_feature_supported() is designed to check that all

[PATCH RESEND v2 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-11-15 Thread Vitaly Kuznetsov
Changes since v1/v1 RESEND: - No changes. Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is used. While 'hv-passthrough' is a debug only feature, this significantly limit its usefullness. While debugging the problem, I found that there are two loosely connected issues: -

Re: [PATCH v3 14/70] target/i386: Implement mc->kvm_type() to get VM type

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:23AM -0500, Xiaoyao Li wrote: > Implement mc->kvm_type() for i386 machines. It provides a way for user > to create SW_PROTECTE_VM. Small typo there missing final 'D' in 'PROTECTED' > > Also store the vm_type in machinestate to other code to query what the > VM type

[PATCH 3/4] vfio/ap: Move VFIODevice initializations in vfio_ap_instance_init

2023-11-15 Thread Zhenzhong Duan
Some of the VFIODevice initializations is in vfio_ap_realize, move all of them in vfio_ap_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/ap.c | 26 +- 1 file changed, 13 insertions(+), 13

Re: [RFC PATCH v3 65/78] hw/nvme: add fallthrough pseudo-keyword

2023-11-15 Thread Klaus Jensen
On Oct 13 11:46, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > hw/nvme/ctrl.c | 24 >

Re: [PATCH] linux-headers: Synchronize linux headers from linux v6.7.0-rc1

2023-11-15 Thread gaosong
Hi, Can this patch be merged in during the 8.2 cycle? Thanks. Song Gao 在 2023/11/14 上午9:54, Tianrui Zhao 写道: Use the scripts/update-linux-headers.sh to synchronize linux headers from linux v6.7.0-rc1. We mainly want to add the loongarch linux headers and then add the loongarch kvm support

Re: [PATCH v3 26/70] i386/tdx: Initialize TDX before creating TD vcpus

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:35AM -0500, Xiaoyao Li wrote: > Invoke KVM_TDX_INIT in kvm_arch_pre_create_vcpu() that KVM_TDX_INIT > configures global TD configurations, e.g. the canonical CPUID config, > and must be executed prior to creating vCPUs. > > Use kvm_x86_arch_cpuid() to setup the CPUID

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 07:23:01AM +0100, Thomas Huth wrote: > On 15/11/2023 02.15, Nicholas Piggin wrote: > > On Wed Nov 15, 2023 at 4:29 AM AEST, Thomas Huth wrote: > > > On 14/11/2023 17.37, Philippe Mathieu-Daudé wrote: > > > > On 14/11/23 17:31, Thomas Huth wrote: > > > > > The tests seem

Re: [PATCH] tests/avocado/virtio-gpu: Fix test_vhost_user_vga_virgl for edid support

2023-11-15 Thread Antonio Caggiano
Hi, On 14/11/2023 21:34, Thomas Huth wrote: The "edid" feature has been added to vhost-user-gpu in commit c06444261e20 ("contrib/vhost-user-gpu: implement get_edid feature"), so waiting for "features: +virgl -edid" in the test does not work anymore, it's "+edid" instead of "-edid" now! While

Re: [PATCH v5 02/31] target/hppa: Remove object_class_is_abstract()

2023-11-15 Thread Gavin Shan
On 11/15/23 21:18, BALATON Zoltan wrote: On Wed, 15 Nov 2023, Gavin Shan wrote: No need to check if @oc is abstract because it has been covered by cpu_class_by_name(). Signed-off-by: Gavin Shan --- target/hppa/cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/hppa/cpu.c

Re: [PATCH 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-15 Thread Stefan Hajnoczi
On Wed, Nov 15, 2023 at 12:43:02PM +0100, Stefano Garzarella wrote: > On Mon, Nov 13, 2023 at 06:36:44PM -0600, Mike Christie wrote: > > This adds support for vhost-scsi to be able to create a worker thread > > per virtqueue. Right now for vhost-net we get a worker thread per > > tx/rx virtqueue

[PATCH] tests/qtest: remove unused variables

2023-11-15 Thread zhujun2
These variables are never referenced in the code, just remove them Signed-off-by: zhujun2 --- tests/qtest/test-filter-mirror.c | 2 +- tests/qtest/test-filter-redirector.c | 4 ++-- tests/qtest/virtio-net-test.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v3 10/70] kvm: handle KVM_EXIT_MEMORY_FAULT

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:19AM -0500, Xiaoyao Li wrote: > From: Chao Peng > > Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when > KVM_EXIT_MEMORY_FAULT happens. It indicates userspace needs to do > the memory conversion on the RAMBlock to turn the memory into desired >

Re: [PATCH 0/4] VFIO device init cleanup

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 09:32, Zhenzhong Duan wrote: Zhenzhong Duan (4): vfio/pci: Move VFIODevice initializations in vfio_instance_init vfio/platform: Move VFIODevice initializations in vfio_platform_instance_init vfio/ap: Move VFIODevice initializations in vfio_ap_instance_init vfio/ccw:

Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-15 Thread Philippe Mathieu-Daudé
Hi Zhenzhong, On 14/11/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Together with the earlier support of pre-opening

Re: [PATCH v1] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2023-11-15 Thread Sebastian Ott
Hi, On Mon, 13 Nov 2023, Shaoqin Huang wrote: +``pmu-filter={A,D}:start-end[;...]`` +KVM implements pmu event filtering to prevent a guest from being able to + sample certain events. It has the following format: + + pmu-filter="{A,D}:start-end[;{A,D}:start-end...]" + +

Re: [PATCH v6 02/21] util/char_dev: Add open_cdev()

2023-11-15 Thread Eric Auger
On 11/14/23 11:09, Zhenzhong Duan wrote: > From: Yi Liu > > /dev/vfio/devices/vfioX may not exist. In that case it is still possible > to open /dev/char/$major:$minor instead. Add helper function to abstract > the cdev open. > > Suggested-by: Jason Gunthorpe > Signed-off-by: Yi Liu >

Re: [PATCH v6 05/21] vfio/iommufd: Relax assert check for iommufd backend

2023-11-15 Thread Eric Auger
On 11/14/23 11:09, Zhenzhong Duan wrote: > Currently iommufd doesn't support dirty page sync yet, > but it will not block us doing live migration if VFIO > migration is force enabled. > > So in this case we allow set_dirty_page_tracking to be NULL. > Note we don't need same change for

Re: [PATCH] tests/avocado/intel_iommu: Add asset hashes to avoid warnings

2023-11-15 Thread Eric Auger
Hi Thomas, On 11/15/23 07:20, Thomas Huth wrote: > On 14/11/2023 21.42, Eric Auger wrote: >> Hi Thomas, >> >> On 11/14/23 15:35, Thomas Huth wrote: >>> The intel_iommu test is currently succeeding with annoying warnings. >> nit: you may have precised the nature of the warning or quotes > > The

Re: [PATCH RFC 2/2] hw/arm: Add minimal support for the B-L475E-IOT01A board

2023-11-15 Thread Philippe Mathieu-Daudé
Hi Inès, On 15/11/23 09:04, ~inesvarhol wrote: From: Inès Varhol This commit adds a new B-L475E-IOT01A board using the STM32L475VG SoC. The implementation is derived from the Netduino Plus 2 machine. There are no peripherals implemented, only memory regions. Signed-off-by: default

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Nicholas Piggin
On Thu Nov 16, 2023 at 3:22 AM AEST, Daniel P. Berrangé wrote: > On Wed, Nov 15, 2023 at 01:14:53PM +, Daniel P. Berrangé wrote: > > On Wed, Nov 15, 2023 at 07:23:01AM +0100, Thomas Huth wrote: > > > On 15/11/2023 02.15, Nicholas Piggin wrote: > > > > On Wed Nov 15, 2023 at 4:29 AM AEST,

Re: [PATCH 08/10] testing: move arm system tests into their own folder

2023-11-15 Thread Richard Henderson
On 11/15/23 12:55, Alex Bennée wrote: Prepare for expanding the arm system tests by cleaning up the test directory. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 5 ++--- tests/tcg/arm/{ => system}/test-armv6m-undef.S | 0 tests/tcg/arm/{ =>

Re: [PATCH 07/10] hw/core: skip loading debug on all failures

2023-11-15 Thread Richard Henderson
On 11/15/23 12:55, Alex Bennée wrote: ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Signed-off-by: Alex Bennée --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard

RE: [RFC PATCH] Hexagon (target/hexagon) Make generators object oriented

2023-11-15 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Wednesday, November 15, 2023 1:51 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: Matheus Bernardino (QUIC) ; Sid > Manning ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng > Subject: RE: [RFC PATCH]

[PATCH-for-9.0 4/6] hw/arm/msf2: Simplify setting MachineClass::valid_cpu_types[]

2023-11-15 Thread Philippe Mathieu-Daudé
The M2Sxxx SoC family can only be used with Cortex-M3. Propagating the CPU type from the board level is pointless. Hard-code the CPU type at the SoC level. Remove the now ignored MachineClass::default_cpu_type field. Use the common code introduced in commit c9cf636d48 ("machine: Add a

[PATCH-for-8.2? 2/6] hw/arm/stm32f205: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
The 'netduino2' machine ignores the CPU type requested by the command line. This might confuse users, since the following will create a machine with a Cortex-M3 CPU: $ qemu-system-arm -M netduino2 -cpu cortex-a9 Set the MachineClass::valid_cpu_types field (introduced in commit c9cf636d48

RE: [RFC PATCH] Hexagon (target/hexagon) Make generators object oriented

2023-11-15 Thread Brian Cain
> -Original Message- > From: qemu-devel-bounces+bcain=quicinc@nongnu.org AFAICT the keys for registers and new_registers can be derived from the values > themselves. Rather than worry about copy/paste errors causing these not to > correspond, you can create a dictionary from an

Re: [PATCH 09/10] tests/tcg: enable arm softmmu tests

2023-11-15 Thread Richard Henderson
On 11/15/23 12:55, Alex Bennée wrote: +vector_table: + b reset /* reset vector */ + b undef_instr/* undefined instruction vector */ + b software_intr /* software interrupt vector */ + b prefetch_abort /* prefetch abort

Re: [PATCH v3 1/8] ppc/pnv: Add pca9552 to powernv10 for PCIe hotplug power control

2023-11-15 Thread Cédric Le Goater
On 11/15/23 17:37, Miles Glenn wrote: On Wed, 2023-11-15 at 08:28 +0100, Cédric Le Goater wrote: On 11/14/23 20:56, Glenn Miles wrote: The Power Hypervisor code expects to see a pca9552 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x63 (or left- justified address of

Re: [PATCH 07/10] hw/core: skip loading debug on all failures

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 21:55, Alex Bennée wrote: ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Signed-off-by: Alex Bennée --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe

Re: [PATCH 08/10] testing: move arm system tests into their own folder

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 21:55, Alex Bennée wrote: Prepare for expanding the arm system tests by cleaning up the test directory. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.softmmu-target | 5 ++--- tests/tcg/arm/{ => system}/test-armv6m-undef.S | 0 tests/tcg/arm/{ =>

[PATCH-for-9.0 6/6] hw/arm/musca: Simplify setting MachineClass::valid_cpu_types[]

2023-11-15 Thread Philippe Mathieu-Daudé
Musca boards use the embedded subsystems (SSE) tied to a specific Cortex core. Our models only use the Cortex-M33. Use the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for valid CPU type at the board level. Remove the now unused

[PATCH-for-8.2? 3/6] hw/arm/stm32f100: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
The 'stm32vldiscovery' machine ignores the CPU type requested by the command line. This might confuse users, since the following will create a machine with a Cortex-M3 CPU: $ qemu-system-aarch64 -M stm32vldiscovery -cpu neoverse-n1 Set the MachineClass::valid_cpu_types field (introduced in

[PATCH-for-8.2? 0/6] hw/arm/stm32xxx: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
Hi, While reviewing this [1] series from Arnaud and Inès, I realized STM32 based boards don't check the requested CPU type is correct, and ignore it. Possibly confusing users. Since these simple boards code is used as template, I took the opportunity to sanitize it a bit, using the

[PATCH-for-8.2? 1/6] hw/arm/stm32f405: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
Both 'netduinoplus2' and 'olimex-stm32-h405' machines ignore the CPU type requested by the command line. This might confuse users, since the following will create a machine with a Cortex-M4 CPU: $ qemu-system-aarch64 -M netduinoplus2 -cpu cortex-r5f Set the MachineClass::valid_cpu_types field

[PATCH-for-9.0 5/6] hw/arm/npcm7xx_boards: Simplify setting MachineClass::valid_cpu_types[]

2023-11-15 Thread Philippe Mathieu-Daudé
The npcm7xx Soc is created with a Cortex-A9 core, see in hw/arm/npcm7xx.c: static void npcm7xx_init(Object *obj) { NPCM7xxState *s = NPCM7XX(obj); for (int i = 0; i < NPCM7XX_MAX_NUM_CPUS; i++) { object_initialize_child(obj, "cpu[*]", >cpu[i],

Re: [RFC 0/2] vhost-user-test: Add negotiated features check

2023-11-15 Thread Yong Huang
ping On Sun, Nov 12, 2023 at 9:03 PM Hyman Huang wrote: > The patchset "Fix the virtio features negotiation flaw" fix a > vhost-user negotiation flaw: > c9bdc449f9 vhost-user: Fix the virtio features negotiation flaw > bebcac052a vhost-user: Refactor the chr_closed_bh > 937b7d96e4 vhost-user:

Re: [PATCH RFC 1/2] hw/arm: Add minimal support for the STM32L475VG SoC

2023-11-15 Thread Philippe Mathieu-Daudé
Hi Inès, On 15/11/23 08:59, ~inesvarhol wrote: From: Inès Varhol This patch adds a new STM32L475VG SoC, it is necessary to add support for the B-L475E-IOT01A board. Thanks for your first contribution! See my comments inline. The implementation is derived from the STM32F405 SoC. You

Re: [PATCH v3 4/8] ppc/pnv: Fix PNV I2C invalid status after reset

2023-11-15 Thread Cédric Le Goater
On 11/14/23 20:56, Glenn Miles wrote: The PNV I2C Controller was clearing the status register after a reset without repopulating the "upper threshold for I2C ports", "Command Complete" and the SCL/SDA input level fields. Fixed this for resets caused by a system reset as well as from writing to

Re: [PATCH v3 3/8] ppc/pnv: PNV I2C engines assigned incorrect XSCOM addresses

2023-11-15 Thread Cédric Le Goater
On 11/14/23 20:56, Glenn Miles wrote: The PNV I2C engines for power9 and power10 were being assigned a base XSCOM address that was off by one I2C engine's address range such that engine 0 had engine 1's address and so on. The xscom address assignment was being based on the device tree engine

Re: [PATCH] monitor: flush messages on abort

2023-11-15 Thread Steven Sistare
On 11/6/2023 5:10 AM, Daniel P. Berrangé wrote: > On Fri, Nov 03, 2023 at 03:51:00PM -0400, Steven Sistare wrote: >> On 11/3/2023 1:33 PM, Daniel P. Berrangé wrote: >>> On Fri, Nov 03, 2023 at 09:01:29AM -0700, Steve Sistare wrote: Buffered monitor output is lost when abort() is called.

Re: [PATCH] monitor: flush messages on abort

2023-11-15 Thread Steven Sistare
On 11/15/2023 3:41 AM, Markus Armbruster wrote: > Daniel P. Berrangé writes: > >> On Fri, Nov 03, 2023 at 03:51:00PM -0400, Steven Sistare wrote: >>> On 11/3/2023 1:33 PM, Daniel P. Berrangé wrote: On Fri, Nov 03, 2023 at 09:01:29AM -0700, Steve Sistare wrote: > Buffered monitor output

Re: [PATCH v6 06/21] vfio/iommufd: Add support for iova_ranges and pgsizes

2023-11-15 Thread Eric Auger
On 11/14/23 14:46, Cédric Le Goater wrote: > On 11/14/23 11:09, Zhenzhong Duan wrote: >> Some vIOMMU such as virtio-iommu use IOVA ranges from host side to >> setup reserved ranges for passthrough device, so that guest will not >> use an IOVA range beyond host support. >> >> Use an uAPI of

Re: [PATCH v3 31/70] i386/tdx: Allows mrconfigid/mrowner/mrownerconfig for TDX_INIT_VM

2023-11-15 Thread Daniel P . Berrangé
On Wed, Nov 15, 2023 at 02:14:40AM -0500, Xiaoyao Li wrote: > From: Isaku Yamahata > > Three sha384 hash values, mrconfigid, mrowner and mrownerconfig, of a TD > can be provided for TDX attestation. > > So far they were hard coded as 0. Now allow user to specify those values > via property

[PATCH 13/16] hw/uefi: add uefi-vars-sysbus device

2023-11-15 Thread Gerd Hoffmann
This adds sysbus bindings for the variable service. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-sysbus.c | 87 hw/uefi/meson.build | 3 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 hw/uefi/var-service-sysbus.c

[PATCH 05/16] hw/uefi: add var-service-core.c

2023-11-15 Thread Gerd Hoffmann
This is the core code for guest <-> host communication. This accepts request messages from the guest, dispatches them to the service called, and sends back the response message. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 350 + 1 file

[PATCH 08/16] hw/uefi: add var-service-policy.c

2023-11-15 Thread Gerd Hoffmann
Implement variable policies (Edk2VariablePolicyProtocol). This protocol allows to define restrictions for variables. It also allows to lock down variables (disallow write access). Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-policy.c | 390 +++ 1 file

[PATCH 12/16] hw/uefi: add to meson

2023-11-15 Thread Gerd Hoffmann
Wire up uefi-vars in the build system. Signed-off-by: Gerd Hoffmann --- hw/meson.build | 1 + hw/uefi/meson.build | 12 meson.build | 1 + 3 files changed, 14 insertions(+) create mode 100644 hw/uefi/meson.build diff --git a/hw/meson.build b/hw/meson.build index

[PATCH 10/16] hw/uefi: add trace-events

2023-11-15 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/uefi/trace-events | 16 1 file changed, 16 insertions(+) create mode 100644 hw/uefi/trace-events diff --git a/hw/uefi/trace-events b/hw/uefi/trace-events new file mode 100644 index ..baeda81bbe12 --- /dev/null +++

[PATCH 07/16] hw/uefi: add var-service-auth.c

2023-11-15 Thread Gerd Hoffmann
This implements authenticated variable handling (AuthVariableLib in edk2). For now this implements the bare minimum to make secure boot work, by initializing the 'SecureBoot' variable. Support for authenticated variable updates is not implemented yet, for now they are read-only so the guest can

[PATCH 02/16] hw/uefi: add include/hw/uefi/var-service-edk2.h

2023-11-15 Thread Gerd Hoffmann
A bunch of #defines and structs copied over from edk2, mostly needed to decode and encode the messages in the communication buffer. Signed-off-by: Gerd Hoffmann --- include/hw/uefi/var-service-edk2.h | 184 + 1 file changed, 184 insertions(+) create mode 100644

[PATCH 15/16] hw/arm: add uefi variable support to virt machine type

2023-11-15 Thread Gerd Hoffmann
Add -machine virt,x-uefi-vars={on,off} property. Default is off. When enabled wire up the uefi-vars-sysbus device. TODO: wire up jsonfile property. Signed-off-by: Gerd Hoffmann --- include/hw/arm/virt.h | 2 ++ hw/arm/virt.c | 41 + 2 files

[PATCH 00/16] hw/uefi: add uefi variable service

2023-11-15 Thread Gerd Hoffmann
This patch adds a virtual device to qemu which the uefi firmware can use to store variables. This moves the UEFI variable management from privileged guest code (managing vars in pflash) to the host. Main advantage is that the need to have privilege separation in the guest goes away. On x86

[PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash

2023-11-15 Thread Philippe Mathieu-Daudé
In a perfect world we'd have reproducible tests, but then we'd be sure we run the same binaries. If a binary artifact isn't hashed, we have no idea what we are running. Therefore enforce hashing for all our artifacts. With this change, unhashed artifacts produce: $ avocado run

Re: [PATCH 16/16] docs: add uefi variable service documentation and TODO list.

2023-11-15 Thread Eric Blake
On Wed, Nov 15, 2023 at 04:12:38PM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > docs/devel/index-internals.rst | 1 + > docs/devel/uefi-vars.rst | 66 ++ > hw/uefi/TODO.md| 17 + > 3 files changed, 84

Re: [PATCH] migration: free 'saddr' since be no longer used

2023-11-15 Thread Peter Xu
On Wed, Nov 15, 2023 at 09:49:09AM +, Daniel P. Berrangé wrote: > On Wed, Nov 15, 2023 at 11:27:39AM +0800, Zongmin Zhou wrote: > > Since socket_parse() will allocate memory for 'saddr', > > and its value will pass to 'addr' that allocated > > by migrate_uri_parse(),so free 'saddr' to avoid

Re: [PATCH] softmmu/memory: use memcpy for multi-byte accesses

2023-11-15 Thread Patrick Venture
On Wed, Nov 15, 2023 at 9:02 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 11/15/23 08:58, Patrick Venture wrote: > > > > > > On Wed, Nov 15, 2023 at 2:35 AM Peter Maydell > > wrote: > > > > On Tue, 14 Nov 2023 at 20:55, Patrick Venture >

Re: [PATCH] softmmu/memory: use memcpy for multi-byte accesses

2023-11-15 Thread Patrick Venture
On Wed, Nov 15, 2023 at 9:26 AM Patrick Venture wrote: > > > On Wed, Nov 15, 2023 at 9:02 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 11/15/23 08:58, Patrick Venture wrote: >> > >> > >> > On Wed, Nov 15, 2023 at 2:35 AM Peter Maydell > >

[PATCH 2/4] ich9: Renamed use_acpi_hotplug_bridge accessors

2023-11-15 Thread Thierry Escande
The accessors were named as ich9_pm_get/set_acpi_pci_hotplug(). This patch renames them as ich9_pm_get/set_acpi_hotplug_bridge(). Signed-off-by: Thierry Escande --- hw/acpi/ich9.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index

[PATCH 4/4] ich9: Enable root PCI hotplug by default

2023-11-15 Thread Thierry Escande
This patch initializes use_acpi_root_pci_hotplug to true and enables device PCI hotplug on q35 machine by default. Signed-off-by: Thierry Escande --- hw/acpi/ich9.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index e38c9bb998..ad2c8ad8ed 100644 ---

[PATCH 3/4] ich9: Add accessors for acpi-root-pci-hotplug

2023-11-15 Thread Thierry Escande
This patch adds accessors for acpi-root-pci-hotplug property. PCI hotplug can be enabled/disabled with: -global ICH9-LPC.acpi-root-pci-hotplug=on|off Signed-off-by: Thierry Escande --- hw/acpi/ich9.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/acpi/ich9.c

[PATCH] tests/avocado/multiprocess: Add asset hashes to silence warnings

2023-11-15 Thread Thomas Huth
The multiprocess test is currently succeeding with an annoying warning: (1/2) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64: WARN: Test passed but there were warnings during execution. Check the log for details In the log, you can find an entry like: WARNI|

[PATCH-for-8.2] hw/net/can/xlnx-zynqmp: Avoid underflow while popping TX FIFO

2023-11-15 Thread Philippe Mathieu-Daudé
Per https://docs.xilinx.com/r/en-US/ug1085-zynq-ultrascale-trm/Message-Format Message Format The same message format is used for RXFIFO, TXFIFO, and TXHPB. Each message includes four words (16 bytes). Software must read and write all four words regardless of the actual number of data

Re: [PATCH 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-11-15 Thread Mike Christie
On 11/15/23 6:57 AM, Stefan Hajnoczi wrote: > On Wed, Nov 15, 2023 at 12:43:02PM +0100, Stefano Garzarella wrote: >> On Mon, Nov 13, 2023 at 06:36:44PM -0600, Mike Christie wrote: >>> This adds support for vhost-scsi to be able to create a worker thread >>> per virtqueue. Right now for vhost-net

[PATCH for-8.2 0/4] block: Fix deadlocks with the stream job

2023-11-15 Thread Kevin Wolf
This series contains three fixes for deadlocks that follow the same pattern: A nested event loop in the main thread waits for an iothread to make progress, but the AioContext lock of that iothread is still held by the main loop, so it can never make progress. We're planning to fully remove the

[PATCH for-8.2 1/4] block: Fix bdrv_graph_wrlock() call in blk_remove_bs()

2023-11-15 Thread Kevin Wolf
While not all callers of blk_remove_bs() are correct in this respect, the assumption in the function is that callers hold the AioContext lock of the BlockBackend (this is required by the drain calls in it). In order to avoid deadlock in the nested event loop, bdrv_graph_wrlock() has then to be

  1   2   3   >