[PULL v2 12/25] qga: conditionalize schema for commands only supported on Windows

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on non-Windows. The command will be rejected at QMP dispatch time instead, avoiding reimplementing rejection

[PULL v2 00/25] Misc QEMU-GA patches 2024-07-22

2024-07-23 Thread Konstantin Kostiuk
The following changes since commit 23fa74974d8c96bc95cbecc0d4e2d90f984939f6: Merge tag 'pull-target-arm-20240718' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-07-19 07:02:17 +1000) are available in the Git repository at: https://github.com/kostyanf14/qemu.git tags/

[PULL v2 08/25] qga: conditionalize schema for commands unsupported on Windows

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on Windows. The command will be rejected at QMP dispatch time instead, avoiding reimplementing rejection by

[PULL v2 19/25] qga: move declare of QGAConfig struct to top of file

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé It is referenced by QGAState already, and it is clearer to declare all data types at the top of the file, rather than have them mixed with code later. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk Signed-off-by: Daniel P. Berrangé Reviewed-by: Ma

[PULL v2 20/25] qga: remove pointless 'blockrpcs_key' variable

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé This variable was used to support back compat for the old config file key name, and became redundant after the following change: commit a7a2d636ae4549ef0551134d4bf8e084a14431c4 Author: Philippe Mathieu-Daudé Date: Thu May 30 08:36:43 2024 +0200 qga: Remove

[PULL v2 10/25] qga: conditionalize schema for commands requiring getifaddrs

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every comamnd that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the network interface command on POSIX platforms lacking getifaddrs(). The command will be rejected at QMP dispatch time

[PULL v2 25/25] qga/linux: Add new api 'guest-network-get-route'

2024-07-23 Thread Konstantin Kostiuk
From: Dehan Meng The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng Reviewed-by: Konstantin Kostiuk Message-ID: <20240613092802.346246-2-dem...@redhat.com> Signed-off-by: Konstantin K

[PULL v2 04/25] qga: move linux fs/disk command impls to commands-linux.c

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The qmp_guest_{fstrim, get_fsinfo, get_disks} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk Signed-

[PULL v2 15/25] qga: conditionalize schema for commands requiring libudev

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the schema to fully exclude generation of the filesystem trimming commands on POSIX platforms lacking required APIs. The command will be rejected at QMP dispatch time i

[PULL v2 14/25] qga: conditionalize schema for commands requiring fstrim

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the filesystem trimming commands on POSIX platforms lacking required APIs. The command will be rejected at QMP dispatch t

[PULL v2 21/25] qga: allow configuration file path via the cli

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Allowing the user to set the QGA_CONF environment variable to change the default configuration file path is very unusual practice, made more obscure since this ability is not documented. This introduces the more normal '-c PATH' / '--config=PATH' command line argument a

[PULL v2 24/25] guest-agent: document allow-rpcs in config file section

2024-07-23 Thread Konstantin Kostiuk
From: Thomas Lamprecht While the `allow-rpcs` option is documented in the CLI options section, it was missing in the section about the configuration file syntax. And while it's mentioned that "the list of keys follows the command line options", having `block-rpcs` there but not `allow-rpcs` seem

[PULL v2 13/25] qga: conditionalize schema for commands requiring fsfreeze

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the schema to fully exclude generation of the filesystem freezing commands on POSIX platforms lacking the required APIs. The command will be rejected at QMP dispatch ti

[PULL v2 11/25] qga: conditionalize schema for commands requiring linux/win32

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Some commands were blocked based on CONFIG_FSFREEZE, but their impl had nothing todo with CONFIG_FSFREEZE, and were instead either Linux-only, or Win+Linux-only. Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QA

[PULL v2 18/25] qga: don't disable fsfreeze commands if vss_init fails

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The fsfreeze commands are already written to report an error if vss_init() fails. Reporting a more specific error message is more helpful than a generic "command is disabled" message, which cannot between an admin config decision and lack of platform support. Reviewed-by

[PULL v2 22/25] qga: centralize logic for disabling/enabling commands

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé It is confusing having many different pieces of code enabling and disabling commands, and it is not clear that they all have the same semantics, especially wrt prioritization of the block/allow lists. The code attempted to prevent the user from setting both the block and

[PULL v2 23/25] qga/commands-posix: Make ga_wait_child() return boolean

2024-07-23 Thread Konstantin Kostiuk
From: Zhao Liu Make ga_wait_child() return boolean and check the returned boolean in ga_run_command() instead of dereferencing @errp. Cc: Michael Roth Cc: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Zhao Liu Reviewed-by: Konstantin Kostiuk Message-ID: <202407161623

[PULL v2 06/25] qga: move linux memory block command impls to commands-linux.c

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The qmp_guest_{set,get}_{memory_blocks,block_info} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c This also removes a "#ifdef CONFIG_LINUX" that was nested inside a "#ifdef __linux__". Reviewed-by: Phili

[PULL v2 05/25] qga: move linux disk/cpu stats command impls to commands-linux.c

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The qmp_guest_{diskstats,cpustats} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c This also removes a "#ifdef CONFIG_LINUX" that was nested inside a "#ifdef __linux__". Reviewed-by: Philippe Mathieu-Daud

[PULL v2 17/25] qga: conditionalize schema for commands not supported on other UNIX

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on other UNIX. The command will be rejected at QMP dispatch time instead, avoiding reimplementing rejection

[PULL v2 16/25] qga: conditionalize schema for commands requiring utmpx

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the get-users command on POSIX platforms lacking required APIs. The command will be rejected at QMP dispatch time instead

[PULL v2 09/25] qga: conditionalize schema for commands unsupported on non-Linux POSIX

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on non-Linux POSIX platforms The command will be rejected at QMP dispatch time instead, avoiding reimplement

[PULL v2 07/25] qga: move CONFIG_FSFREEZE/TRIM to be meson defined options

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé Defining these at the meson level allows them to be used a conditional tests in the QAPI schemas. Signed-off-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240712132459.3974109-8-berra...@redhat.com> Signed-of

RE: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >On 7/23/24 08:13, Joao Martins wrote: >> On 23/07/2024 06:11, Duan, Zhenzhong wrote: >>> >>> -Original Message- From: Joao Martins

[PULL v2 02/25] qga: move linux vcpu command impls to commands-linux.c

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The qmp_guest_set_vcpus and qmp_guest_get_vcpus command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk Signe

[PULL v2 01/25] qga: drop blocking of guest-get-memory-block-size command

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé This command has never existed in tree, since it was renamed to guest-get-memory-block-info before being merged. Reviewed-by: Manos Pitsidianakis Reviewed-by: Konstantin Kostiuk Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <202407

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

2024-07-23 Thread Eric Auger
On 7/19/24 14:04, Joao Martins wrote: > In preparation to skip initialization of the HostIOMMUDevice for mdev, > extract the checks that validate if a device is an mdev into helpers. > > A vfio_device_is_mdev() is created, and subsystems consult VFIODevice::mdev > to check if it's mdev or not. >

[PULL v2 03/25] qga: move linux suspend command impls to commands-linux.c

2024-07-23 Thread Konstantin Kostiuk
From: Daniel P. Berrangé The qmp_guest_suspend_{disk,ram,hybrid} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk Signed-off-by

Re: [PATCH v1 01/17] intel_iommu: Use the latest fault reasons defined by spec

2024-07-23 Thread CLEMENT MATHIEU--DRIF
Reviewed-by: Clément Mathieu--Drif On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > From: Yu Zhang > > Spec revision 3.0 or above defines more detai

Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-23 Thread CLEMENT MATHIEU--DRIF
On 19/07/2024 05:39, Duan, Zhenzhong wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > >> -Original Message- >> From: Duan, Zhenzhong] >> Subject: RE: [PATCH v1 03/17] intel_iommu:

Re: [PATCH v1 09/17] intel_iommu: Flush stage-1 cache in iotlb invalidation

2024-07-23 Thread CLEMENT MATHIEU--DRIF
Reviewed-by: Clément Mathieu--Drif On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > According to spec, Page-Selective-within-Domain Invalidation (11b

Re: [PATCH v4] osdep: add a qemu_close_all_open_fd() helper

2024-07-23 Thread Clément Léger
On 23/07/2024 08:24, Philippe Mathieu-Daudé wrote: > Hi Clément, > > On 17/7/24 14:45, Clément Léger wrote: >> Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on >> POSIX"), the maximum number of file descriptors that can be opened are >> raised to nofile.rlim_max. On recent d

Re: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation

2024-07-23 Thread Eric Auger
On 7/22/24 23:13, Joao Martins wrote: > There's generally two modes of operation for IOMMUFD: > > 1) The simple user API which intends to perform relatively simple things > with IOMMUs e.g. DPDK. The process generally creates an IOAS and attaches > to VFIO and mainly performs IOAS_MAP and UNMAP.

Re: [PATCH v6 2/9] vfio/{iommufd,container}: Remove caps::aw_bits

2024-07-23 Thread Eric Auger
On 7/22/24 23:13, Joao Martins wrote: > Remove caps::aw_bits which requires the bcontainer::iova_ranges being > initialized after device is actually attached. Instead defer that to > .get_cap() and call vfio_device_get_aw_bits() directly. > > This is in preparation for HostIOMMUDevice::realize()

Re: [PATCH v6 3/9] vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps

2024-07-23 Thread Eric Auger
On 7/22/24 23:13, Joao Martins wrote: > Store the value of @caps returned by iommufd_backend_get_device_info() > in a new field HostIOMMUDeviceCaps::hw_caps. Right now the only value is > whether device IOMMU supports dirty tracking (IOMMU_HW_CAP_DIRTY_TRACKING). > > This is in preparation for H

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Eric Auger
Hi Joao, On 7/22/24 23:13, Joao Martins wrote: > Move the HostIOMMUDevice::realize() to be invoked during the attach of the > device > before we allocate IOMMUFD hardware pagetable objects (HWPT). This allows the > use > of the hw_caps obtained by IOMMU_GET_HW_INFO that essentially tell if the

Re: [PATCH v4] osdep: add a qemu_close_all_open_fd() helper

2024-07-23 Thread Marc-André Lureau
Hi On Wed, Jul 17, 2024 at 4:48 PM Clément Léger wrote: > Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on > POSIX"), the maximum number of file descriptors that can be opened are > raised to nofile.rlim_max. On recent debian distro, this yield a maximum > of 1073741816 file

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Cédric Le Goater
On 7/23/24 09:38, Eric Auger wrote: Hi Joao, On 7/22/24 23:13, Joao Martins wrote: Move the HostIOMMUDevice::realize() to be invoked during the attach of the device before we allocate IOMMUFD hardware pagetable objects (HWPT). This allows the use of the hw_caps obtained by IOMMU_GET_HW_INFO t

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Eric Auger
Hi Joao, On 7/22/24 23:13, Joao Martins wrote: > In preparation to using the dirty tracking UAPI, probe whether the IOMMU > supports dirty tracking. This is done via the data stored in > hiod::caps::hw_caps initialized from GET_HW_INFO. > > Qemu doesn't know if VF dirty tracking is supported when

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Joao Martins
On 23/07/2024 08:38, Eric Auger wrote: > Hi Joao, > > On 7/22/24 23:13, Joao Martins wrote: >> Move the HostIOMMUDevice::realize() to be invoked during the attach of the >> device >> before we allocate IOMMUFD hardware pagetable objects (HWPT). This allows >> the use >> of the hw_caps obtained b

Re: [PATCH v4] osdep: add a qemu_close_all_open_fd() helper

2024-07-23 Thread Daniel P . Berrangé
On Tue, Jul 23, 2024 at 09:16:15AM +0200, Clément Léger wrote: > > > On 23/07/2024 08:24, Philippe Mathieu-Daudé wrote: > > Hi Clément, > > > > On 17/7/24 14:45, Clément Léger wrote: > >> Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on > >> POSIX"), the maximum number of fil

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Eric Auger
On 7/23/24 09:44, Cédric Le Goater wrote: > On 7/23/24 09:38, Eric Auger wrote: >> Hi Joao, >> >> On 7/22/24 23:13, Joao Martins wrote: >>> Move the HostIOMMUDevice::realize() to be invoked during the attach >>> of the device >>> before we allocate IOMMUFD hardware pagetable objects (HWPT). This

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Cédric Le Goater
On 7/23/24 09:53, Joao Martins wrote: On 23/07/2024 08:38, Eric Auger wrote: Hi Joao, On 7/22/24 23:13, Joao Martins wrote: Move the HostIOMMUDevice::realize() to be invoked during the attach of the device before we allocate IOMMUFD hardware pagetable objects (HWPT). This allows the use of t

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Joao Martins
On 23/07/2024 08:50, Eric Auger wrote: > Hi Joao, > > On 7/22/24 23:13, Joao Martins wrote: >> In preparation to using the dirty tracking UAPI, probe whether the IOMMU >> supports dirty tracking. This is done via the data stored in >> hiod::caps::hw_caps initialized from GET_HW_INFO. >> >> Qemu do

Re: [PATCH] intel-iommu: fix Read DMAR IQA REG DW

2024-07-23 Thread Yi Liu
On 2024/7/23 10:40, Yee Li wrote: When dmar_readq or devmem2 read the DW of IQA always 0UL because "& VTD_IQA_QS". So, try to fix it. case: after vtd_mem_write IQA val: 0x100206801 after vtd_mem_read IQA val: 0x100206001 Signed-off-by: yeeli I think you may need to capitalize the first char

Re: [PATCH v6 6/9] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-23 Thread Eric Auger
Hi Joao, On 7/22/24 23:13, Joao Martins wrote: > ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that > enables or disables dirty page tracking. The ioctl is used if the hwpt > has been created with dirty tracking supported domain (stored in > hwpt::flags) and it is called on the wh

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Joao Martins
On 23/07/2024 08:55, Eric Auger wrote: > > > On 7/23/24 09:44, Cédric Le Goater wrote: >> On 7/23/24 09:38, Eric Auger wrote: >>> Hi Joao, >>> >>> On 7/22/24 23:13, Joao Martins wrote: Move the HostIOMMUDevice::realize() to be invoked during the attach of the device before we alloc

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Cédric Le Goater
On 7/23/24 10:05, Joao Martins wrote: On 23/07/2024 08:55, Eric Auger wrote: On 7/23/24 09:44, Cédric Le Goater wrote: On 7/23/24 09:38, Eric Auger wrote: Hi Joao, On 7/22/24 23:13, Joao Martins wrote: Move the HostIOMMUDevice::realize() to be invoked during the attach of the device before

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Eric Auger
On 7/23/24 10:00, Joao Martins wrote: > On 23/07/2024 08:50, Eric Auger wrote: >> Hi Joao, >> >> On 7/22/24 23:13, Joao Martins wrote: >>> In preparation to using the dirty tracking UAPI, probe whether the IOMMU >>> supports dirty tracking. This is done via the data stored in >>> hiod::caps::hw_

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Eric Auger
On 7/23/24 10:05, Joao Martins wrote: > On 23/07/2024 08:55, Eric Auger wrote: >> >> On 7/23/24 09:44, Cédric Le Goater wrote: >>> On 7/23/24 09:38, Eric Auger wrote: Hi Joao, On 7/22/24 23:13, Joao Martins wrote: > Move the HostIOMMUDevice::realize() to be invoked during the

Re: [PATCH v6 6/9] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-23 Thread Joao Martins
On 23/07/2024 09:03, Eric Auger wrote: > Hi Joao, > > On 7/22/24 23:13, Joao Martins wrote: >> ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that >> enables or disables dirty page tracking. The ioctl is used if the hwpt >> has been created with dirty tracking supported domain (sto

Re: [PATCH v6 6/9] vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support

2024-07-23 Thread Eric Auger
On 7/23/24 10:14, Joao Martins wrote: > On 23/07/2024 09:03, Eric Auger wrote: >> Hi Joao, >> >> On 7/22/24 23:13, Joao Martins wrote: >>> ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that >>> enables or disables dirty page tracking. The ioctl is used if the hwpt >>> has been c

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-23 Thread Joao Martins
On 23/07/2024 09:09, Eric Auger wrote: > > > On 7/23/24 10:00, Joao Martins wrote: >> On 23/07/2024 08:50, Eric Auger wrote: >>> Hi Joao, >>> >>> On 7/22/24 23:13, Joao Martins wrote: In preparation to using the dirty tracking UAPI, probe whether the IOMMU supports dirty tracking. This

RE: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke >HostIOMMUDevice::realize() during attach_device() > >On 23/07/2024 08:55, Eric Auger wrote: >> >> >> On 7/23/24 09:44, Cédric Le Goater wrote: >>> On 7/23/24 09:38, Eric Auger wrote: >>

Re: [PATCH v6 8/9] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-23 Thread Eric Auger
On 7/22/24 23:13, Joao Martins wrote: > By default VFIO migration is set to auto, which will support live > migration if the migration capability is set *and* also dirty page > tracking is supported. > > For testing purposes one can force enable without dirty page tracking > via enable-migration

Re: [RFC PATCH v5 8/8] rust/pl011: vendor dependencies

2024-07-23 Thread Zhao Liu
Hi Manos, (This patch contains too many codes so that mail list rejects to display it at https://lore.kernel.org/qemu-devel) Please correct me if I'm wrong... Is the reason for not using git submodules here because v5 abandoned compilation through Cargo, so it’s necessary to add meson.build to t

Re: [RFC PATCH v5 5/8] .gitattributes: add Rust diff and merge attributes

2024-07-23 Thread Zhao Liu
On Mon, Jul 22, 2024 at 02:43:35PM +0300, Manos Pitsidianakis wrote: > Date: Mon, 22 Jul 2024 14:43:35 +0300 > From: Manos Pitsidianakis > Subject: [RFC PATCH v5 5/8] .gitattributes: add Rust diff and merge > attributes > X-Mailer: git-send-email 2.44.0 > > Set rust source code to diff=rust (bui

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Eric Auger
On 7/23/24 10:20, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Joao Martins >> Subject: Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke >> HostIOMMUDevice::realize() during attach_device() >> >> On 23/07/2024 08:55, Eric Auger wrote: >>> >>> On 7/23/24 09:44, Cédric Le Go

Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke HostIOMMUDevice::realize() during attach_device()

2024-07-23 Thread Joao Martins
On 23/07/2024 09:24, Eric Auger wrote: > > > On 7/23/24 10:20, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Joao Martins >>> Subject: Re: [PATCH v6 4/9] vfio/{iommufd,container}: Invoke >>> HostIOMMUDevice::realize() during attach_device() >>> >>> On 23/07/2024 08:55, Eric

Re: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page tracking

2024-07-23 Thread Eric Auger
On 7/22/24 23:13, Joao Martins wrote: > The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole > tracking of VF pre-copy phase of dirty page tracking, though it means > that it will only be used at the start of the switchover phase. > > Add an option that disables the VF dirty

Re: [RFC PATCH v5 2/8] build deps: update lcitool to include rust bits

2024-07-23 Thread Richard Henderson
On 7/22/24 21:43, Manos Pitsidianakis wrote: From: Alex Bennée For rust development we need cargo, rustc and bindgen in our various development environments. Update the libvirt-ci project to (!495) and regenerate the containers and other dependency lists. The cover letter for v5 says use of ca

Re: [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-23 Thread Richard Henderson
On 7/22/24 21:43, Manos Pitsidianakis wrote: Add job that builds with rust support enabled on debian. Signed-off-by: Manos Pitsidianakis --- .gitlab-ci.d/buildtest.yml | 11 +++ 1 file changed, 11 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 0/9] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-23 Thread Cédric Le Goater
On 7/22/24 23:13, Joao Martins wrote: This small series adds support for IOMMU dirty tracking support via the IOMMUFD backend. The hardware capability is available on most recent x86 hardware (and these SMMUv3 in upcoming v6.11). The series is divided organized as follows: * Patches 1 - 7: IOMMU

Re: [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-23 Thread Daniel P . Berrangé
On Mon, Jul 22, 2024 at 02:43:33PM +0300, Manos Pitsidianakis wrote: > Add job that builds with rust support enabled on debian. > > Signed-off-by: Manos Pitsidianakis > --- > .gitlab-ci.d/buildtest.yml | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/.gitlab-ci.d/buildtest.

Re: [PATCH v5 04/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize()

2024-07-23 Thread Philippe Mathieu-Daudé
On 18/7/24 15:32, Philippe Mathieu-Daudé wrote: From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_finalize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signe

Re: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page tracking

2024-07-23 Thread Joao Martins
On 23/07/2024 09:31, Eric Auger wrote: > > > On 7/22/24 23:13, Joao Martins wrote: >> The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >> tracking of VF pre-copy phase of dirty page tracking, though it means >> that it will only be used at the start of the switchover phase

[PATCH] qemu-keymap: Release local allocation references

2024-07-23 Thread Akihiko Odaki
ach(map, walk_map, state); +xkb_state_unref(state); +xkb_keymap_unref(map); /* add quirks */ fprintf(outfile, --- base-commit: a87a7c449e532130d4fa8faa391ff7e1f04ed660 change-id: 20240723-unref-d62e2b8338f4 Best regards, -- Akihiko Odaki

RE: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-23 Thread Duan, Zhenzhong
>-Original Message- >From: CLEMENT MATHIEU--DRIF >Subject: Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for >scalable modern mode > > > >On 19/07/2024 05:39, Duan, Zhenzhong wrote: >> Caution: External email. Do not open attachments or click links, unless this >email come

Re: [PATCH v6 0/9] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-23 Thread Joao Martins
On 23/07/2024 09:35, Cédric Le Goater wrote: > On 7/22/24 23:13, Joao Martins wrote: >> This small series adds support for IOMMU dirty tracking support via the >> IOMMUFD backend. The hardware capability is available on most recent x86 >> hardware (and these SMMUv3 in upcoming v6.11). The series is

Re: [PATCH v6 0/9] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-23 Thread Cédric Le Goater
On 7/23/24 10:56, Joao Martins wrote: On 23/07/2024 09:35, Cédric Le Goater wrote: On 7/22/24 23:13, Joao Martins wrote: This small series adds support for IOMMU dirty tracking support via the IOMMUFD backend. The hardware capability is available on most recent x86 hardware (and these SMMUv3 in

Re: [PATCH v3] target/s390x: filter deprecated properties based on model expansion type

2024-07-23 Thread Thomas Huth
On 22/07/2024 16.50, Collin Walling wrote: On 7/20/24 1:33 AM, Markus Armbruster wrote: Collin Walling writes: Currently, there is no way to execute the query-cpu-model-expansion command to retrieve a comprehenisve list of deprecated properties, as the result is dependent per-model. To enable

QEMU Community Call Agenda Items (July 23rd, 2024)

2024-07-23 Thread Alex Bennée
Hi, The KVM/QEMU community call is at: https://meet.jit.si/kvmcallmeeting @ 23/07/2024 14:00 UTC Unfortunately I won't be able to make it to chair but everyone on the invite list should be able to start the call and edit the notes (see link in the invite). Are there any agenda items for the s

Re: [PATCH v5 04/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize()

2024-07-23 Thread gaosong
在 2024/7/23 下午4:41, Philippe Mathieu-Daudé 写道: On 18/7/24 15:32, Philippe Mathieu-Daudé wrote: From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_finalize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description

[PATCH v2 2/2] linux-user/main: Check errno when getting AT_EXECFD

2024-07-23 Thread Vivian Wang
It's possible for AT_EXECFD to end up with a valid value of 0. Check errno when using qemu_getauxval instead of return value to handle this case. Not handling this case leads to a confusing condition where the executable ends up as fd 0, i.e. stdin. Signed-off-by: Vivian Wang Reviewed-by: Richar

[PATCH v2 0/2] linux-user: Fix handling when AT_EXECFD is 0

2024-07-23 Thread Vivian Wang
Found when trying to build coreutils under linux-user as binfmt_misc interpreter with "open-binary" flag. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2448 Changes since v1 [1]: - Removed old glibc check in patch 1 - Added Reviewed-by [1]: https://lore.kernel.org/qemu-devel/2024072109

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

2024-07-23 Thread Vivian Wang
Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make sure that we can distinguish between a valid zero value and a not found entry by setting errno. Assumes that getauxval from sys/auxv.h sets errno correctly. Signed-off-by: Vivian Wang --- util/getauxval.c | 6 +- 1 file ch

Re: [RFC PATCH] macos: Allow coredump generation

2024-07-23 Thread Akihiko Odaki
On 2024/07/23 18:09, Phil Dennis-Jordan wrote: This can certainly be useful in various situations! However, wholesale enabling get-task-allow will enable other processes on the system to inject code, connect a debugger, etc. to the Qemu process. Normally, this is only something you'd enable for

Re: [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-23 Thread Manos Pitsidianakis
On Tue, 23 Jul 2024 11:39, "Daniel P. Berrangé" wrote: On Mon, Jul 22, 2024 at 02:43:33PM +0300, Manos Pitsidianakis wrote: Add job that builds with rust support enabled on debian. Signed-off-by: Manos Pitsidianakis --- .gitlab-ci.d/buildtest.yml | 11 +++ 1 file changed, 11 insertio

Re: [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-23 Thread Daniel P . Berrangé
On Tue, Jul 23, 2024 at 01:06:20PM +0300, Manos Pitsidianakis wrote: > On Tue, 23 Jul 2024 11:39, "Daniel P. Berrangé" wrote: > > On Mon, Jul 22, 2024 at 02:43:33PM +0300, Manos Pitsidianakis wrote: > > > Add job that builds with rust support enabled on debian. > > > > > > Signed-off-by: Manos Pi

Re: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page tracking

2024-07-23 Thread Eric Auger
On 7/23/24 10:42, Joao Martins wrote: > On 23/07/2024 09:31, Eric Auger wrote: >> >> On 7/22/24 23:13, Joao Martins wrote: >>> The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >>> tracking of VF pre-copy phase of dirty page tracking, though it means >>> that it will only

Re: [RFC PATCH v5 2/8] build deps: update lcitool to include rust bits

2024-07-23 Thread Manos Pitsidianakis
Hello Richard, On Tue, 23 Jul 2024 11:31, Richard Henderson wrote: On 7/22/24 21:43, Manos Pitsidianakis wrote: From: Alex Bennée For rust development we need cargo, rustc and bindgen in our various development environments. Update the libvirt-ci project to (!495) and regenerate the containe

Re: [PATCH 0/4] ui: fixes for dbus clipboard hanling

2024-07-23 Thread Akihiko Odaki
On 2024/07/18 2:15, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, -display dbus clipboard is broken after a client reconnection. The two main issues are capabilities not renegotiated (and thus guest agent not fully functional), and qemu clipboard serial not correctly reset. M

Re: [PATCH 1/8] hw/core: Make CPU topology enumeration arch-agnostic

2024-07-23 Thread Markus Armbruster
Zhao Liu writes: > Hi Markus, > > On Mon, Jul 22, 2024 at 03:24:24PM +0200, Markus Armbruster wrote: >> Date: Mon, 22 Jul 2024 15:24:24 +0200 >> From: Markus Armbruster >> Subject: Re: [PATCH 1/8] hw/core: Make CPU topology enumeration >> arch-agnostic >> >> One little thing... >> >> Zhao Liu

Re: [PATCH v5 04/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize()

2024-07-23 Thread Philippe Mathieu-Daudé
On 23/7/24 12:00, gaosong wrote: 在 2024/7/23 下午4:41, Philippe Mathieu-Daudé 写道: On 18/7/24 15:32, Philippe Mathieu-Daudé wrote: From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_finalize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigge

Re: [RFC PATCH v5 1/8] build-sys: Add rust feature option

2024-07-23 Thread Manos Pitsidianakis
On Tue, 23 Jul 2024 09:37, Zhao Liu wrote: Hi Manos, On Mon, Jul 22, 2024 at 02:43:31PM +0300, Manos Pitsidianakis wrote: Date: Mon, 22 Jul 2024 14:43:31 +0300 From: Manos Pitsidianakis Subject: [RFC PATCH v5 1/8] build-sys: Add rust feature option X-Mailer: git-send-email 2.44.0 Add rust fe

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

2024-07-23 Thread Hanna Czenczek
On 22.07.24 23:32, Richard Henderson wrote: On 7/22/24 10:16, Michael S. Tsirkin wrote: A couple of fixes are outstanding, will merge later. The following changes since commit a87a7c449e532130d4fa8faa391ff7e1f04ed660:    Merge tag 'pull-loongarch-20240719' ofhttps://gitlab.com/gaosong/qemu

Re: [PATCH v5 00/19] Reconstruct loongson ipi driver

2024-07-23 Thread Philippe Mathieu-Daudé
On 19/7/24 15:04, Philippe Mathieu-Daudé wrote: On 19/7/24 14:56, Jiaxun Yang wrote: 在2024年7月18日七月 下午9:32,Philippe Mathieu-Daudé写道: Since v4: - Fix build failure due to rebase (Song) - Loongarch -> LoongArch (Song) - Added Song's tags Since v3: - Use DEFINE_TYPES() macro (unreviewed patch #1

Re: [PATCH] hw/nubus/nubus-virtio-mmio: Fix missing ERRP_GUARD() in nubus_virtio_mmio_realize()

2024-07-23 Thread Markus Armbruster
Zhao Liu writes: > As the comment in qapi/error, dereferencing @errp requires Suggest "According to the comment in qapi/error.h". > ERRP_GUARD(): > > * = Why, when and how to use ERRP_GUARD() = > * > * Without ERRP_GUARD(), use of the @errp parameter is restricted: > * - It must not be derefere

Re: [RFC PATCH v5 8/8] rust/pl011: vendor dependencies

2024-07-23 Thread Manos Pitsidianakis
On Tue, 23 Jul 2024 11:37, Zhao Liu wrote: Hi Manos, (This patch contains too many codes so that mail list rejects to display it at https://lore.kernel.org/qemu-devel) Please correct me if I'm wrong... Is the reason for not using git submodules here because v5 abandoned compilation through Ca

Re: [RFC PATCH v5 3/8] CI: Add build-system-rust-debian job

2024-07-23 Thread Manos Pitsidianakis
On Tue, 23 Jul 2024 13:11, "Daniel P. Berrangé" wrote: On Tue, Jul 23, 2024 at 01:06:20PM +0300, Manos Pitsidianakis wrote: On Tue, 23 Jul 2024 11:39, "Daniel P. Berrangé" wrote: > On Mon, Jul 22, 2024 at 02:43:33PM +0300, Manos Pitsidianakis wrote: > > Add job that builds with rust support en

[PATCH] meson: build chardev trace files when have_block

2024-07-23 Thread Daniel P . Berrangé
The QSD depends on chardev code, and is built when have_tools is true. This means conditionalizing chardev trace on have_system is wrong, we need have_block which is set have_system || have_tools. This latent bug was historically harmless because only the spice chardev included tracing, which wasn

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

2024-07-23 Thread Michael S. Tsirkin
On Tue, Jul 23, 2024 at 12:18:48PM +0200, Hanna Czenczek wrote: > On 22.07.24 23:32, Richard Henderson wrote: > > On 7/22/24 10:16, Michael S. Tsirkin wrote: > > > A couple of fixes are outstanding, will merge later. > > > > > > > > > The following changes since commit > > > a87a7c449e532130d4fa8

[PULL v2 01/61] hw/virtio/virtio-crypto: Fix op_code assignment in virtio_crypto_create_asym_session

2024-07-23 Thread Michael S. Tsirkin
From: Zheyu Ma Currently, if the function fails during the key_len check, the op_code does not have a proper value, causing virtio_crypto_free_create_session_req not to free the memory correctly, leading to a memory leak. By setting the op_code before performing any checks, we ensure that virtio

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

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

[PULL v2 02/61] MAINTAINERS: add Stefano Garzarella as vhost/vhost-user reviewer

2024-07-23 Thread Michael S. Tsirkin
From: Stefano Garzarella I have recently been working on supporting vhost-user on any POSIX, so I want to help maintain it. Cc: Michael S. Tsirkin Signed-off-by: Stefano Garzarella Message-Id: <20240704081336.21208-1-sgarz...@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Michael S. Tsirki

[PULL v2 09/61] hw/cxl: Add get scan media results cmd support

2024-07-23 Thread Michael S. Tsirkin
From: Davidlohr Bueso Iterate over the list keeping the output payload size into account, returning the results from a previous scan media operation. The scan media operation does not fail prematurely due to device being out of storage, so this implementation does not deal with the retry/restart

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

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

[PULL v2 14/61] hw/cxl: Support firmware updates

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

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

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

[PULL v2 15/61] MAINTAINERS: Add myself as a VT-d reviewer

2024-07-23 Thread Michael S. Tsirkin
From: Yi Liu Signed-off-by: Yi Liu Message-Id: <20240708032112.796339-1-yi.l@intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b7e9ced3e8..8ad64ff76b 100644 --- a

  1   2   3   4   >