Re: [PATCH 1/3] vl: Allow multiple -overcommit commands

2024-05-21 Thread Chen, Zide
On 5/20/2024 10:16 PM, Thomas Huth wrote: > On 21/05/2024 07.08, Thomas Huth wrote: >> On 20/05/2024 19.47, Zide Chen wrote: >>> Both cpu-pm and mem-lock are related to system resource overcommit, but >>> they are separate from each other, in terms of how they are realized, >>> and of course, th

Re: [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-21 Thread Bernhard Beschow
Am 8. Mai 2024 17:55:07 UTC schrieb Bernhard Beschow : >In the -bios case the "isa-bios" memory region is an alias to the BIOS mapped >to the top of the 4G memory boundary. Do the same in the -pflash case, but only >for new machine versions for migration compatibility. This establishes common >b

Re: [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-21 Thread Paolo Bonzini
Il mar 21 mag 2024, 09:10 Bernhard Beschow ha scritto: > This is the only patch in this series which hasn't got an R-b tag yet (the > others are already in master) and I'm not aware of any open issues. > I will queue it then. Paolo > Best regards, > Bernhard > >

Re: [PATCH V1 24/26] seccomp: cpr-exec blocker

2024-05-21 Thread Daniel P . Berrangé
On Mon, May 13, 2024 at 03:29:48PM -0400, Steven Sistare wrote: > On 5/10/2024 3:54 AM, Daniel P. Berrangé wrote: > > On Mon, Apr 29, 2024 at 08:55:33AM -0700, Steve Sistare wrote: > > > cpr-exec mode needs permission to exec. Block it if permission is denied. > > > > > > Signed-off-by: Steve Sis

Re: [PATCH v3 6/6] hw/i386/pc_sysfw: Alias rather than copy isa-bios region

2024-05-21 Thread Michael S. Tsirkin
On Wed, May 08, 2024 at 07:55:07PM +0200, Bernhard Beschow wrote: > In the -bios case the "isa-bios" memory region is an alias to the BIOS mapped > to the top of the 4G memory boundary. Do the same in the -pflash case, but > only > for new machine versions for migration compatibility. This establi

RE: [PATCH v3 11/16] aspeed/intc: Add AST2700 support

2024-05-21 Thread Jamin Lin
Hi Cedric, It is a partial block diagram. Thanks-Jamin GIC132 ETH1+---+ +>+0 3| ETH2| 4| +>+1 5| ETH3| 6| +>+219| INTC GIC UART0 |

[PATCH 0/2] target/loongarch: Add loongson binary translation feature

2024-05-21 Thread Bibo Mao
Loongson Binary Translation (LBT) is used to accelerate binary translation. LBT feature is added in kvm mode, not supported in TCG mode since it is not emulated. And only LBT feature is added here, LBT registers saving and restoring is not supported since it depeeds on LBT feautre implemented in KV

[PATCH 1/2] target/loongarch: Add loongarch vector property unconditionally

2024-05-21 Thread Bibo Mao
Currently LSX/LASX vector property is decided by the default value. Instead vector property should be added unconditionally, and it is irrelative with its default value. If vector is disabled by default, vector also can be enabled from command line. Signed-off-by: Bibo Mao --- target/loongarch/c

[PATCH 2/2] target/loongarch: Add loongson binary translation feature

2024-05-21 Thread Bibo Mao
Loongson Binary Translation (LBT) is used to accelerate binary translation, which contains 4 scratch registers (scr0 to scr3), x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). Now LBT feature is added in kvm mode, not supported in TCG mode since it is not emulated. And only LBT feature is

Re: [PATCH V1 26/26] migration: only-migratable-modes

2024-05-21 Thread Daniel P . Berrangé
On Mon, Apr 29, 2024 at 08:55:35AM -0700, Steve Sistare wrote: > Add the only-migratable-modes option as a generalization of only-migratable. > Only devices that support all requested modes are allowed. > > Signed-off-by: Steve Sistare > --- > include/migration/misc.h | 3 +++ > include/s

Re: [PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-21 Thread Daniil Tatianin
Could you please take a look at this revision? I think I've taken everyone's feedback into account. Thank you! On 5/14/24 9:57 AM, Daniil Tatianin wrote: ping :) 06.05.2024, 11:34, "Daniil Tatianin" : This can be used to force-synchronize the time in guest after a long stop-cont pause

Re: [PATCH V1 18/26] migration: cpr-exec-args parameter

2024-05-21 Thread Daniel P . Berrangé
On Mon, Apr 29, 2024 at 08:55:27AM -0700, Steve Sistare wrote: > Create the cpr-exec-args migration parameter, defined as a list of > strings. It will be used for cpr-exec migration mode in a subsequent > patch. > > No functional change, except that cpr-exec-args is shown by the > 'info migrate'

Re: [PATCH] hw/riscv/virt: Add hotplugging and virtio-md-pci support

2024-05-21 Thread David Hildenbrand
On 19.05.24 11:24, Daniel Henrique Barboza wrote: On 5/18/24 16:50, David Hildenbrand wrote: Hi, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4fdb66052587..16c2bdbfe6b6 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -53,6 +53,8 @@    #include "hw/pci-host/gpex.h"    #includ

Re: [PATCH V1 20/26] migration: cpr-exec mode

2024-05-21 Thread Daniel P . Berrangé
On Mon, Apr 29, 2024 at 08:55:29AM -0700, Steve Sistare wrote: > Add the cpr-exec migration mode. Usage: > qemu-system-$arch -machine memfd-alloc=on ... > migrate_set_parameter mode cpr-exec > migrate_set_parameter cpr-exec-args \ > ... -incoming > migrate -d > > The migrate comma

Re: [PATCH v2 01/11] qcow2: make function update_refcount_discard() global

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: We are going to need it for discarding separate subclusters. The function itself doesn't do anything with the refcount tables, it simply adds a discard request to the queue, so rename it to qcow2_queue_discard(). Signed-off-by: Andrey Drobyshev Revi

Re: [PATCH v2 02/11] qcow2: simplify L2 entries accounting for discard-no-unref

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: Commits 42a2890a and b2b10904 introduce handling of discard-no-unref option in discard_in_l2_slice() and zero_in_l2_slice(). They add even more if's when chosing the right l2 entry. What we really need for this option is the new entry simply to conta

Re: [PATCH v2 03/11] qcow2: put discard requests in the common queue when discard-no-unref enabled

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: Normally discard requests are stored in the queue attached to BDRVQcow2State to be processed later at once. Currently discard-no-unref option handling causes these requests to be processed straight away. Let's fix that. Note that when doing regular

Re: [PATCH v2 04/11] block/file-posix: add trace event for fallocate() calls

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: This would ease debugging of write zeroes and discard operations. Signed-off-by: Andrey Drobyshev --- block/file-posix.c | 1 + block/trace-events | 1 + 2 files changed, 2 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index

Re: [PATCH v2 05/11] iotests/common.rc: add disk_usage function

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: Move the definition from iotests/250 to common.rc. This is used to detect real disk usage of sparse files. In particular, we want to use it for checking subclusters-based discards. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/250

Re: [PATCH v2 06/11] iotests/290: add test case to check 'discard-no-unref' option behavior

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: We basically fill 2 images with identical data and perform discard operations with and without 'discard-no-unref' enabled. Then we check that images still read identically, that their disk usage is the same (i.e. fallocate(FALLOC_FL_PUNCH_HOLE|FALLOC_

Re: [PATCH v2 07/11] qcow2: add get_sc_range_info() helper for working with subcluster ranges

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:31, Andrey Drobyshev wrote: This helper simply obtains the l2 table parameters of the cluster which contains the given subclusters range. Right now this info is being obtained and used by zero_l2_subclusters(). As we're about to introduce the subclusters discard operation, this

Re: [PATCH v2 08/11] qcow2: zeroize the entire cluster when there're no non-zero subclusters

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:32, Andrey Drobyshev wrote: When zeroizing the last non-zero subclusters within single cluster, it makes sense to go zeroize the entire cluster and go down zero_in_l2_slice() path right away. That way we'd also update the corresponding refcount table. Signed-off-by: Andrey Drob

Re: [RFC PATCH v3 17/18] hw/arm/smmuv3: Add property for OAS

2024-05-21 Thread Eric Auger
Hi Mostafa, On 4/29/24 05:24, Mostafa Saleh wrote: > Add property that sets the OAS of the SMMU, this in not used in this > patch. > > Signed-off-by: Mostafa Saleh > --- > hw/arm/smmuv3-internal.h | 3 ++- > hw/arm/smmuv3.c | 29 - > include/hw/arm/smmuv3.h

Re: [RFC PATCH v3 18/18] hw/arm/virt: Set SMMU OAS based on CPU PARANGE

2024-05-21 Thread Eric Auger
Hi Mostafa, On 4/29/24 05:24, Mostafa Saleh wrote: > Use the new SMMU property to make the SMMU OAS match the CPU PARANGE. > That's according to SMMU manual ARM IHI 0070F.b: > 6.3.6 SMMU_IDR5, OAS must match the system physical address size. > > Signed-off-by: Mostafa Saleh > --- > hw/arm/vi

Re: [RFC PATCH v3 00/18] SMMUv3 nested translation support

2024-05-21 Thread Eric Auger
Hi Mostafa, On 4/29/24 05:23, Mostafa Saleh wrote: > Currently, QEMU supports emulating either stage-1 or stage-2 SMMUs > but not nested instances. > This patch series adds support for nested translation in SMMUv3, > this is controlled by property “arm-smmuv3.stage=nested”, and > advertised to gue

Re: [PATCH] hw/core/machine: move compatibility flags for VirtIO-net USO to machine 8.1

2024-05-21 Thread Fiona Ebner
Am 21.05.24 um 00:22 schrieb Fabiano Rosas: > Fiona Ebner writes: > >> Migration from an 8.2 or 9.0 binary to an 8.1 binary with machine >> version 8.1 can fail with: >> >>> kvm: Features 0x1c0010130afffa7 unsupported. Allowed features: 0x10179bfffe7 >>> kvm: Failed to load virtio-net:virtio >>>

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-21 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Subject: Re: [PATCH] intel_iommu: Use the latest fault reasons defined by >spec > >On Mon, May 20, 2024 at 12:15 PM Liu, Yi L wrote: >> >> > From: Duan, Zhenzhong >> > Sent: Monday, May 20, 2024 11:41 AM >> > >> > >> > >> > >-Original Message-

[PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c

2024-05-21 Thread Dmitry Frolov
Found with fuzzing for qemu-8.2, but also relevant for master Signed-off-by: Dmitry Frolov --- tests/qtest/fuzz/qos_fuzz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index b71e945c5f..d3839bf999 100644 --- a/tests/qtest/fuzz/qos_

Re: [PATCH 01/57] target/arm: Split out gengvec.c

2024-05-21 Thread Peter Maydell
On Mon, 6 May 2024 at 02:05, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 02/57] target/arm: Split out gengvec64.c

2024-05-21 Thread Peter Maydell
On Mon, 6 May 2024 at 02:04, Richard Henderson wrote: > > Split some routines out of translate-a64.c and translate-sve.c > that are used by both. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 09/11] qcow2: make subclusters discardable

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:32, Andrey Drobyshev wrote: This commit makes the discard operation work on the subcluster level rather than cluster level. It introduces discard_l2_subclusters() function and makes use of it in qcow2 discard implementation, much like it's done with zero_in_l2_slice() / zero_l2_

Re: [PATCH v2 10/11] qcow2: zero_l2_subclusters: fall through to discard operation when requested

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:32, Andrey Drobyshev wrote: When zeroizing subclusters within single cluster, detect usage of the BDRV_REQ_MAY_UNMAP flag and fall through to the subcluster-based discard operation, much like it's done with the cluster-based discards. That way subcluster-aligned operations "qemu

Re: [PATCH v2 11/11] iotests/271: add test cases for subcluster-based discard/unmap

2024-05-21 Thread Alexander Ivanov
On 5/13/24 08:32, Andrey Drobyshev wrote: Add a bunch of test cases covering new subclusters behaviour: unmap of last allocated subclusters; unmap of subclusters within unallocated cluster; discard of unallocated subclusters within a cluster; regular discard of subclusters within a cluster; di

Re: [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation

2024-05-21 Thread Frank Chang
Hi Daniel, On Tue, May 21, 2024 at 12:17 AM Daniel Henrique Barboza < dbarb...@ventanamicro.com> wrote: > Hi Frank, > > On 5/16/24 04:13, Frank Chang wrote: > > On Mon, May 13, 2024 at 8:37 PM Daniel Henrique Barboza < > dbarb...@ventanamicro.com > wrote: > > > >

[PATCH v2 0/3] RISC-V virt MHP support

2024-05-21 Thread Björn Töpel
From: Björn Töpel The RISC-V "virt" machine is currently missing memory hotplugging support (MHP). This series adds the missing virtio-md, and PC-DIMM support. I've include both the ACPI MHP/GED/PC-DIMM, and virtio-md in the same series. The two patches (virtio-md) are probably less controversia

[PATCH v2 1/3] hw/riscv/virt: Add memory hotplugging and virtio-md-pci support

2024-05-21 Thread Björn Töpel
From: Björn Töpel Virtio-based memory devices (virtio-mem/virtio-pmem) allows for dynamic resizing of virtual machine memory, and requires proper hotplugging (add/remove) support to work. Add device memory support for RISC-V "virt" machine, and enable virtio-md-pci with the corresponding missing

[PATCH v2 2/3] hw/riscv/virt-acpi-build: Expose device memory in ACPI SRAT

2024-05-21 Thread Björn Töpel
From: Björn Töpel Now that device memory is supported by RISC-V 'virt', expose that region in the ACPI SRAT (System/Static Resource Affinity Table). ACPI SRAT is used by, e.g., the virtio-mem Linux kernel driver [1]. Link: https://virtio-mem.gitlab.io/user-guide/user-guide-linux.html # [1] Sign

[PATCH v2 3/3] hw/riscv/virt: Add ACPI GED and PC-DIMM MHP support

2024-05-21 Thread Björn Töpel
From: Björn Töpel Add ACPI GED for the RISC-V "virt" machine, and wire up PC-DIMM memory hotplugging support. Heavily based/copied from hw/arm/virt.c. Signed-off-by: Björn Töpel --- hw/riscv/Kconfig | 3 ++ hw/riscv/virt-acpi-build.c | 16 ++ hw/riscv/virt.c| 104 +

Re: [PATCH 00/32] hw/sd: eMMC support

2024-05-21 Thread Cédric Le Goater
On 8/28/23 18:27, Cédric Le Goater wrote: Hello, On 7/3/23 15:24, Cédric Le Goater wrote: Hello, This series adds an extension for a new eMMC device using the framework Philippe put in place to support various SD implementations. Previous discussion on the same topic:    http://patchwork.ozla

[PATCH 0/2] hw/ufs: Add support MCQ

2024-05-21 Thread Minwoo Im
UFSHCI 4.0 spec introduced MCQ(Multi-Circular Queue) to support multiple command queues for UFS controller. To test ufs-mcq path of kernel, MCQ emulated device would be a good choice to go with. The first patch added newly introduced fields in UFSHCI 4.0 to support MCQ. The other one made the ac

[PATCH 1/2] hw/ufs: Update MCQ-related fields to block/ufs.h

2024-05-21 Thread Minwoo Im
This patch is a prep patch for the following MCQ support patch for hw/ufs. This patch updated minimal mandatory fields to support MCQ based on UFSHCI 4.0. Signed-off-by: Minwoo Im --- include/block/ufs.h | 108 +++- 1 file changed, 106 insertions(+), 2 de

[PATCH 0/2] hw/ufs: Add support MCQ

2024-05-21 Thread Minwoo Im
UFSHCI 4.0 spec introduced MCQ(Multi-Circular Queue) to support multiple command queues for UFS controller. To test ufs-mcq path of kernel, MCQ emulated device would be a good choice to go with. The first patch added newly introduced fields in UFSHCI 4.0 to support MCQ. The other one made the ac

[PATCH 2/2] hw/ufs: Add support MCQ of UFSHCI 4.0

2024-05-21 Thread Minwoo Im
This patch adds support for MCQ defined in UFSHCI 4.0. This patch utilized the legacy I/O codes as much as possible to support MCQ. MCQ operation & runtime register is placed at 0x1000 offset of UFSHCI register statically with no spare space among four registers (48B): UfsMcqSqReg, UfsMc

Re: More doc updates needed for new migrate argument @channels

2024-05-21 Thread Het Gala
On 06/05/24 9:10 pm, Peter Xu wrote: !---| CAUTION: External Email |---! On Mon, May 06, 2024 at 06:58:00AM +0200, Markus Armbruster wrote: Peter Xu writes: [.

Re: [PATCH V1 00/26] Live update: cpr-exec

2024-05-21 Thread Steven Sistare
I understand, thanks. If I can help with any of your todo list, just ask - steve On 5/20/2024 10:31 PM, Peter Xu wrote: Conference back then pto until today, so tomorrow will be my first working day after those. Sorry Steve, will try my best to read it before next week. I didn't dare to read t

Re: [PATCH 01/16] vfio/display: Fix error path in call site of ramfb_setup()

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: vfio_display_dmabuf_init() and vfio_display_region_init() calls ramfb_setup() without checking its return value. So we may run into a situation that vfio_display_probe() succeed but errp is set. This is risky and may lead to assert failure in error_setv().

Re: [PATCH 02/16] vfio/display: Make vfio_display_*() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater One comment below, --- hw/vfio/pci.h | 2 +- hw/vfio

Re: [PATCH 03/16] vfio/helpers: Use g_autofree in hw/vfio/helpers.c

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Changed functions include vfio_set_irq_signaling() this change looks fine and vfio_region_setup(). I would prefer all users of vfio_get_region_info() to be changed. Thanks, C. Signed-off-by: Zhenzhong Duan --- hw/vfio/helpers.c | 7 ++-

[PATCH v4 5/5] blockdev: mirror: check for target's cluster size when using bitmap

2024-05-21 Thread Fiona Ebner
When using mirror with a bitmap and the target does not do COW and is is a diff image, i.e. one that should only contain the delta and was not synced to previously, a too large cluster size for the target can be problematic. In particular, when the mirror sends data to the target aligned to the job

[PATCH v4 2/5] block/mirror: replace is_none_mode with sync_mode in MirrorBlockJob struct

2024-05-21 Thread Fiona Ebner
It is more flexible and is done in preparation to support specifying a working bitmap for mirror jobs. In particular, this makes it possible to assert that @sync_mode=full when a bitmap is used. That assertion is just to be sure, of course the mirror QMP commands will be made to fail earlier with a

[PATCH v4 1/5] qapi/block-core: avoid the re-use of MirrorSyncMode for backup

2024-05-21 Thread Fiona Ebner
Backup supports all modes listed in MirrorSyncMode, while mirror does not. Introduce BackupSyncMode by copying the current MirrorSyncMode and drop the variants mirror does not support from MirrorSyncMode as well as the corresponding manual check in mirror_start(). A consequence is also tighter int

[PATCH v4 3/5] mirror: allow specifying working bitmap

2024-05-21 Thread Fiona Ebner
From: John Snow for the mirror job. The bitmap's granularity is used as the job's granularity. The new @bitmap parameter is marked unstable in the QAPI and can currently only be used for @sync=full mode. Clusters initially dirty in the bitmap as well as new writes are copied to the target. Usi

Re: [PATCH 03/17] Standardize reginfo_dump_mismatch printing

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Hoist the "master vs apprentice" label to apprentice(), since > we will want different labels for dumping. Remove all of the > "mismatch" text from reginfo_dump_mismatch -- just print "vs". > > Signed-off-by: Richard Henderson > --- > r

[PATCH v4 0/5] mirror: allow specifying working bitmap

2024-05-21 Thread Fiona Ebner
Changes from v3 (discussion here [3]): * Improve/fix QAPI documentation. Changes from v2 (discussion here [2]): * Cluster size caveats only apply to non-COW diff image, adapt the cluster size check and documentation accordingly. * In the IO test, use backing files (rather than stand-alone diff

[PATCH v4 4/5] iotests: add test for bitmap mirror

2024-05-21 Thread Fiona Ebner
From: Fabian Grünbichler heavily based on/practically forked off iotest 257 for bitmap backups, but: - no writes to filter node 'mirror-top' between completion and finalization, as those seem to deadlock? - extra set of reference/test mirrors to verify that writes in parallel with active mirror

Re: [PATCH 06/17] ppc64: Clean register values in reginfo_init

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Smash the stack and thread pointers to deadbeef, as is common > for the other architectures. This allows us to drop these > special cases within reginfo_is_eq and reginfo_dump_mismatch. > > Do not copy the unused special registers that ar

Re: [PATCH 08/17] ppc64: Simplify reginfo_is_eq

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Since we now only copy into reginfo exactly what we want to compare, > and since we zero all unused padding and reserved space, we need not > enumerate each field for comparison, but defer to memcmp. > > Signed-off-by: Richard Henderson >

Re: [PATCH 04/16] vfio/helpers: Make vfio_set_irq_signaling() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 4 ++--

Re: [PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2024-05-21 Thread Alex Bennée
Juan Quintela writes: > From: Fabiano Rosas > > Add a smoke test that migrates to a file and gives it to the > script. It should catch the most annoying errors such as changes in > the ram flags. > > After code has been merged it becomes way harder to figure out what is > causing the script to f

Re: [PATCH 09/17] ppc64: Clean up reginfo_dump

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Dump only the registers that we copied in reginfo_init. > Improve the formatting and layout of what we do dump > Signed-off-by: Richard Henderson > --- > risu_reginfo_ppc64.c | 51 ++-- > 1 file ch

Re: [PATCH 05/16] vfio/helpers: Make vfio_device_get_name() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 2 +- hw/

Re: [PATCH 12/17] aarch64: Trivial SME test

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > test_sme_aarch64.s | 63 ++ > 1 file changed, 63 insertions(+) > create mode 100644 test_sme_aarch64.s Looks like we don't have makefile infrastructur

Re: [PATCH 06/16] vfio/platform: Make vfio_populate_device() and vfio_base_device_init() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/platform.c | 40 +

Re: [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation

2024-05-21 Thread Daniel Henrique Barboza
On 5/21/24 07:52, Frank Chang wrote: Hi Daniel, On Tue, May 21, 2024 at 12:17 AM Daniel Henrique Barboza mailto:dbarb...@ventanamicro.com>> wrote: Hi Frank, On 5/16/24 04:13, Frank Chang wrote: > On Mon, May 13, 2024 at 8:37 PM Daniel Henrique Barboza mailto:dbarb...@ventanamic

Re: [PATCH 07/16] vfio/ccw: Make vfio_ccw_get_region() return a bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Since vfio_populate_device() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater One comment below --- hw/vfio/ccw.c | 15 +++--

Re: [PATCH 08/16] vfio/pci: Make vfio_intx_enable_kvm() return a bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Since vfio_intx_enable_kvm() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 15 --

Re: [PATCH 09/16] vfio/pci: Make vfio_pci_relocate_msix() and vfio_msix_early_setup() return a bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Since vfio_pci_relocate_msix() and vfio_msix_early_setup() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 32

Re: [PATCH 10/16] vfio/pci: Make vfio_populate_device() return a bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Since vfio_populate_device() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 19 ++- 1 file changed, 10 insertions(+), 9 deleti

Re: [PATCH 11/16] vfio/pci: Make vfio_intx_enable() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 19 ---

Re: [PATCH 12/16] vfio/pci: Make vfio_populate_vga() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.h | 2 +- hw/vfio/igd.c | 2

Re: [PATCH V10 7/8] gdbstub: Add helper function to unregister GDB register space

2024-05-21 Thread Alex Bennée
Salil Mehta writes: > Add common function to help unregister the GDB register space. This shall be > done in context to the CPU unrealization. > > Signed-off-by: Salil Mehta > Tested-by: Vishnu Pajjuri > Reviewed-by: Gavin Shan > Tested-by: Xianglai Li > Tested-by: Miguel Luis > Reviewed-by:

Re: [PATCH 00/17] RISU misc updates

2024-05-21 Thread Peter Maydell
On Sat, 11 May 2024 at 12:54, Richard Henderson wrote: > > Some of these have been sitting on a branch for a couple of years. > Except perhaps the first, which I assume to be some sort of odd > build error from the time, they still seem reasonable. > > There are some updates for SME1, but not yet

Re: [PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2024-05-21 Thread Fabiano Rosas
Alex Bennée writes: > Juan Quintela writes: > >> From: Fabiano Rosas >> >> Add a smoke test that migrates to a file and gives it to the >> script. It should catch the most annoying errors such as changes in >> the ram flags. >> >> After code has been merged it becomes way harder to figure out w

Re: [PATCH 15/16] vfio/pci-quirks: Make vfio_pci_igd_opregion_init() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.h| 6 +++--- hw/vfio

Re: [PATCH 14/16] vfio/pci: Use g_autofree for vfio_region_info pointer

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: Pointer opregion is freed after vfio_pci_igd_opregion_init(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

[PATCH v3 2/3] hw/loongarch/virt: Enable extioi virt extension

2024-05-21 Thread Song Gao
This patch adds a new board attribute 'v-eiointc'. A value of true enables the virt extended I/O interrupt controller. VMs working in kvm mode have 'v-eiointc' enabled by default. Signed-off-by: Song Gao --- include/hw/loongarch/virt.h | 1 + target/loongarch/cpu.h | 1 + hw/loongarch/v

[PATCH v3 0/3] Add extioi virt extension support

2024-05-21 Thread Song Gao
On LoongArch, IRQs can be routed to four vcpus with hardware extioi. This patch adds the extioi virt extension support so that the IRQ can route to 256 vcpus. v3: - Split patch2 to two small patch. - remove unused code. - loongarch_extioi_reset() clear status without checking virt extioi feature

[PATCH v3 1/3] hw/intc/loongarch_extioi: Add extioi virt extension definition

2024-05-21 Thread Song Gao
On LoongArch, IRQs can be routed to four vcpus with hardware extioi. This patch adds the extioi virt extension definition so that the IRQ can route to 256 vcpus. Signed-off-by: Song Gao --- include/hw/intc/loongarch_extioi.h | 21 +++ hw/intc/loongarch_extioi.c | 88 +

[PATCH v3 3/3] hw/loongarch/virt: Use MemTxAttrs interface for misc ops

2024-05-21 Thread Song Gao
Use MemTxAttrs interface read_with_attrs/write_with_attrs for virt_iocsr_misc_ops. Signed-off-by: Song Gao --- hw/loongarch/virt.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e7edc6c9f9..0ab2b686

[PATCH 1/4] ci: remove centos-steam-8 customer runner

2024-05-21 Thread Alex Bennée
This broke since eef0bae3a7 (migration: Remove block migration) but even after that was addressed it still fails to complete. As it will shortly be EOL lets to remove the runner definition and the related ansible setup bits. We still have centos9 docker images build and test. Signed-off-by: Alex

[PATCH 3/4] tests/vm: update centos.aarch64 image to 9

2024-05-21 Thread Alex Bennée
As Centos Stream 8 goes out of support we need to update. To do this powertools is replaced by crb and we don't over specify the python3 we want. Signed-off-by: Alex Bennée --- tests/vm/centos.aarch64 | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/vm/centos.

[PATCH 0/4] testing/next: purging remaining centos 8 bits

2024-05-21 Thread Alex Bennée
There are a few more bits referencing centos8 in the tree which needed cleaning up. After this we can remove the dedicated runner from the gitlab registration. If we want to keep a dedicated Centos runner then we can add back the bits needed to set it up (although arguably we could have a single bu

[PATCH 2/4] docs/devel: update references to centos to later version

2024-05-21 Thread Alex Bennée
>From the website: "After May 31, 2024, CentOS Stream 8 will be archived and no further updates will be provided." We have updated a few bits but there are still references that need fixing. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 8 1 file changed, 4 insertions(+), 4

[PATCH 4/4] tests/vm: remove plain centos image

2024-05-21 Thread Alex Bennée
This isn't really used and we have lighter weight docker containers for testing this stuff directly. Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 1 - tests/vm/centos | 51 --- 2 files changed, 52 deletions(-) delete mode 100755 tests

Re: [PATCH 13/16] vfio/pci: Make capability related functions return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: The functions operating on capability don't have a consistent return style. Below functions are in bool-valued functions style: vfio_msi_setup() vfio_msix_setup() vfio_add_std_cap() vfio_add_capabilities() Below two are integer-valued functions: vfio_add_

Re: [PATCH 16/16] vfio/pci-quirks: Make vfio_add_*_cap() return bool

2024-05-21 Thread Cédric Le Goater
On 5/15/24 10:20, Zhenzhong Duan wrote: This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Include below functions: vfio_add_virt_caps() vfio_add_nv_gpudirect_cap() vfio_add_vmd_shadow_cap() Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Du

Re: [PATCH] hw/core/machine: move compatibility flags for VirtIO-net USO to machine 8.1

2024-05-21 Thread Fabiano Rosas
Fiona Ebner writes: > Am 21.05.24 um 00:22 schrieb Fabiano Rosas: >> Fiona Ebner writes: >> >>> Migration from an 8.2 or 9.0 binary to an 8.1 binary with machine >>> version 8.1 can fail with: >>> kvm: Features 0x1c0010130afffa7 unsupported. Allowed features: 0x10179bfffe7 kvm:

[PATCH ats_vtd 19/22] memory: add an API for ATS support

2024-05-21 Thread CLEMENT MATHIEU--DRIF
IOMMU have to implement iommu_ats_request_translation to support ATS. Devices can use IOMMU_TLB_ENTRY_TRANSLATION_ERROR to check the tlb entries returned by a translation request. Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 26 ++ system/memory.c

[PATCH ats_vtd 13/22] intel_iommu: implement the get_address_space_pasid iommu operation

2024-05-21 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 13 ++--- include/hw/i386/intel_iommu.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 7d86a31bea..e83985f2f7 100644 --- a/hw/i386/intel_i

[PATCH ats_vtd 05/22] memory: add permissions in IOMMUAccessFlags

2024-05-21 Thread CLEMENT MATHIEU--DRIF
This will be necessary for devices implementing ATS. We also define a new macro IOMMU_ACCESS_FLAG_FULL in addition to IOMMU_ACCESS_FLAG to support more access flags. IOMMU_ACCESS_FLAG is kept for convenience and backward compatibility. Here are the flags added (defined by the PCIe 5 specification)

[PATCH ats_vtd 06/22] pcie: add helper to declare PASID capability for a pcie device

2024-05-21 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/pci/pcie.c | 24 +++ include/hw/pci/pcie.h | 6 +- include/hw/pci/pcie_regs.h| 3 +++ include/standard-headers/linux/pci_regs.h | 1 + 4 files changed, 33 inserti

Re: [PATCH 4/4] tests/vm: remove plain centos image

2024-05-21 Thread Thomas Huth
On 21/05/2024 14.53, Alex Bennée wrote: This isn't really used and we have lighter weight docker containers for testing this stuff directly. Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 1 - tests/vm/centos | 51 --- 2 files chang

[PATCH ats_vtd 14/22] intel_iommu: implement the get_memory_region_pasid iommu operation

2024-05-21 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index e83985f2f7..a42938aacd 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -5975,9 +5975,24 @@ stat

[PATCH ats_vtd 07/22] pcie: helper functions to check if PASID and ATS are enabled

2024-05-21 Thread CLEMENT MATHIEU--DRIF
ats_enabled and pasid_enabled check whether the capabilities are present or not. If so, we read the configuration space to get the status of the feature (enabled or not). Signed-off-by: Clément Mathieu--Drif --- hw/pci/pcie.c | 18 ++ include/hw/pci/pcie.h | 3 +++ 2 fil

[PATCH ats_vtd 00/22] ATS support for VT-d

2024-05-21 Thread CLEMENT MATHIEU--DRIF
This series belongs to a list of series that add SVM support for VT-d. As a starting point, we use the series called 'intel_iommu: Enable stage-1 translation for passthrough device' by Zhenzhong Duan and Yi Liu. Here we focus on the implementation of ATS support in the IOMMU and on a PCI-level

[PATCH ats_vtd 11/22] memory: store user data pointer in the IOMMU notifiers

2024-05-21 Thread CLEMENT MATHIEU--DRIF
This will help developers of svm devices to track a state Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 0067b2266a..359bca2ae2 100644 --- a/include/exec/memory.h +++ b/include

[PATCH ats_vtd 01/22] intel_iommu: fix FRCD construction macro.

2024-05-21 Thread CLEMENT MATHIEU--DRIF
The constant must be unsigned, otherwise the two's complement overrides the other fields when a PASID is present Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/in

[PATCH ats_vtd 15/22] memory: Allow to store the PASID in IOMMUTLBEntry

2024-05-21 Thread CLEMENT MATHIEU--DRIF
This will be useful for devices that support ATS Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 359bca2ae2..56ef48780f 100644 --- a/include/exec/memory.h +++ b/include/exec/mem

[PATCH ats_vtd 20/22] pci: add a pci-level API for ATS

2024-05-21 Thread CLEMENT MATHIEU--DRIF
Devices implementing ATS can send translation requests using pci_ats_request_translation_pasid. The invalidation events are sent back to the device using the iommu notifier managed with pci_register_iommu_tlb_event_notifier and pci_unregister_iommu_tlb_event_notifier Signed-off-by: Clément Mathie

[PATCH ats_vtd 08/22] intel_iommu: declare supported PASID size

2024-05-21 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 2 +- hw/i386/intel_iommu_internal.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index f71c04d370..7d86a31bea 100644 --- a/hw/i386/intel_iommu.c +++ b/h

  1   2   3   >