Re: [PATCH v1 20/20] node_device_udev: Pass the `udevEventData` via parameter and use refcounting

2024-04-19 Thread Jonathon Jongsma
udevEventHandleCallback, virObjectRef(priv), virObjectUnref); if (priv->watch == -1) goto unlock; Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 19/20] node_device_udev: Add support for `g_autoptr` to `udevEventData`

2024-04-19 Thread Jonathon Jongsma
} typedef enum { Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 18/20] node_device_udev: Make the code easier to read

2024-04-19 Thread Jonathon Jongsma
); +} else { +scheduleMdevctlUpdate(priv); +} } } I don't mind either way Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 17/20] node_device_udev: Call `nodeDeviceUpdateMediatedDevices` directly

2024-04-19 Thread Jonathon Jongsma
event is emitted. */ -if (is_mdev && (nodeDeviceUpdateMediatedDevices(driver_state) < 0)) { +if ((has_mdev_types || is_mdev) && (nodeDeviceUpdateMediatedDevices(driver_state) < 0)) { VIR_WARN("Update of mediated device %s failed",

Re: [PATCH v1 16/20] node_device_udev: Use a worker pool for processing events and emitting nodedev event

2024-04-19 Thread Jonathon Jongsma
RD(priv) { -if (priv->initThread) -virThreadJoin(priv->initThread); if (priv->udevThread) virThreadJoin(priv->udevThread); } + +if (priv->workerPool) +virThreadPoolDrain(priv->workerPool);

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

2024-04-19 Thread Jonathon Jongsma
d to update mediated devices"); } @@ -2070,7 +2072,7 @@ launchMdevctlUpdateThread(int timer G_GNUC_UNUSED, void *opaque) } if (virThreadCreateFull(, false, mdevctlUpdateThreadFunc, - "mdevctl-thread", false, NULL) < 0) { +

Re: [PATCH v1 14/20] node_device_udev: nodeStateShutdownPrepare: Disconnect the signals explicitly

2024-04-19 Thread Jonathon Jongsma
gt;mdevctlTimeout); Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 13/20] node_device_udev: Introduce and use `stateShutdownPrepare` and `stateShutdownWait`

2024-04-19 Thread Jonathon Jongsma
nup, /* 0.7.3 */ .stateReload = nodeStateReload, /* 0.7.3 */ +.stateShutdownPrepare = nodeStateShutdownPrepare, /* 10.3.0 */ + .stateShutdownWait = nodeStateShutdownWait, /* 10.3.0 */ }; Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 12/20] node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and mdevCtlMonitors

2024-04-19 Thread Jonathon Jongsma
monitor); +udev_monitor_unref(priv->udev_monitor); +udev_unref(udev); } + virMutexDestroy(>mdevctlLock); virCondDestroy(>udevThreadCond); Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.l

Re: [PATCH v1 11/20] node_device_udev: Move responsibility to release `(init|udev)Thread` to `udevEventDataDispose`

2024-04-19 Thread Jonathon Jongsma
ortSystemError(errno, "%s", _("failed to create udev enumerate thread")); -g_clear_pointer(>initThread, g_free); goto cleanup; } Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v1 07/20] node_device_udev: Don't take `mdevctlLock` for `mdevctl list` and add comments about locking

2024-04-19 Thread Jonathon Jongsma
opaque G_GNUC_UNUSED) { -udevEventData *priv = driver->privateData; -VIR_LOCK_GUARD lock = virLockGuardLock(>mdevctlLock); - if (nodeDeviceUpdateMediatedDevices() < 0) VIR_WARN("mdevctl failed to update mediated devices"); } Reviewed-by: Jonathon Jongsma __

Re: [RFC PATCH v1 12/15] node_device_udev: Use a worker pool for processing the udev events

2024-04-18 Thread Jonathon Jongsma
On 4/12/24 8:36 AM, Marc Hartmayer wrote: Use a worker pool for processing the udev events and the initialization instead of a separate initThread and a mdevctl-thread. This has the large advantage that we can leverage the job API and now this thread pool is responsible to do all the

Re: [RFC PATCH v1 11/15] node_device_udev: Use `stateShutdownPrepare` and `stateShutdownWait`

2024-04-18 Thread Jonathon Jongsma
eDriver = { .name = "udev", .stateInitialize = nodeStateInitialize, /* 0.7.3 */ .stateCleanup = nodeStateCleanup, /* 0.7.3 */ .stateReload = nodeStateReload, /* 0.7.3 */ +.stateShutdownPrepare = nodeStateShutdownPrepare, +.stateShutdownWait =

Re: [RFC PATCH v1 10/15] node_device_udev: Inline `udevRemoveOneDevice`

2024-04-18 Thread Jonathon Jongsma
e_get_syspath(device); + +return udevRemoveOneDeviceSysPath(path); +} if (STREQ(action, "move")) { const char *devpath_old = udevGetDeviceProperty(device, "DEVPATH_OLD"); Fine Reviewed-by: Jonathon Jongsma _

Re: [RFC PATCH v1 09/15] node_device_udev: Add prefix `udev` for udev related data

2024-04-18 Thread Jonathon Jongsma
0) { virReportSystemError(errno, "%s", _("failed to create udev handler thread")); -g_clear_pointer(>th, g_free); +g_clear_pointer(>udevThread, g_free); goto unlock; } Sure. Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [RFC PATCH v1 08/15] node_device_udev: Take lock if `driver->privateData` is modified

2024-04-18 Thread Jonathon Jongsma
ot want to take the lock (e.g. because it has already been taken), so maybe it would be better simply to lock the object within the scheduleMdevctlUpdate() function rather than requiring each caller to lock it? Reviewed-by: Jonathon Jongsma ___ Dev

Re: [RFC PATCH v1 07/15] node_device_udev: Add comments about locking

2024-04-18 Thread Jonathon Jongsma
On 4/12/24 8:36 AM, Marc Hartmayer wrote: Commit a99d876a0f58 ("node_device: Use automatic mutex management") replaced the locking mechanism and accidentally removed the comment with the reason why the lock is taken. Restore this comment and add a new comment about the lock. Reviewed-by: Boris

Re: [RFC PATCH v1 06/15] node_device_udev: Test for mdevctlTimeout != -1

2024-04-18 Thread Jonathon Jongsma
> 0) +if (data->mdevctlTimeout != -1) virEventRemoveTimeout(data->mdevctlTimeout); data->mdevctlTimeout = virEventAddTimeout(100, launchMdevctlUpdateThread, data, NULL); OK Reviewed-by: Jonathon Jongsma

Re: [RFC PATCH v1 05/15] node_device_udev: Remove the timeout if the data is disposed

2024-04-18 Thread Jonathon Jongsma
e(priv->watch); +if (priv->mdevctlTimeout > 0) +virEventRemoveTimeout(priv->mdevctlTimeout); + if (!priv->udev_monitor) return; Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.or

Re: [RFC PATCH v1 04/15] nodedev: reset active config data on udev remove event

2024-04-18 Thread Jonathon Jongsma
atedDeviceFree; virMediatedDeviceGetIOMMUGroupDev; virMediatedDeviceGetIOMMUGroupNum; Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [RFC PATCH v1 03/15] nodedev: immediate update of active config on udev add

2024-04-18 Thread Jonathon Jongsma
n, "add") || STREQ(action, "change")) +return udevAddOneDevice(device); if (STREQ(action, "remove")) return udevRemoveOneDevice(device); Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v3 5/5] conf: nodedev: Fill active_config at XML parse time

2024-04-18 Thread Jonathon Jongsma
On 4/18/24 8:52 AM, Cole Robinson wrote: On 4/17/24 10:12 AM, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at 09:58:10AM -0400, Cole Robinson wrote: On 4/9/24 11:20 AM, Boris Fiuczynski wrote: On 4/9/24 16:56, Cole Robinson wrote: Commit v10.0.0-265-ge67bca23e4 added a `active_config` and

Re: [PATCH v1] node_device_conf: virNodeDeviceGetSCSITargetCaps: fix memory leak

2024-04-05 Thread Jonathon Jongsma
o read port_name for '%s'", scsi_target->rport); goto cleanup; } +VIR_FREE(scsi_target->wwpn); +scsi_target->wwpn = g_steal_pointer(); scsi_target->flags |= VIR_NODE_DEV_CAP_FLAG_FC_RPORT; ret = 0; base-commit: b902cfece0

Re: [PATCH 2/2] virDomainDeviceIsUSB: Handle all USB devices and simplify the code

2024-04-05 Thread Jonathon Jongsma
closing ' on the 'net' type. Reviewed-by: Jonathon Jongsma Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 228 +++-- 1 file changed, 106 insertions(+), 122 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

Re: [PATCH 1/2] docs: Rewrite documentation for network device models

2024-04-05 Thread Jonathon Jongsma
transitional devices`_ for more details. -:since:`Since 9.3.0` igb is also supported. -:since:`Since 10.3.0` usb-net is supported. + qemu-system-x86_64 -net nic,model=? Setting NIC driver-specific options ^^^ Reviewed-by: Jonathon Jongsma

Re: [PATCH 2/3] nodedev: immediate update of active config on udev add

2024-03-28 Thread Jonathon Jongsma
On 3/27/24 1:14 PM, Marc Hartmayer wrote: On Wed, Mar 27, 2024 at 10:53 AM -0500, Jonathon Jongsma wrote: On 3/20/24 10:46 AM, Boris Fiuczynski wrote: When an udev add event occurs the mdev active config data requires an update via mdevctl as the udev does not contain all config data

Re: [PATCH 2/3] nodedev: immediate update of active config on udev add

2024-03-27 Thread Jonathon Jongsma
On 3/20/24 10:46 AM, Boris Fiuczynski wrote: When an udev add event occurs the mdev active config data requires an update via mdevctl as the udev does not contain all config data. This update needs to occur immediate and to be finished before the libvirt CREATE event is issued to keep the API

Re: [PATCH 1/3] nodedev: fix mdev add udev event data handling

2024-03-21 Thread Jonathon Jongsma
(obj); if (is_mdev) -nodeDeviceDefCopyFromMdevctl(def, objdef, false); +nodeDeviceDefCopyFromMdevctl(def, objdef, true); persistent = virNodeDeviceObjIsPersistent(obj); autostart = virNodeDeviceObjIsAutostart(obj); Reviewed-by: Jonathon

Re: [PATCH 3/3] nodedev: reset active config data on udev remove event

2024-03-21 Thread Jonathon Jongsma
On 3/20/24 10:46 AM, Boris Fiuczynski wrote: When a mdev device is destroyed or stopped the udev remove event handling needs to reset the active config data of the node object representing a persisted mdev. Signed-off-by: Boris Fiuczynski --- src/node_device/node_device_driver.c | 22

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

2024-03-20 Thread Jonathon Jongsma
On 3/4/24 11:35 AM, 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:02PM -0700, Jim Fehlig wrote: On 12/15/23 15:11, Jonathon Jongsma

Re: [PATCH 1/2] conf: allow display and ramfb for vfio pci hostdevs

2024-03-20 Thread Jonathon Jongsma
On 3/20/24 3:08 AM, Daniel P. Berrangé wrote: On Tue, Mar 19, 2024 at 05:25:54PM -0500, Jonathon Jongsma wrote: We already allow the user to specify display="on" and ramfb="on" for mdev host devices. But newer GPU models will no longer use the mdev framework, so we sho

[PATCH 1/2] conf: allow display and ramfb for vfio pci hostdevs

2024-03-19 Thread Jonathon Jongsma
e/RHEL-28808 Signed-off-by: Jonathon Jongsma --- docs/formatdomain.rst | 8 src/conf/domain_conf.c| 20 +++- src/conf/domain_conf.h| 2 ++ src/conf/domain_validate.c| 21 + src/conf/schemas/d

[PATCH 2/2] qemu: enable display/ramfb for vfio pci hostdevs

2024-03-19 Thread Jonathon Jongsma
Implement display="on" and ramfb="on" for vfio PCI host devices in qemu. This enables passthrough PCI devices for display just like we did for mdevs. Resolves: https://issues.redhat.com/browse/RHEL-28808 Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_command.c

[PATCH 0/2] Add 'display' and 'ramfb' option for pci hostdevs

2024-03-19 Thread Jonathon Jongsma
see https://issues.redhat.com/browse/RHEL-28808 Jonathon Jongsma (2): conf: allow display and ramfb for vfio pci hostdevs qemu: enable display/ramfb for vfio pci hostdevs docs/formatdomain.rst | 8 src/conf/domain_conf.c| 20

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

2024-03-01 Thread Jonathon Jongsma
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 generated the parent CPU and any versions that had a defined alias. The script now generates all CPU versions. Any

Re: [PATCH v5 00/12] nodedev state and update

2024-02-22 Thread Jonathon Jongsma
It looks OK to me, but I'd personally like to see a second ACK on at least the API-related changes. Reviewed-by: Jonathon Jongsma On 2/22/24 7:01 AM, Boris Fiuczynski wrote: The series adds a dual state to the mdev node devices as these objects can be active and defined at the same time

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

2024-02-21 Thread Jonathon Jongsma
On 2/20/24 6:28 PM, Jim Fehlig wrote: 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

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

2024-02-21 Thread Jonathon Jongsma
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 alias will continue to use that alias

Re: [PATCH v3 12/12] nodedev: allow modify on define of a persistent node device

2024-02-21 Thread Jonathon Jongsma
On 2/16/24 8:52 AM, Boris Fiuczynski wrote: Allow to modify a node device by using virNodeDeviceDefineXML() to align its behavior with other drivers define methods. Signed-off-by: Boris Fiuczynski --- NEWS.rst | 5 +++ src/libvirt-nodedev.c| 4

Re: [PATCH v3 07/12] tools: add switches persisted and transient to nodedev-list

2024-02-20 Thread Jonathon Jongsma
command. Signed-off-by: Boris Fiuczynski Reviewed-by: Jonathon Jongsma --- docs/manpages/virsh.rst | 8 ++-- tools/virsh-nodedev.c | 24 ++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 3a814dccd

Re: [PATCH v3 06/12] nodedev: add persisted and transient filter on list

2024-02-20 Thread Jonathon Jongsma
Minor nit: the commit subject still says "persisted" instead of "persistent" On 2/16/24 8:52 AM, Boris Fiuczynski wrote: Allow to filter node devices based on their persisted or transient states. Signed-off-by: Boris Fiuczynski Reviewed-by: Jonathon Jongsma --- inc

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

2024-02-15 Thread Jonathon Jongsma
On 2/15/24 3:26 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 alias will continue to use that alias

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

2024-02-15 Thread Jonathon Jongsma
and because it builds on some qemu stuff that's not upstream yet (both the AMD repo and some coconut-svsm stuff). But it's here if you're interested: https://gitlab.com/jjongsma/libvirt/-/tree/sev-snp?ref_type=heads Jonathon On 12/15/23 15:11, Jonathon Jongsma wrote: For SEV-SNP support we

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

2024-02-15 Thread Jonathon Jongsma
Ping again. On 1/11/24 3:02 PM, Jonathon Jongsma wrote: polite ping On 12/15/23 4:11 PM, Jonathon Jongsma wrote: For SEV-SNP support we will need to be able to specify versioned CPU models that are not yet available in libvirt. Rather than just adding a versioned CPU or two that would

Re: [PATCH v2 09/11] api: add virNodeDeviceUpdate()

2024-02-15 Thread Jonathon Jongsma
On 2/15/24 3:29 AM, Boris Fiuczynski wrote: On 2/14/24 19:00, Jonathon Jongsma wrote: On 2/14/24 6:59 AM, Boris Fiuczynski wrote: On 2/13/24 14:43, Boris Fiuczynski wrote: Tangentially related: Almost all of the other API objects can update their persistent definition from an XML file

Re: [PATCH v2 10/11] nodedev: Implement virNodeDeviceUpdateXML

2024-02-14 Thread Jonathon Jongsma
On 2/13/24 3:04 AM, Boris Fiuczynski wrote: On 2/9/24 23:45, Jonathon Jongsma wrote: On 2/7/24 7:39 AM, Boris Fiuczynski wrote: Implement the API functions in the node device driver by using mdevctl modify with the options defined and live. Instead of increasing the minimum mdevctl version

Re: [PATCH v2 09/11] api: add virNodeDeviceUpdate()

2024-02-14 Thread Jonathon Jongsma
On 2/14/24 6:59 AM, Boris Fiuczynski wrote: On 2/13/24 14:43, Boris Fiuczynski wrote: Tangentially related: Almost all of the other API objects can update their persistent definition from an XML file by calling the $(OBJECT)DefineXML command to replace the existing definition. The Node

Re: [PATCH v2 10/11] nodedev: Implement virNodeDeviceUpdateXML

2024-02-09 Thread Jonathon Jongsma
NULL) < 0) +goto cleanup; + +if (!(actualCmdline = virBufferCurrentContent())) +goto cleanup; + +if (virTestCompareToFileFull(actualCmdline, cmdlinefile, false) < 0) +goto cleanup; + +if (virTestCompareToFile(stdinbuf, jsonfile) < 0) +got

Re: [PATCH v2 09/11] api: add virNodeDeviceUpdate()

2024-02-09 Thread Jonathon Jongsma
On 2/7/24 7:39 AM, Boris Fiuczynski wrote: This public API is implemented for almost all other objects that have a concept of persistent definition and activatability. Node devices (mdevs) that can be defined and inactive, it will be useful to be able to update defined and active node devices as

Re: [PATCH 2/3] qemu: roll back if not all nbdkit backends are successful

2024-02-08 Thread Jonathon Jongsma
On 1/29/24 2:30 AM, Peter Krempa wrote: On Thu, Jan 25, 2024 at 14:52:10 -0600, Jonathon Jongsma wrote: When starting nbdkit processes for the backing store of a disk, we were returning an error if any backing store failed, but we were not cleaning up processes that succeeded higher

Re: [PATCH 10/11] nodedev: Implement virNodeDeviceUpdateXML

2024-02-01 Thread Jonathon Jongsma
On 2/1/24 11:07 AM, Boris Fiuczynski wrote: On 1/31/24 22:41, Jonathon Jongsma wrote: On 1/19/24 10:38 AM, Boris Fiuczynski wrote: Implement the API functions in the node device driver by using mdevctl modify with the options defined and live. Increase the minimum mdevctl version to 1.3.0

Re: [PATCH 05/11] tools: add option inactive to nodedev-dumpxml

2024-02-01 Thread Jonathon Jongsma
On 2/1/24 8:35 AM, Boris Fiuczynski wrote: On 1/31/24 22:34, Jonathon Jongsma wrote: On 1/19/24 10:38 AM, Boris Fiuczynski wrote: Allow to dump the XML of the persisted mdev when the mdev has been started instead of the current state only. Signed-off-by: Boris Fiuczynski ---   docs/manpages

Re: [PATCH] virt-admin: Add warning when connection to default daemon fails

2024-02-01 Thread Jonathon Jongsma
using '-c' (e.g. virtqemud:///system)\n")); + if (priv->wantReconnect) vshError(ctl, "%s", _("Failed to reconnect to the admin server")); else Reviewed-by: Jonathon Jongsma ___ Devel mail

Re: [PATCH 04/11] nodedev: add an active config to mdev

2024-02-01 Thread Jonathon Jongsma
On 2/1/24 6:17 AM, Boris Fiuczynski wrote: On 1/31/24 22:30, Jonathon Jongsma wrote: On 1/19/24 10:38 AM, Boris Fiuczynski wrote: The configuration of a defined mdev can be modified after the mdev is started. The defined configuration and the active configuration can therefore run out of sync

Re: [PATCH 10/11] nodedev: Implement virNodeDeviceUpdateXML

2024-01-31 Thread Jonathon Jongsma
Reset(); +return ret; +} + static int testMdevctlListDefined(const void *data G_GNUC_UNUSED) { @@ -457,6 +516,9 @@ mymain(void) #define DO_TEST_AUTOSTART() \ DO_TEST_FULL("autostart mdevs", testMdevctlAutostart, NULL) +#define DO_TEST_MODIFY() \ +DO_TEST_FULL("modify mdevs", testMdevctlModify, NULL) + #define DO_TEST_PARSE_JSON(filename) \ DO_TEST_FULL("parse mdevctl json " filename, testMdevctlParse, filename) @@ -485,6 +547,8 @@ mymain(void) DO_TEST_AUTOSTART(); +DO_TEST_MODIFY(); + done: nodedevTestDriverFree(driver); Reviewed-by: Jonathon Jongsma

Re: [PATCH 06/11] nodedev: add persisted and transient filter on list

2024-01-31 Thread Jonathon Jongsma
ceObjIsPersistent(obj)) || + (MATCH(VIR_CONNECT_LIST_NODE_DEVICES_TRANSIENT) && + !virNodeDeviceObjIsPersistent(obj +return false; +} + return true; } #undef MATCH Reviewed-by: Jonathon Jongsma ___ Devel mai

Re: [PATCH 07/11] tools: add switches persisted and transient to nodedev-list

2024-01-31 Thread Jonathon Jongsma
T_LIST_NODE_DEVICES_ACTIVE; +if (persisted) +flags |= VIR_CONNECT_LIST_NODE_DEVICES_PERSISTED; +if (transient) +flags |= VIR_CONNECT_LIST_NODE_DEVICES_TRANSIENT; + if (!(list = virshNodeDeviceListCollect(ctl, caps, ncaps, flags))) { ret = false; goto cleanup; Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH 05/11] tools: add option inactive to nodedev-dumpxml

2024-01-31 Thread Jonathon Jongsma
virNodeDeviceGetXMLDesc(device, flags))) return false; return virshDumpXML(ctl, xml, "node-device", xpath, wrap); Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH 04/11] nodedev: add an active config to mdev

2024-01-31 Thread Jonathon Jongsma
); @@ -121,6 +155,7 @@ mymain(void) DO_TEST("pci__02_10_7_mdev_types"); DO_TEST("pci__42_00_0_vpd"); DO_TEST("mdev_3627463d_b7f0_4fea_b468_f1da537d301b"); +DO_TEST_INACTIVE("mdev_3627463d_b7f0_4fea_b468_f1da537d301b"); DO_TE

Re: [PATCH 02/11] node_device: refactor mdev attributes handling

2024-01-31 Thread Jonathon Jongsma
ted but causes the return value to be true. + * Returns true if any attribute is copied, else returns false */ This change doesn't really seem to belong in this commit as there are no changes to this function. Also, I don't understand the comment. I suppose "elminated" is supposed to be "eliminated", but I still can't quite understand what it's trying to say. Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH 0/3] qemu: Improvements related to MODEL_SCSI_AUTO

2024-01-31 Thread Jonathon Jongsma
-auto.x86_64-latest.xml create mode 100644 tests/qemuxmlconfdata/controller-scsi-auto.xml Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

[PATCH] qemu: fix nbdkit command test for backing chains

2024-01-26 Thread Jonathon Jongsma
Previously this test only tested the generated nbdkit command for the top level disk source. Update it to test the generated commmands for all sources in the chain. Signed-off-by: Jonathon Jongsma --- ...sk0 => disk-cdrom-network.args.disk0-src0} | 2 +- ...sk1 => disk-cdrom-network.args

[PATCH 2/3] qemu: roll back if not all nbdkit backends are successful

2024-01-25 Thread Jonathon Jongsma
processes that had been started. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c index 39f9c58a48..edbe2137d0 100644 --- a/src/qemu/qemu_nbdkit.c +++ b/src/qemu

[PATCH 3/3] qemu: handle adding/removing nbdkit-backed disk sources

2024-01-25 Thread Jonathon Jongsma
. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_domain.c | 10 ++ src/qemu/qemu_nbdkit.c | 7 +++ 2 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index de36641137..973a9af0b6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu

[PATCH 1/3] qemu: add a 'chain' parameter to nbdkit start/stop

2024-01-25 Thread Jonathon Jongsma
This will allow us to start or stop nbdkit for just a single disk source or for every source in the backing chain. This will be used in following patches. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_extdevice.c | 8 +++--- src/qemu/qemu_hotplug.c | 6 ++--- src/qemu/qemu_nbdkit.c

[PATCH v2 2/2] tests: Remove readahead and timeout from ssh tests

2024-01-23 Thread Jonathon Jongsma
These values are currently unsupported for ssh disks, and in fact aren't even parsed for ssh disks. So while this didn't result in any test errors, we can remove them from the test input files. Signed-off-by: Jonathon Jongsma --- tests/qemuxml2argvdata/disk-network-ssh-key.xml | 4

[PATCH v2 1/2] qemu: Fix bug in nbdkit-backed backing chains

2024-01-23 Thread Jonathon Jongsma
When trying to start nbdkit-backed disks in backing chains, we were accidentally always checking the private data of the top of the chain instead of using the loop variable. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 0/2] A couple nbdkit-related fixes

2024-01-23 Thread Jonathon Jongsma
Changes in v2 - patch 1 now includes the same patch for both start and stop storage source functions Jonathon Jongsma (2): qemu: Fix bug in nbdkit-backed backing chains tests: Remove readahead and timeout from ssh tests src/qemu/qemu_nbdkit.c | 4

Re: [PATCH v4 0/2] A couple nbdkit-related fixes

2024-01-23 Thread Jonathon Jongsma
On 1/23/24 2:47 PM, Peter Krempa wrote: On Tue, Jan 23, 2024 at 13:00:35 -0600, Jonathon Jongsma wrote: From subject: v4? Jonathon Jongsma (2): qemu: Fix bug in nbdkit-backed backing chains tests: Remove readahead and timeout from ssh tests Reviewed-by: Peter Krempa Oops re v4. I

[PATCH v4 1/2] qemu: Fix bug in nbdkit-backed backing chains

2024-01-23 Thread Jonathon Jongsma
When trying to start nbdkit-backed disks in backing chains, we were accidentally always checking the private data of the top of the chain instead of using the loop variable. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_nbdkit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 2/2] tests: Remove readahead and timeout from ssh tests

2024-01-23 Thread Jonathon Jongsma
These values are currently unsupported for ssh disks, and in fact aren't even parsed for ssh disks. So while this didn't result in any test errors, we can remove them from the test input files. Signed-off-by: Jonathon Jongsma --- tests/qemuxml2argvdata/disk-network-ssh-key.xml | 4

[PATCH v4 0/2] A couple nbdkit-related fixes

2024-01-23 Thread Jonathon Jongsma
Jonathon Jongsma (2): qemu: Fix bug in nbdkit-backed backing chains tests: Remove readahead and timeout from ssh tests src/qemu/qemu_nbdkit.c | 2 +- tests/qemuxml2argvdata/disk-network-ssh-key.xml | 4 tests/qemuxml2argvdata/disk-network-ssh

Re: [PATCH] NEWS: Document my contributions for upcoming release

2024-01-12 Thread Jonathon Jongsma
it reflect the change. Starting with this release, the change is +reflected. + v9.10.0 (2023-12-01) Just some minor grammatical suggestions Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org

[PATCH] NEWS: mention nbdkit config option

2024-01-12 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index af3c4906df..8088097ad6 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -37,6 +37,16 @@ v10.0.0 (unreleased) ``virDomainBlockResize`` allows resizing a block-device

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

2024-01-11 Thread Jonathon Jongsma
polite ping On 12/15/23 4:11 PM, Jonathon Jongsma wrote: For SEV-SNP support we will need to be able to specify versioned CPU models that are not yet available in libvirt. Rather than just adding a versioned CPU or two that would satisfy that immediate need, I decided to try to add versioned

Re: [PATCH] conf: domain_conf: cleanup def in case of errors

2024-01-11 Thread Jonathon Jongsma
y, but this patch fixes the immediate issue. Reviewed-by: Jonathon Jongsma ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-le...@lists.libvirt.org

Re: [PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Jonathon Jongsma
On 1/4/24 1:14 PM, Andrea Bolognani wrote: On Thu, Jan 04, 2024 at 12:24:38PM -0600, Jonathon Jongsma wrote: Currently when we build with nbdkit support, libvirt will always try to use nbdkit to access remote disk sources when it is available. But without an up-to-date selinux policy allowing

[PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Jonathon Jongsma
(nbdkit_config_default), we can build packages with nbdkit support but have it disabled by default. Signed-off-by: Jonathon Jongsma Suggested-by: Andrea Bolognani --- changes in v4 - squashed in Andrea's suggested changes - updated error message - Changed one instance of WITH_NDBKIT to WITH_NBDKIT

Re: [libvirt PATCH v3] qemu: add runtime config option for nbdkit

2024-01-03 Thread Jonathon Jongsma
On 1/3/24 12:37 PM, Andrea Bolognani wrote: On Thu, Nov 30, 2023 at 05:04:11PM -0600, Jonathon Jongsma wrote: Sorry for the delay in getting out a new version. Thanksgiving break in the USA, etc. ... followed by holidays in Europe. We still have a few days to get this into 10.0.0 though

[PATCH v3 08/12] cpu_map: Add versioned Intel Icelake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 4 + src/cpu_map/meson.build | 4 + src/cpu_map/x86_Icelake-Server-v3.xml | 103 + src/cpu_map/x86_Icelake-Server-v4.xml | 108 + src

[PATCH v3 10/12] cpu_map: Add versioned Intel Snowridge CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Snowridge-v2.xml | 78 ++ src/cpu_map/x86_Snowridge-v3.xml | 80 +++ src

[PATCH v3 12/12] cpu_map: Add versioned Dhyana CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_Dhyana-v2.xml | 81 +++ ..._64-cpuid-Hygon-C86-7185-32-core-guest.xml | 5 +- ...6_64-cpuid-Hygon-C86

[PATCH v3 04/12] qemu: use canonical name for CPU models

2023-12-15 Thread Jonathon Jongsma
o the user in anyway. The libvirt CPU configuration will continue to use existing unversioned model names in the domain xml for continuity. But internally we will translate these to a specific version. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_command.c

[PATCH v3 07/12] cpu_map: Add versioned Intel Cascadelake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Cascadelake-Server-v2.xml | 93 +++ src/cpu_map/x86_Cascadelake-Server-v4.xml | 91 ++ src

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

2023-12-15 Thread Jonathon Jongsma
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.xml | 93 +++ src

[PATCH v3 06/12] cpu_map: Add versioned Intel Skylake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Skylake-Client-v4.xml | 77 + src/cpu_map/x86_Skylake-Server-v4.xml | 83 ++ src/cpu_map

[PATCH v3 09/12] cpu_map: Add versioned Intel Cooperlake CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_Cooperlake-v2.xml | 98 +++ .../x86_64-cpuid-Cooperlake-host.xml | 3 +- .../domaincapsdata

[PATCH v3 11/12] cpu_map: Add versioned Intel SapphireRapids CPUs

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/x86_SapphireRapids-v2.xml | 125 ++ .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 1 + .../domaincapsdata

[PATCH v3 02/12] cpu_map: add canonical names to existing CPU models

2023-12-15 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/x86_Broadwell-IBRS.xml| 1 + src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 1 + src/cpu_map/x86_Broadwell-noTSX.xml | 1 + src/cpu_map/x86_Broadwell.xml | 1 + src/cpu_map/x86_Cascadelake-Server-noTSX.xml

[PATCH v3 03/12] cpu: parse the canonical name from the cpu model

2023-12-15 Thread Jonathon Jongsma
Recent changes have added a 'canonical_name' field to the xml definitions for our CPU models. Parse this field into the C structure and pass it around where necessary. --- src/conf/cpu_conf.c | 3 +++ src/conf/cpu_conf.h | 1 + src/cpu/cpu_x86.c | 24 3 files changed,

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

2023-12-15 Thread Jonathon Jongsma
their qemu alias. Jonathon Jongsma (12): cpu_map: update script to handle versioned CPUs cpu_map: add canonical names to existing CPU models cpu: parse the canonical name from the cpu model qemu: use canonical name for CPU models cpu_map: Add versioned EPYC CPUs cpu_map: Add versioned Intel

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

2023-12-15 Thread Jonathon Jongsma
. To enable this, the script will generate a new 'canonical_name' field to the CPU model xml definition. Signed-off-by: Jonathon Jongsma --- src/cpu_map/sync_qemu_models_i386.py | 42 ++-- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/cpu_map

Re: [PATCH v2 00/14] Unreacheble code cleanup

2023-12-14 Thread Jonathon Jongsma
/vbox_common.c | 13 ++--- src/vmx/vmx.c | 3 +- tests/libxlmock.c | 5 +- 22 files changed, 86 insertions(+), 172 deletions(-) A couple minor comments sent separately Reviewed-by: Jonathon Jongsma ___ Devel

Re: [PATCH v2 14/14] rpc: turn virNetClientAddProgram() to void

2023-12-14 Thread Jonathon Jongsma
On 12/14/23 8:51 AM, Dmitry Frolov wrote: virNetClientAddProgram() always returns 0. Signed-off-by: Dmitry Frolov --- src/admin/admin_remote.c| 3 +-- src/locking/lock_driver_lockd.c | 3 +-- src/logging/log_manager.c | 3 +-- src/lxc/lxc_monitor.c | 4 +---

Re: [PATCH v2 13/14] libxl: turn xenParseXLNamespaceData() to void

2023-12-14 Thread Jonathon Jongsma
On 12/14/23 8:51 AM, Dmitry Frolov wrote: xenParseXLNamespaceData() always returns 0. Signed-off-by: Dmitry Frolov --- src/libxl/xen_xl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index 553aa77896..78a3e1d519 100644 ---

Re: [PATCH v2 11/14] conf: turn virDomainGraphicsListenAppendAddress() to void

2023-12-14 Thread Jonathon Jongsma
On 12/14/23 8:51 AM, Dmitry Frolov wrote: virDomainGraphicsListenAppendAddress() always returns 0. Signed-off-by: Dmitry Frolov --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 2 +- src/libxl/xen_common.c | 7 ++- src/libxl/xen_xl.c | 3 +-- src/vbox/vbox_common.c |

Re: [PATCH v2 0/9] RFC: Add versioned CPUs to libvirt

2023-12-08 Thread Jonathon Jongsma
On 12/8/23 5:03 AM, Daniel P. Berrangé wrote: On Thu, Dec 07, 2023 at 04:07:48PM -0600, Jonathon Jongsma wrote: For SEV-SNP support we will need to be able to specify versioned CPU models that are not yet available in libvirt. Rather than just adding a versioned CPU or two that would satisfy

[PATCH v2 1/9] cpu_map: update script to generate versioned CPUs

2023-12-07 Thread Jonathon Jongsma
will be used as an alternate name for those CPU versions with defined aliases. Signed-off-by: Jonathon Jongsma --- src/cpu_map/sync_qemu_models_i386.py | 44 +++- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map

[PATCH v2 4/9] cpu_map: Add versioned Intel Cascadelake CPUs

2023-12-07 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- src/cpu_map/index.xml | 3 + src/cpu_map/meson.build | 3 + src/cpu_map/x86_Cascadelake-Server-v2.xml | 93 +++ src/cpu_map/x86_Cascadelake-Server-v4.xml | 91 ++ src

[PATCH v2 2/9] cpu_map: Add versioned EPYC CPUs

2023-12-07 Thread Jonathon Jongsma
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.xml | 93 +++ src

  1   2   >