[PATCH V2] libxl: Reject VM config referencing nwfilters

2024-09-12 Thread Jim Fehlig via Devel
ignoring a user's request to filter VM network traffic can be viewed as a security issue. Signed-off-by: Jim Fehlig --- This is a V2 of patch2 from this series https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/QDRDSKDLL5GZVXDSIJO5R32Q5F4AFZLR/ I've pushed patch1.

Re: [PATCH 2/2] libxl: Reject VM config referencing nwfilters

2024-09-12 Thread Jim Fehlig via Devel
On 9/12/24 01:37, Peter Krempa wrote: On Wed, Sep 11, 2024 at 18:24:07 -0400, Laine Stump wrote: On 9/11/24 5:02 PM, Jim Fehlig via Devel wrote: The Xen libxl driver does not support nwfilter. Add a check for nwfilters to the devicesPostParseCallback, returning VIR_ERR_CONFIG_UNSUPPORTED if

Re: [PATCH 1/2] docs: Clarify hypervisor support for nwfilter profiles

2024-09-12 Thread Jim Fehlig via Devel
On 9/11/24 16:47, Jim Fehlig wrote: On 9/11/24 16:08, Laine Stump wrote: On 9/11/24 5:02 PM, Jim Fehlig via Devel wrote: Enhance the 'since' annotation of documentation to note it's only supported by the QEMU, LXC, and ch hypervisor drivers. Signed-off-by: Jim Feh

Re: [PATCH 2/2] libxl: Reject VM config referencing nwfilters

2024-09-11 Thread Jim Fehlig via Devel
On 9/11/24 16:24, Laine Stump wrote: On 9/11/24 5:02 PM, Jim Fehlig via Devel wrote: The Xen libxl driver does not support nwfilter. Add a check for nwfilters to the devicesPostParseCallback, returning VIR_ERR_CONFIG_UNSUPPORTED if any are found. It's generally preferred for drivers to i

Re: [PATCH 1/2] docs: Clarify hypervisor support for nwfilter profiles

2024-09-11 Thread Jim Fehlig via Devel
On 9/11/24 16:08, Laine Stump wrote: On 9/11/24 5:02 PM, Jim Fehlig via Devel wrote: Enhance the 'since' annotation of documentation to note it's only supported by the QEMU, LXC, and ch hypervisor drivers. Signed-off-by: Jim Fehlig ---   docs/formatdomain.rst | 8   1

Re: [PATCH 1/2] docs: Clarify hypervisor support for nwfilter profiles

2024-09-11 Thread Jim Fehlig via Devel
On 9/11/24 15:54, Demi Marie Obenour wrote: On Wed, Sep 11, 2024 at 03:02:41PM -0600, Jim Fehlig wrote: Enhance the 'since' annotation of documentation to note it's only supported by the QEMU, LXC, and ch hypervisor drivers. Signed-off-by: Jim Fehlig --- docs/forma

Re: [PATCH 0/2] Reject Xen VM config containing nwfilter references

2024-09-11 Thread Jim Fehlig via Devel
On 9/11/24 15:49, Demi Marie Obenour wrote: On Wed, Sep 11, 2024 at 03:02:40PM -0600, Jim Fehlig wrote: This is essentially V2 of a small series inspired by a report on the security list about nwfilters not working with Xen VMs. V1 was posted to the security list, so no public reference. The

[PATCH 2/2] libxl: Reject VM config referencing nwfilters

2024-09-11 Thread Jim Fehlig via Devel
raffic can be viewed as a security issue. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 0f129ec69c..2f6cebb8ae 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libx

[PATCH 1/2] docs: Clarify hypervisor support for nwfilter profiles

2024-09-11 Thread Jim Fehlig via Devel
Enhance the 'since' annotation of documentation to note it's only supported by the QEMU, LXC, and ch hypervisor drivers. Signed-off-by: Jim Fehlig --- docs/formatdomain.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.rst b/docs/f

[PATCH 0/2] Reject Xen VM config containing nwfilter references

2024-09-11 Thread Jim Fehlig via Devel
ns :-P. Patch2 rejects Xen VM config containg in their definitions. Jim Fehlig (2): docs: Clarify hypervisor support for nwfilter profiles libxl: Reject VM config referencing nwfilters docs/formatdomain.rst| 8 src/libxl/libxl_domain.c | 7 +++ 2 files changed,

Re: [PATCH V2 0/2] qemu: Clarify purpose of image format settings

2024-08-30 Thread Jim Fehlig via Devel
Hi All, Any comments on this idea? Recall the motivation for this change is to subsequently use the image format settings to request mapped-ram. Regards, Jim On 8/16/24 16:25, Jim Fehlig wrote: The current documentation of the various foo_image_format settings in qemu.conf subtly implies

Discouraging use of virInterface* APIs

2024-08-21 Thread Jim Fehlig via Devel
Laine's attempt long ago [1] to deprecate/obsolete the virInterface* APIs did not receive a standing ovation. However he raised many good points which are still valid today. If anything, netcf, the libvirt netcf backend, and the whole interface driver have become more stale. Personally, I wish w

Re: [PATCH 0/2] qemu: Clarify purpose of image format settings

2024-08-16 Thread Jim Fehlig via Devel
On 8/16/24 11:20, Jim Fehlig wrote: The current documentation of the various foo_image_format settings in qemu.conf subtly implies they are only used for specifying compression. Patch1 of this small series attempts to clarify and improve the description of the settings. It defines image format

[PATCH V2 2/2] qemu: Use consistent naming for save image format

2024-08-16 Thread Jim Fehlig via Devel
The image format setting in qemu.conf is named 'save_image_format'. The enum of supported format types is declared with name 'virQEMUSaveFormat'. Let's be consistent and use 'format' instead of 'compressed' when referring to the save image form

[PATCH V2 1/2] qemu: conf: Improve the foo_image_format setting descriptions

2024-08-16 Thread Jim Fehlig via Devel
other possible layouts. Signed-off-by: Jim Fehlig --- src/qemu/qemu.conf.in | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in index 6bc2140dcb..d4fdd717ba 100644 --- a/src/qemu/qemu.conf.in

[PATCH V2 0/2] qemu: Clarify purpose of image format settings

2024-08-16 Thread Jim Fehlig via Devel
of guest memory blocks on disk. Patch2 changes the use of 'compressed' with 'format' throughout the code, removing implication that format == compressed. V2: Replace more uses of 'compressed' with 'format' in patch2 Jim Fehlig (2): qemu: conf: Improve t

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-16 Thread Jim Fehlig via Devel
On 8/12/24 17:16, Jim Fehlig wrote: On 8/7/24 09:45, Daniel P. Berrangé wrote: Annoyingly we already have a 'save_image_formt' in qemu.conf though taking  'raw', 'zstd', 'lzop', etc to choose the compression type. So we have a terminology clash. Thi

[PATCH 2/2] qemu: Rename compressed field of save image header

2024-08-16 Thread Jim Fehlig via Devel
The corresponding qemu.conf setting is named save_image_format and the enum of supported format types is declared with name virQEMUSaveFormat. Let's be consistent and use 'format' instead of 'compressed' as a field name in the virQEMUSaveHeader struct. Signed-off-by:

[PATCH 1/2] qemu: conf: Improve the foo_image_format setting descriptions

2024-08-16 Thread Jim Fehlig via Devel
other possible layouts. Signed-off-by: Jim Fehlig --- If something like this is agreeable, I'd remove the sentences about 'mapped' format and include those in the mapped-ram work. src/qemu/qemu.conf.in | 46 --- 1 file changed, 30 in

[PATCH 0/2] qemu: Clarify purpose of image format settings

2024-08-16 Thread Jim Fehlig via Devel
of guest memory blocks on disk. Patch2 changes the name of the 'compressed' field of virQEMUSaveHeader to 'format', removing implication that format == compressed in the code. Jim Fehlig (2): qemu: conf: Improve the foo_image_format setting descriptions qemu: Rename comp

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-12 Thread Jim Fehlig via Devel
On 8/7/24 09:45, Daniel P. Berrangé wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: This series is a RFC for support of QEMU's mapped-ram migration capability [1] for saving and restoring VMs. It implements the first part of the design approach we discusse

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-08 Thread Jim Fehlig via Devel
On 8/8/24 17:46, Jim Fehlig wrote: On 8/7/24 12:39, Daniel P. Berrangé wrote: On Wed, Aug 07, 2024 at 12:04:18PM -0600, Jim Fehlig wrote: On 8/7/24 09:45, Daniel P. Berrangé wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: The QEMU mapped-ram capability currently

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-08 Thread Jim Fehlig via Devel
On 8/7/24 12:39, Daniel P. Berrangé wrote: On Wed, Aug 07, 2024 at 12:04:18PM -0600, Jim Fehlig wrote: On 8/7/24 09:45, Daniel P. Berrangé wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: The QEMU mapped-ram capability currently does not support directio. Fabino is

[PATCH 20/20] tools: add parallel parameter to virsh restore command

2024-08-08 Thread Jim Fehlig via Devel
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- docs/manpages/virsh.rst | 9 +++-- tools/virsh-domain.c| 38 ++ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs

[PATCH 19/20] tools: add parallel parameter to virsh save command

2024-08-08 Thread Jim Fehlig via Devel
From: Li Zhang Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- tools/virsh-domain.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 50e80689a2..ec0e43ae7b 100644 --- a

[PATCH 18/20] qemu: Add support for parallel save and restore

2024-08-08 Thread Jim Fehlig via Devel
Add support for parallel save and restore by mapping libvirt's "parallel-connections" parameter to QEMU's "multifd-channels" migration parameter. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 31 --- src/qem

[PATCH 17/20] include: Define constants for parallel save/restore

2024-08-08 Thread Jim Fehlig via Devel
. Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- include/libvirt/libvirt-domain.h | 13 + src/libvirt-domain.c | 6 ++ 2 files changed, 19 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 4266237abe

[PATCH 16/20] qemu: Support O_DIRECT with mapped-ram on restore

2024-08-08 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 11 ++- src/qemu/q

[PATCH 15/20] qemu: Support O_DIRECT with mapped-ram on save

2024-08-08 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 9 + src/qemu/qemu_mig

[PATCH 14/20] qemu: Add support for mapped-ram on restore

2024-08-08 Thread Jim Fehlig via Devel
quot;execute":"migrate-incoming", "arguments":{"uri":"file:/dev/fdset/0,offset=0x119eb"}} Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 26 +- src/qemu/qemu_migration.c | 11 src/qemu/qemu_process.c | 58

[PATCH 12/20] qemu: Move creation of qemuProcessIncomingDef struct

2024-08-08 Thread Jim Fehlig via Devel
qemuProcessStartWithMemoryState() is the only caller of qemuProcessStart() that uses the qemuProcessIncomingDef struct. Move creation of the struct to qemuProcessStartWithMemoryState(). Signed-off-by: Jim Fehlig --- src/qemu/qemu_process.c | 44 - src

[PATCH 13/20] qemu: Apply migration parameters in qemuMigrationDstRun

2024-08-08 Thread Jim Fehlig via Devel
Similar to qemuMigrationSrcRun, apply migration parameters in qemuMigrationDstRun. This allows callers to create customized migration parameters, but delegates their application to the function performing the migration. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 15

[PATCH 11/20] qemu: Decompose qemuSaveImageOpen

2024-08-08 Thread Jim Fehlig via Devel
Split the reading of libvirt's save image metadata from the opening of the fd that will be passed to QEMU. This provides flexibility for an upcoming patch adding mapped-ram support for restore. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 37 src

[PATCH 10/20] qemu: Add support for mapped-ram on save

2024-08-08 Thread Jim Fehlig via Devel
#x27;s support for save image compression. Also note the mapped-ram stream is incompatible with the existing stream format, hence mapped-ram cannot be used to restore an image saved with the existing format and vice versa. [1] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/mig

[PATCH 09/20] qemu: Add helper function for creating save image fd

2024-08-08 Thread Jim Fehlig via Devel
Move the code in qemuSaveImageCreate that opens, labels, and wraps the save image fd to a helper function, providing more flexibility for upcoming mapped-ram support. Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 65 +++ 1 file changed, 45

[PATCH 08/20] qemu: conf: Add setting for save image version

2024-08-08 Thread Jim Fehlig via Devel
Add a 'save_image_version' setting to qemu.conf to control the image version when saving a VM with 'virsh save' or 'virsh managedsave'. Default to the new version 3. Signed-off-by: Jim Fehlig --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf.in

[PATCH 07/20] qemu: QEMU_SAVE_VERSION: Bump to version 3

2024-08-08 Thread Jim Fehlig via Devel
am.rst?ref_type=heads Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 7 +++ src/qemu/qemu_saveimage.h | 9 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 018ab5a222..50fec33f54 100644

[PATCH 06/20] qemu: Add function to get migration params for save

2024-08-08 Thread Jim Fehlig via Devel
work to support parallel save/restore can set the number of channels to a user-specified value. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c| 2 +- src/qemu/qemu_migration_params.c | 21 + src/qemu/qemu_migration_params.h | 3 +++ 3 files changed, 25

[PATCH 05/20] qemu: Add mapped-ram migration capability

2024-08-08 Thread Jim Fehlig via Devel
Add the mapped-ram migration capability introduced in QEMU 9.0. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 1 + src/qemu/qemu_migration_params.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index

[PATCH 04/20] qemu: Add function to get bool value from migration params

2024-08-08 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 18 ++ src/qemu/qemu_migration_params.h | 5 + 2 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index c3c9120c22..daa52269f4 100644 --- a/src

[PATCH 03/20] qemu: Add function to check capability in migration params

2024-08-08 Thread Jim Fehlig via Devel
Add new function qemuMigrationParamsCapEnabled() to check if a capability is set in the caller-provided migration parameters. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 16 src/qemu/qemu_migration_params.h | 4 2 files changed, 20 insertions(+) diff

[PATCH 01/20] lib: virDomainSaveParams: Ensure absolute save path

2024-08-08 Thread Jim Fehlig via Devel
When invoking virDomainSaveParams with a relative path, the image is saved to the daemon's CWD, which in most cases is '/'. Ensure a relative path is converted to absolute before invoking the driver 'domainSaveParams' function. Signed-off-by: Jim Fehlig ---

[PATCH 02/20] qemu_fd: Add function to retrieve fdset ID

2024-08-08 Thread Jim Fehlig via Devel
Add new function qemuFDPassGetId() for retrieving the fdset ID of provided qemuFDPass object. Signed-off-by: Jim Fehlig --- src/qemu/qemu_fd.c | 18 ++ src/qemu/qemu_fd.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c index

[PATCH 00/20] qemu: support mapped-ram+directio+mulitfd

2024-08-08 Thread Jim Fehlig via Devel
rt.org/message/EF6YS5YIPYF2JXFMSKP6OLEJ2XWXJ3XW/ [2] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/mapped-ram.rst?ref_type=heads [3] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/K4BDDJDMJ22XMJEFAUE323H5S5E47VQX/ Claudio Fontana (2): include:

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-07 Thread Jim Fehlig via Devel
On 8/7/24 09:49, Daniel P. Berrangé wrote: On Wed, Aug 07, 2024 at 02:32:57PM +0200, Martin Kletzander wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: This series is a RFC for support of QEMU's mapped-ram migration capability [1] for saving and restoring VM

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-07 Thread Jim Fehlig via Devel
On 8/7/24 09:45, Daniel P. Berrangé wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: This series is a RFC for support of QEMU's mapped-ram migration capability [1] for saving and restoring VMs. It implements the first part of the design approach we discusse

Re: [PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-08-07 Thread Jim Fehlig via Devel
Hi Martin, On 8/7/24 06:32, Martin Kletzander wrote: On Thu, Jun 13, 2024 at 04:43:14PM -0600, Jim Fehlig via Devel wrote: This series is a RFC for support of QEMU's mapped-ram migration capability [1] for saving and restoring VMs. It implements the first part of the design approa

Re: [PATCH] apparmor: Allow more paths for qemu-bridge-helper

2024-08-06 Thread Jim Fehlig via Devel
/usr.sbin.libvirtd.in | 4 ++-- src/security/apparmor/usr.sbin.virtqemud.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Jim Fehlig Regards, Jim diff --git a/src/security/apparmor/usr.sbin.libvirtd.in b/src/security/apparmor/usr.sbin.libvirtd.in index 1601d73d47..5fa5c7842c 100644

Re: [PATCH] virt-aa-helper: Drop needless comments

2024-07-09 Thread Jim Fehlig via Devel
Drop them. Signed-off-by: Michal Privoznik Reviewed-by: Jim Fehlig --- src/security/virt-aa-helper.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index a3f85d26b0..c1e89dc6cf 100644 --- a/src/

[PATCH RFC 9/9] qemu: Support O_DIRECT with mapped-ram on restore

2024-06-13 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 22 +- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_process.c | 20 src/qemu/qemu_process.h | 3 +++ src/qemu/qemu_saveimage.c | 29 + src/qemu/qemu_saveimage.h

[PATCH RFC 8/9] qemu: Support O_DIRECT with mapped-ram on save

2024-06-13 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- I'm not happy with this and the subsequent patch, which pass another FD around for QEMU to use for reading/writing unaligned state when BYPASS_CACHE has been specified. One idea is to pass the qemuFdPass object around the various functions, but qemu_fd.h al

[PATCH RFC 7/9] qemu: Enable mapped-ram on restore

2024-06-13 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 19 +++ src/qemu/qemu_migration.h | 3 ++- src/qemu/qemu_process.c | 49 --- src/qemu/qemu_process.h | 13 +++ src/qemu/qemu_saveimage.c | 26 ++--- 5 files

[PATCH RFC 6/9] qemu: Add support for mapped-ram on save

2024-06-13 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 2 +- src/qemu/qemu_migration.c | 79 src/qemu/qemu_migration.h | 7 +++ src/qemu/qemu_monitor.c | 32 src/qemu/qemu_monitor.h | 4 ++ src/qemu/qemu_saveimage.c | 105

[PATCH RFC 5/9] qemu: conf: Add setting for save image version

2024-06-13 Thread Jim Fehlig via Devel
Add a 'save_image_version' setting to qemu.conf to control the image version when saving a VM with 'virsh save' or 'virsh managedsave'. Default to the new version 3. Signed-off-by: Jim Fehlig --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf.in

[PATCH RFC 4/9] qemu: Add a 'features' element to save image header and bump version

2024-06-13 Thread Jim Fehlig via Devel
igration/mapped-ram.rst?ref_type=heads Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 7 +++ src/qemu/qemu_saveimage.h | 9 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 018ab5a222..50fec33f54 100644

[PATCH RFC 3/9] qemu: Add function to get migration params for save

2024-06-13 Thread Jim Fehlig via Devel
to 1. Future work to support parallel save/restore can set the number of channels specified by the user. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 19 +++ src/qemu/qemu_migration_params.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/src/qemu

[PATCH RFC 2/9] qemu_fd: Add function to retrieve fdset ID

2024-06-13 Thread Jim Fehlig via Devel
Add new function qemuFDPassGetId(), to be used when adding support for mapped-ram save format. Signed-off-by: Jim Fehlig --- src/qemu/qemu_fd.c | 18 ++ src/qemu/qemu_fd.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c index

[PATCH RFC 1/9] qemu: Enable mapped-ram migration capability

2024-06-13 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 1 + src/qemu/qemu_migration_params.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index 48f8657f71..201286e58c 100644 --- a/src/qemu

[PATCH RFC 0/9] qemu: Support mapped-ram migration capability

2024-06-13 Thread Jim Fehlig via Devel
47VQX/ [3] https://mail.gnu.org/archive/html/qemu-devel/2024-05/msg04432.html Jim Fehlig (9): qemu: Enable mapped-ram migration capability qemu_fd: Add function to retrieve fdset ID qemu: Add function to get migration params for save qemu: Add a 'features' element to save image he

Re: Add iommu device when VM configured with > 255 vcpus

2024-05-30 Thread Jim Fehlig via Devel
On 5/30/24 6:45 AM, Igor Mammedov wrote: On Wed, 29 May 2024 14:44:52 -0400 Sergio Durigan Junior wrote: On Tuesday, May 28 2024, Jim Fehlig via Devel wrote: Hi All, I vaguely recall a discussion about $subject, but can't find it now. Perhaps buried in another thread. The topic has

Re: Add iommu device when VM configured with > 255 vcpus

2024-05-29 Thread Jim Fehlig via Devel
On 5/29/24 1:41 AM, Peter Krempa wrote: On Tue, May 28, 2024 at 16:26:18 -0600, Jim Fehlig via Devel wrote: Hi All, I vaguely recall a discussion about $subject, but can't find it now. Perhaps buried in another thread. The topic has been raised internally again, and I'd like to

Add iommu device when VM configured with > 255 vcpus

2024-05-28 Thread Jim Fehlig via Devel
Hi All, I vaguely recall a discussion about $subject, but can't find it now. Perhaps buried in another thread. The topic has been raised internally again, and I'd like to gauge the community's interest in automatically adding the necessary devices/config when user has specified vcpus > 255.

Re: [PATCH] libxl: Fix domxml-to-native conversion

2024-05-02 Thread Jim Fehlig via Devel
On 5/2/24 5:24 AM, Ján Tomko wrote: On a Monday in 2024, Jim Fehlig via Devel wrote: Similar to commit 57d084febe, another case of the libxl driver not adapting to modular daemons. When converting configuration that contains a type='network' interface, the converter calls virNetworkLo

Re: Revisiting parallel save/restore

2024-05-01 Thread Jim Fehlig via Devel
On 4/26/24 4:04 AM, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at 05:12:27PM -0600, Jim Fehlig via Devel wrote: A good starting point on this journey is supporting the new mapped-ram capability in qemu 9.0 [2]. Since mapped-ram is a new on-disk format, I assume we'll need

[PATCH] libxl: Fix domxml-to-native conversion

2024-04-29 Thread Jim Fehlig via Devel
not found: default Acquire a connection to virtnetworkd and use it when calling virNetwork* APIs. Signed-off-by: Jim Fehlig --- src/libxl/libxl_driver.c | 4 ++-- src/libxl/xen_common.c | 25 +++-- src/libxl/xen_common.h | 1 - src/libxl/xen_xl.c | 4 ++--

Re: Revisiting parallel save/restore

2024-04-26 Thread Jim Fehlig via Devel
On 4/26/24 4:07 AM, Daniel P. Berrangé wrote: On Thu, Apr 25, 2024 at 04:41:02PM -0600, Jim Fehlig via Devel wrote: On 4/17/24 5:12 PM, Jim Fehlig wrote: Hi All, While Fabiano has been working on improving save/restore performance in qemu, I've been tinkering with the same in libvirt. Th

Re: Revisiting parallel save/restore

2024-04-26 Thread Jim Fehlig via Devel
On 4/26/24 4:04 AM, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at 05:12:27PM -0600, Jim Fehlig via Devel wrote: A good starting point on this journey is supporting the new mapped-ram capability in qemu 9.0 [2]. Since mapped-ram is a new on-disk format, I assume we'll need

Re: [PATCH v1 15/20] node_device_udev: Pass the driver state as parameter in preparation for the next commit

2024-04-25 Thread Jim Fehlig via Devel
On 4/23/24 3:41 AM, Marc Hartmayer wrote: On Tue, Apr 23, 2024 at 10:06 AM +0100, Daniel P. Berrangé wrote: On Tue, Apr 23, 2024 at 10:46:14AM +0200, Marc Hartmayer wrote: On Tue, Apr 23, 2024 at 09:10 AM +0100, Daniel P. Berrangé wrote: On Tue, Apr 23, 2024 at 10:03:35AM +0200, Marc Hartm

Re: Revisiting parallel save/restore

2024-04-25 Thread Jim Fehlig via Devel
On 4/17/24 5:12 PM, Jim Fehlig wrote: Hi All, While Fabiano has been working on improving save/restore performance in qemu, I've been tinkering with the same in libvirt. The end goal is to introduce a new VIR_DOMAIN_SAVE_PARALLEL flag for save/restore, along w

Revisiting parallel save/restore

2024-04-17 Thread Jim Fehlig via Devel
Hi All, While Fabiano has been working on improving save/restore performance in qemu, I've been tinkering with the same in libvirt. The end goal is to introduce a new VIR_DOMAIN_SAVE_PARALLEL flag for save/restore, along with a VIR_DOMAIN_SAVE_PARAM_PARALLEL_CONNECTIONS parameter to specify th

Re: [PATCH] qemusecuritytest: Call real virFileExists in mock

2024-04-09 Thread Jim Fehlig
ommit 4b5cc57ed35dc24d11673dd3f04bfb8073c0340d. > Signed-off-by: Michal Privoznik Thanks for fixing the mess from my small patch :-). I was deep in another task when I noticed the build failure, but that's a poor excuse for not properly investigating it and pushing a hurried fix. Reviewed-b

[PATCH] qemusecuritytest: Don't call real virFileExists in mock

2024-04-08 Thread Jim Fehlig
Calling the real virFileExists in qemusecuritymock.c can cause a segfault in qemusecuritytest. No segfaults are noticed when calling access(2) instead of virFileExists. Fixes: 4ed5ade753d8f1136cdbf17ddfe1d9093bcd933d Signed-off-by: Jim Fehlig --- Pushing as a build-breaker fix. tests

Re: [PATCH V2] security: Ensure file exists before attempting to restore label

2024-04-08 Thread Jim Fehlig
On 4/8/24 10:48 AM, Jim Fehlig wrote: On 4/8/24 6:18 AM, Michal Prívozník wrote: On 4/2/24 00:14, Jim Fehlig wrote: When performing an install, it's common for tooling such as virt-install to remove the install kernel/initrd once they are successfully booted and the domain has been rede

Re: [PATCH V2] security: Ensure file exists before attempting to restore label

2024-04-08 Thread Jim Fehlig
On 4/8/24 6:18 AM, Michal Prívozník wrote: On 4/2/24 00:14, Jim Fehlig wrote: When performing an install, it's common for tooling such as virt-install to remove the install kernel/initrd once they are successfully booted and the domain has been redefined to boot without them. Afte

Re: [PATCH] virsysinfo: Try reading DMI table

2024-04-02 Thread Jim Fehlig
On 3/26/24 13:38, brett.hol...@canonical.com wrote: From: Brett Holman Add DMI support for risc-v and mips. Attempt to read dmidecode and fall back to old behavior if that fails. The SMBIOS specification[1] officially supports both RISC-V and LoongArch. Some mips-based Loongson-3 processors al

Re: [PATCH] security: Ensure kernel/initrd exist before restoring label

2024-04-01 Thread Jim Fehlig
On 3/27/24 08:01, Daniel P. Berrangé wrote: On Mon, Mar 25, 2024 at 07:13:05PM -0600, Jim Fehlig wrote: On 3/21/24 08:57, Daniel P. Berrangé wrote: On Fri, Mar 08, 2024 at 04:26:27PM -0700, Jim Fehlig wrote: When performing an install, it's common for tooling such as virt-install to r

[PATCH V2] security: Ensure file exists before attempting to restore label

2024-04-01 Thread Jim Fehlig
. Signed-off-by: Jim Fehlig --- src/security/security_dac.c | 3 +++ src/security/security_selinux.c | 2 ++ tests/qemusecuritymock.c| 18 ++ 3 files changed, 23 insertions(+) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 567be4bd23..4

Re: [PATCH] security: Ensure kernel/initrd exist before restoring label

2024-03-25 Thread Jim Fehlig
On 3/21/24 08:57, Daniel P. Berrangé wrote: On Fri, Mar 08, 2024 at 04:26:27PM -0700, Jim Fehlig wrote: When performing an install, it's common for tooling such as virt-install to remove the install kernel/initrd once they are successfully booted and the domain has been redefined to

Re: [PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2024-03-22 Thread Jim Fehlig
On 3/22/24 04:54, Daniel P. Berrangé wrote: On Mon, Mar 04, 2024 at 10:35:25AM -0700, Jim Fehlig wrote: On 3/1/24 10:13, Daniel P. Berrangé wrote: On Fri, Mar 01, 2024 at 10:36:12AM -0600, Jonathon Jongsma wrote: On 3/1/24 10:13 AM, Daniel P. Berrangé wrote: On Tue, Feb 20, 2024 at 05:08

Re: [PATCH] security: Ensure kernel/initrd exist before restoring label

2024-03-20 Thread Jim Fehlig
Hi All! Any comments beyond my own on this patch? :-) As said in the self reply, I'm happy to explore other suggestions for squelching the alarming, yet harmless error messages. Regards, Jim On 3/8/24 16:26, Jim Fehlig wrote: When performing an install, it's common for tooling su

Re: [PATCH] security: Ensure kernel/initrd exist before restoring label

2024-03-08 Thread Jim Fehlig
On 3/8/24 16:26, Jim Fehlig wrote: When performing an install, it's common for tooling such as virt-install to remove the install kernel/initrd once they are successfully booted and the domain has been redefined to boot without them. After the installation is complete and the domain is reb

[PATCH] security: Ensure kernel/initrd exist before restoring label

2024-03-08 Thread Jim Fehlig
9]: unable to stat: /var/lib/libvirt/boot/virtinst-yvp19moo-linux: No such file or directo> Mar 08 12:40:37 virtqemud[5639]: Unable to run security manager transaction Avoid the messages by checking if the kernel and initrd still exist before including them in the restore label transaction. Si

Re: [PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2024-03-04 Thread Jim Fehlig
On 3/1/24 10:13, Daniel P. Berrangé wrote: On Fri, Mar 01, 2024 at 10:36:12AM -0600, Jonathon Jongsma wrote: On 3/1/24 10:13 AM, Daniel P. Berrangé wrote: On Tue, Feb 20, 2024 at 05:08:02PM -0700, Jim Fehlig wrote: On 12/15/23 15:11, Jonathon Jongsma wrote: Previously, the script only

Re: [PATCH v3 00/12] Improve versioned CPU support in libvirt

2024-02-22 Thread Jim Fehlig
's material for the 10.2.0 dev cycle at this point. Note I've done a fair bit of testing with these patches, plus some SEV-SNP work on top, but only on a EPYC Genoa machine. For the series: Reviewed-by: Jim Fehlig Regards, Jim __

Re: [PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2024-02-21 Thread Jim Fehlig
On 2/21/24 13:56, Jonathon Jongsma wrote: On 2/20/24 6:08 PM, Jim Fehlig wrote: On 12/15/23 15:11, Jonathon Jongsma wrote: Previously, the script only generated the parent CPU and any versions that had a defined alias. The script now generates all CPU versions. Any version that had a defined

Re: [PATCH v3 05/12] cpu_map: Add versioned EPYC CPUs

2024-02-20 Thread Jim Fehlig
On 12/15/23 15:12, Jonathon Jongsma wrote: Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 6 + src/cpu_map/meson.build | 6 + src/cpu_map/x86_EPYC-Milan-v2.xml | 108 ++ src/cpu_map/x86_EPYC-Rome-v2.x

Re: [PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2024-02-20 Thread Jim Fehlig
el xml definition. Signed-off-by: Jonathon Jongsma --- src/cpu_map/sync_qemu_models_i386.py | 42 ++-- 1 file changed, 34 insertions(+), 8 deletions(-) The logic changes to the script LGTM. Reviewed-by: Jim Fehlig Regards, Jim diff --git a/src/cpu_map/sync_qemu_models_i

Re: [PATCH v3 01/12] cpu_map: update script to handle versioned CPUs

2024-02-15 Thread Jim Fehlig
On 12/15/23 15:11, Jonathon Jongsma wrote: Previously, the script only generated the parent CPU and any versions that had a defined alias. The script now generates all CPU versions. Any version that had a defined alias will continue to use that alias, but those without aliases will use the genera

Re: [PATCH v3 00/12] Improve versioned CPU support in libvirt

2024-02-15 Thread Jim Fehlig
Hi Jonathon, I don't have any expertise in this area of libvirt, but I have been experimenting with your patches and fairly recent snp-enabled kernel+ovmf+qemu referenced from AMD's AMDSEV repo https://github.com/AMDESE/AMDSEV/blob/snp-latest/stable-commits With your patches and 2 preliminar

Re: [PATCH] apparmor: Add user session path for PID and socket files used by passt

2024-01-30 Thread Jim Fehlig
ser/[0-9]*/libvirt/qemu/run/passt/* rw, +owner @{run}/libvirt/qemu/passt/* rw, Makes sense to me, so Reviewed-by: Andrea Bolognani I'll give Jim and others a chance to take a look before pushing. LGTM, Reviewed-by: Jim Fehlig I just realized that you sent the patch t

Re: [libvirt PATCH] build: Make daemons depend on generated *_protocol.[ch]

2024-01-25 Thread Jim Fehlig
res no longer occur. I realize the patch is already pushed, but FTR Tested-by: Jim Fehlig Regards, Jim po/meson.build | 1 + src/meson.build| 6 +- src/remote/meson.build | 15 +++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/

build failure on ppc64le

2024-01-16 Thread Jim Fehlig
Hi All, We recently started noticing build failures of libvirt for ppc64le on some distros in our build service. Seems it's possible for sources in remote to be built before remote_protocol.h is generated [ 178s] cc -Isrc/virtnodedevd.p -Isrc -I../src -Isrc/conf -I../src/conf -Isrc/remote -

Re: [PATCH] apparmor: Allow access to /sys/devices/system/node/*/cpumap for libnuma

2024-01-11 Thread Jim Fehlig
to the file specified above. Closes #515 I always forget, but looking at the git log it seems the full URL is preferred. E.g. Closes: https://gitlab.com/libvirt/libvirt/-/issues/515 Signed-off-by: Sergio Durigan Junior Reviewed-by: Jim Fehlig It's a bug fix so should be safe for f

[PATCH] apparmor: Add capabilities for PCI passthrough to virtxend profile

2023-12-18 Thread Jim Fehlig
t(1702940304.818:63): apparmor="DENIED" \ operation="capable" class="cap" profile="virtxend" pid=3731 \ comm="rpc-virtxend" capability=12 capname="net_admin" It appears sys_admin is needed to simply read from the PCI dev's sysfs co

Re: [PATCH 1/2] qemu: Drop support for C implementation of virtiofsd

2023-12-14 Thread Jim Fehlig
On 12/12/23 05:07, Peter Krempa wrote: On Tue, Dec 12, 2023 at 12:50:52 +0100, Michal Privoznik wrote: Virtiofsd has two implementations: C and Rust. The former is now deprecated (QEMU commit v7.0.0-rc0~52^2~1) and in fact removed from QEMU (QEMU commit v8.0.0-rc0~55). While Rust version was ori

[PATCH] remote: Fix cached hypervisor type

2023-12-07 Thread Jim Fehlig
.0.0 Using API: ��%�U 10.0.0 Running hypervisor: ��U 8.1.3 Ths change also fixes random SIGABRT from perl processes running libvirt-tck tests. Signed-off-by: Jim Fehlig --- src/remote/remote_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/remote_driv

Re: Versioned CPU types in libvirt

2023-11-06 Thread Jim Fehlig
On 11/3/23 15:19, Jim Fehlig wrote: Hi Jonathon, I too on occasion poke at SEV-SNP support in libvirt. I've now pushed the dusty, hacky branch to my public fork https://gitlab.com/jfehlig/libvirt/-/tree/sev-snp?ref_type=heads Looking at the git log, it seems I fiddle with it every 2 m

Re: Versioned CPU types in libvirt

2023-11-03 Thread Jim Fehlig
Hi Jonathon, I too on occasion poke at SEV-SNP support in libvirt. I've now pushed the dusty, hacky branch to my public fork https://gitlab.com/jfehlig/libvirt/-/tree/sev-snp?ref_type=heads Looking at the git log, it seems I fiddle with it every 2 months or so. It's been that long since I la