[libvirt PATCH v2 5/6] qemu: Add capability for virtio-gpu.blob

2022-02-24 Thread Jonathon Jongsma
Capability to determine whether this qemu supports the 'blob' option for virtio-gpu. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1

[libvirt PATCH v2 3/6] conf: use enum variable for video type

2022-02-24 Thread Jonathon Jongsma
Rather than storing the video type as an integer, use the proper enum type within the struct. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 2 +- src/libxl/libxl_conf.c | 10 ++ src/libxl/libxl_domain.c | 11

[libvirt PATCH v2 2/6] conf: switch to virXMLProp* functions

2022-02-24 Thread Jonathon Jongsma
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions rather than reimplementing them with virXPath* functions. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 78 +- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git

[libvirt PATCH v2 4/6] conf: add support for 'blob' in virtio video device

2022-02-24 Thread Jonathon Jongsma
://lists.freedesktop.org/archives/dri-devel/2020-August/275972.html https://www.kraxel.org/blog/2021/05/virtio-gpu-qemu-graphics-update/ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2032406 Signed-off-by: Jonathon Jongsma --- docs/formatdomain.rst | 6 ++ docs/schemas/domaincommon.rng

[libvirt PATCH v2 1/6] conf: Refactor video model parsing

2022-02-24 Thread Jonathon Jongsma
Factor out a separate function to parse out the element for video devices. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 95 ++ 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt PATCH v2 0/6] Add support for 'blob' to virtio video device

2022-02-24 Thread Jonathon Jongsma
(cgroups, etc) Jonathon Jongsma (6): conf: Refactor video model parsing conf: switch to virXMLProp* functions conf: use enum variable for video type conf: add support for 'blob' in virtio video device qemu: Add capability for virtio-gpu.blob qemu: Implement 'blob' support for virtio gpu

[libvirt PATCH 4/4] conf: add support for 'blob' in virtio-vga/virtio-gpu

2022-02-10 Thread Jonathon Jongsma
Add the ability to specify the 'blob=on/off' option to qemu for the virtio-vga/virtio-gpu device. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2032406 Signed-off-by: Jonathon Jongsma --- docs/schemas/domaincommon.rng | 5 +++ src/conf/domain_conf.c

[libvirt PATCH 3/4] conf: use enum variable for video type

2022-02-10 Thread Jonathon Jongsma
Rather than storing the video type as an integer, use the proper enum type within the struct. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 2 +- src/libxl/libxl_conf.c | 10 ++ src/libxl/libxl_domain.c | 11

[libvirt PATCH 1/4] conf: Refactor video model parsing

2022-02-10 Thread Jonathon Jongsma
Factor out a separate function to parse out the element for video devices. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 95 ++ 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt PATCH 2/4] conf: switch to virXMLProp* functions

2022-02-10 Thread Jonathon Jongsma
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions rather than reimplementing them with virXPath* functions. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 78 +- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git

[libvirt PATCH 0/4] Add support for 'blob' to virtio video device

2022-02-10 Thread Jonathon Jongsma
Add support to libvirt for the 'blob' option for virtio video devices in qemu. Also do a little preparatory refactoring of the video device xml parsing code. Jonathon Jongsma (4): conf: Refactor video model parsing conf: switch to virXMLProp* functions conf: use enum variable for video type

Re: [PATCH 3/3] nodedev: add parent_addr to mdev nodedev dumpxml

2022-02-04 Thread Jonathon Jongsma
On 2/4/22 9:32 AM, Boris Fiuczynski wrote: As the parent address is part of the mdev nodedev name lets expose the internally available parent address in the XML. What is the issue that you're trying to solve here? The mdev xml already has a reference to the name of the parent device. So

[libvirt PATCH] docs: fix documentation for nodedev-start

2021-11-03 Thread Jonathon Jongsma
Presumably the result of a copy/paste mistake, the the argument for the `nodedev-start` command was described as a 'network' rather than a 'device'. Signed-off-by: Jonathon Jongsma --- pushed as trivial docs/manpages/virsh.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 0/8] virsh: Use g_autoptr() for public types

2021-10-05 Thread Jonathon Jongsma
For the series: Acked-by: Jonathon Jongsma On Mon, Sep 27, 2021 at 12:11 AM Michal Privoznik wrote: > > In this patchset I'm switching from virXXXFree to g_autoptr(). There are > still some left, but very rare occurrence: > > libvirt.git $ git grep -o "vir[

Re: [libvirt PATCH v3 2/9] virthread: Introduce virLockGuard

2021-10-05 Thread Jonathon Jongsma
On Thu, Sep 30, 2021 at 6:29 AM Tim Wiederhake wrote: > > Locks a virMutex on creation and unlocks it in its destructor. > > The VIR_LOCK_GUARD macro is used instead of "g_autoptr(virLockGuard)" to > work around a clang issue (see https://bugs.llvm.org/show_bug.cgi?id=3888 > and

Re: [PATCH 3/3] qemu: Add support for virtio device option paeg-per-vq

2021-10-05 Thread Jonathon Jongsma
On Fri, Sep 17, 2021 at 3:17 PM Jonathon Jongsma wrote: > > On Thu, Sep 9, 2021 at 6:51 AM Michal Prívozník wrote: > > > > On 9/6/21 4:06 PM, Han Han wrote: > > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > > > > > Sign

Re: [PATCH 3/3] qemu: Add support for virtio device option paeg-per-vq

2021-09-17 Thread Jonathon Jongsma
On Thu, Sep 9, 2021 at 6:51 AM Michal Prívozník wrote: > > On 9/6/21 4:06 PM, Han Han wrote: > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > > > Signed-off-by: Han Han > > --- > > src/qemu/qemu_command.c | 4 ++ > > src/qemu/qemu_hotplug.c

Re: [PATCH 2/3] conf: Add page_per_vq for driver element

2021-09-17 Thread Jonathon Jongsma
On Mon, Sep 6, 2021 at 9:07 AM Han Han wrote: > > Signed-off-by: Han Han > --- > docs/formatdomain.rst | 9 + > docs/schemas/domaincommon.rng | 5 + > src/conf/domain_conf.c| 16 > src/conf/domain_conf.h| 1 + > src/conf/domain_validate.c

[libvirt PATCH 2/2] docs: update nodedev driver docs for new mdev features

2021-09-15 Thread Jonathon Jongsma
Add up-to-date information about creating and defining mediated devices in libvirt. Signed-off-by: Jonathon Jongsma --- docs/drvnodedev.html.in | 83 ++--- 1 file changed, 62 insertions(+), 21 deletions(-) diff --git a/docs/drvnodedev.html.in b/docs

[libvirt PATCH 1/2] docs: Expand manpage documentation for nodedev commands

2021-09-15 Thread Jonathon Jongsma
Bring the documentation for nodedev-list up to date with the latest code, especially documenting the --active and -all options. Also add documentation for the nodedev-define, nodedev-undefine, and nodedev-start commands. Signed-off-by: Jonathon Jongsma --- docs/manpages/virsh.rst | 48

Re: [libvirt PATCH] virsh: Make code flow in cmdManagedSaveRemove more straightforward

2021-09-15 Thread Jonathon Jongsma
Reviewed-by: Jonathon Jongsma On Wed, Sep 15, 2021 at 10:16 AM Jiri Denemark wrote: > > By doing so we can get rid of the code which violates our coding style > guidelines. > > Signed-off-by: Jiri Denemark > --- > tools/virsh-domain.c | 21 +++--

Re: [PATCH] virsh: Add QMP command wrapping for 'qemu-monitor-command'

2021-09-15 Thread Jonathon Jongsma
On Tue, 14 Sep 2021 17:16:11 +0200 Peter Krempa wrote: > Issuing simple QMP commands is pain as they need to be wrapped by the > JSON wrapper: > > { "execute": "COMMAND" } > > and optionally also: > > { "execute": "COMMAND", "arguments":...} > > For simple commands without arguments we can

Re: [PATCH 0/2] virsh: Fix fallback code path for vcpuinfo

2021-09-15 Thread Jonathon Jongsma
ACK both patches Reviewed-by: Jonathon Jongsma On Wed, Sep 15, 2021 at 8:21 AM Peter Krempa wrote: > > Peter Krempa (2): > virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path > virshDomainGetVcpuBitmap: Refactor cleanup > > tools/virsh-domain.c | 15 ++

[libvirt PATCH v2] news: mention new nodedev API

2021-09-15 Thread Jonathon Jongsma
Add news item about the new API for node devices. Signed-off-by: Jonathon Jongsma --- NEWS.rst | 12 1 file changed, 12 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4521499db7..fd20e50d18 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,18 @@ v7.8.0 (unreleased

Re: [libvirt PATCH v3 0/7] Enable autostarting mediated devices

2021-09-03 Thread Jonathon Jongsma
Ping Can I get a review on this? As I mentioned in the cover letter, the only patch that was not initially ACKed in the last version was the second one. However, the non-mdev devices were also switched to to persistent=false and autostart=false. On Fri, Aug 20, 2021 at 5:36 PM Jonathon Jongsma

[libvirt PATCH v3 7/7] virsh: add nodedev-info

2021-08-20 Thread Jonathon Jongsma
This is currently the only way to view the 'autostart' property for a node device in virsh. Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- docs/manpages/virsh.rst | 12 tools/virsh-nodedev.c | 68 + 2 files changed, 80

[libvirt PATCH v3 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-08-20 Thread Jonathon Jongsma
Implement these new API functions in the nodedev driver. Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- src/node_device/node_device_driver.c | 50 src/node_device/node_device_driver.h | 6 src/node_device/node_device_udev.c | 10

[libvirt PATCH v3 4/7] virsh: add nodedev-autostart

2021-08-20 Thread Jonathon Jongsma
Add ability to set node devices to autostart on boot or parent device availability. Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- docs/manpages/virsh.rst | 15 + tools/virsh-nodedev.c | 71 + 2 files changed, 86 insertions

[libvirt PATCH v3 3/7] nodedev: Add tests for mdevctl autostart command

2021-08-20 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- .../nodedevmdevctldata/mdevctl-autostart.argv | 8 +++ tests/nodedevmdevctltest.c| 55 +++ 2 files changed, 63 insertions(+) create mode 100644 tests/nodedevmdevctldata/mdevctl

[libvirt PATCH v3 2/7] nodedev: implement virNodeDevice(Get|Set)Autostart()

2021-08-20 Thread Jonathon Jongsma
Implement autostart functionality for mediated devices. Signed-off-by: Jonathon Jongsma --- src/conf/node_device_conf.h | 1 + src/conf/virnodedeviceobj.c | 16 +++ src/conf/virnodedeviceobj.h | 6 ++ src/libvirt_private.syms | 2 + src/node_device

[libvirt PATCH v3 5/7] api: add virNodeDeviceIsPersistent()/IsActive()

2021-08-20 Thread Jonathon Jongsma
-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- include/libvirt/libvirt-nodedev.h | 4 ++ src/driver-nodedev.h | 8 src/libvirt-nodedev.c | 65 +++ src/libvirt_public.syms | 2 + src/remote/remote_driver.c| 2

[libvirt PATCH v3 1/7] api: add virNodeDevice(Get|Set)Autostart()

2021-08-20 Thread Jonathon Jongsma
This will allow persistent mediated devices to be configured to be restarted automatically when the host reboots. Signed-off-by: Jonathon Jongsma Reviewed-by: Daniel P. Berrangé --- include/libvirt/libvirt-nodedev.h | 6 +++ src/driver-nodedev.h | 10 src/libvirt-nodedev.c

[libvirt PATCH v3 0/7] Enable autostarting mediated devices

2021-08-20 Thread Jonathon Jongsma
output. Changes in version 3: - switch physical devices to autostart=false, persistent=false - rebase to upstream - update version numbers for new API, etc - fix accidental copy-paste error in virsh command descriptions Jonathon Jongsma (7): api: add virNodeDevice(Get|Set)Autostart

Re: [libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-08-03 Thread Jonathon Jongsma
On Tue, Aug 3, 2021 at 6:24 AM Boris Fiuczynski wrote: > > On 8/2/21 5:30 PM, Jonathon Jongsma wrote: > > On Fri, Jul 30, 2021 at 8:01 AM Boris Fiuczynski > > wrote: > >> > >> On 7/30/21 9:48 AM, Michal Prívozník wrote: > >>> On 7/29/21 9:27 P

Re: [libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-08-02 Thread Jonathon Jongsma
On Fri, Jul 30, 2021 at 8:01 AM Boris Fiuczynski wrote: > > On 7/30/21 9:48 AM, Michal Prívozník wrote: > > On 7/29/21 9:27 PM, Jonathon Jongsma wrote: > >> On Thu, Jul 29, 2021 at 1:35 PM Boris Fiuczynski > >> wrote: > >>> > >>> On 7/27/21

Re: [libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-07-29 Thread Jonathon Jongsma
On Thu, Jul 29, 2021 at 1:35 PM Boris Fiuczynski wrote: > > On 7/27/21 4:09 PM, Jonathon Jongsma wrote: > > On Tue, Jul 27, 2021 at 3:02 AM Michal Prívozník > > wrote: > >> > >> On 7/27/21 12:08 AM, Jonathon Jongsma wrote: > >>> On Mon, Jul 26

Re: [libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-07-27 Thread Jonathon Jongsma
On Tue, Jul 27, 2021 at 3:02 AM Michal Prívozník wrote: > > On 7/27/21 12:08 AM, Jonathon Jongsma wrote: > > On Mon, Jul 26, 2021 at 9:47 AM Michal Prívozník > > wrote: > >> > >> On 7/23/21 6:40 PM, Jonathon Jongsma wrote: > >>> Unfortunate

Re: [libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-07-26 Thread Jonathon Jongsma
On Mon, Jul 26, 2021 at 9:47 AM Michal Prívozník wrote: > > On 7/23/21 6:40 PM, Jonathon Jongsma wrote: > > Unfortunately, mdevctl supports defining more than one mdev with the > > same UUID as long as they have different parent devices. (Only one of > > these devices ca

[libvirt PATCH 7/7] nodedev: look up mdevs by UUID and parent

2021-07-23 Thread Jonathon Jongsma
Since UUID is not guaranteed to be unique by mdevctl, we may have more than one nodedev with the same UUID. Therefore, we need to disambiguate when looking up mdevs by specifying the UUID and parent address, which mdevctl guarantees to be a unique combination. Signed-off-by: Jonathon Jongsma

[libvirt PATCH 5/7] nodedev: add PostParse callback for nodedev parsing

2021-07-23 Thread Jonathon Jongsma
it for generating a unique name and interacting with mdevctl. Signed-off-by: Jonathon Jongsma --- src/conf/node_device_conf.c | 7 + src/node_device/node_device_driver.c | 45 +--- src/node_device/node_device_driver.h | 3 ++ src/node_device/node_device_udev.c | 1

[libvirt PATCH 2/7] nodedev: fix xml output for mdev parents in test suite

2021-07-23 Thread Jonathon Jongsma
that mapped to the appropriate parent. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 55 ++- .../mdevctl-list-multiple.out.xml | 8 +-- tests/nodedevmdevctltest.c| 28 +- 3 files changed, 59 insertions(+), 32

[libvirt PATCH 6/7] nodedev: Handle inactive mdevs with the same UUID

2021-07-23 Thread Jonathon Jongsma
address to ensure uniqueness. For example: Before: mdev_88a6b868_46bd_4015_8e5b_26107f82da38 After: mdev_88a6b868_46bd_4015_8e5b_26107f82da38__00_02_0 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1979440 Signed-off-by: Jonathon Jongsma --- src/node_device

[libvirt PATCH 4/7] nodedev: Add parser validation for node devices

2021-07-23 Thread Jonathon Jongsma
At the moment, this is only for mediated devices. When a new mediated device is created or defined, the xml is expected specify the nodedev name of an existing device as its parent. We were not previously validating this and were simply accepting any string here. Signed-off-by: Jonathon Jongsma

[libvirt PATCH 1/7] nodedev: add internal virNodeDeviceObjListFind()

2021-07-23 Thread Jonathon Jongsma
This is a generic function that you can provide your own predicate function to search for a particular device. It will be used in an upcoming commit. Signed-off-by: Jonathon Jongsma --- src/conf/virnodedeviceobj.c | 53 +++-- src/conf/virnodedeviceobj.h | 11

[libvirt PATCH 3/7] nodedev: cache parent address in mdev caps

2021-07-23 Thread Jonathon Jongsma
the mdev nodedev name in a following commit. Signed-off-by: Jonathon Jongsma --- src/conf/node_device_conf.h | 1 + src/node_device/node_device_driver.c | 1 + src/node_device/node_device_udev.c | 16 3 files changed, 18 insertions(+) diff --git a/src/conf

[libvirt PATCH 0/7] Accumulated mdev fixes

2021-07-23 Thread Jonathon Jongsma
mdevs with the same UUID" Jonathon Jongsma (7): nodedev: add internal virNodeDeviceObjListFind() nodedev: fix xml output for mdev parents in test suite nodedev: cache parent address in mdev caps nodedev: Add parser validation for node devices nodedev: add PostParse callback for nodedev parsing

Re: [libvirt PATCH] nodedev: Handle inactive mdevs with the same UUID

2021-07-22 Thread Jonathon Jongsma
On Thu, Jul 8, 2021 at 4:28 PM Jonathon Jongsma wrote: > > On Thu, Jul 8, 2021 at 3:47 PM Boris Fiuczynski wrote: > > > > On 7/6/21 9:05 PM, Jonathon Jongsma wrote: > > > Unfortunately, mdevctl supports defining more than one mdev with the > > > same UUID a

Re: [PATCH v3] nodedev: fix internal error when no defined mdevs exist

2021-07-22 Thread Jonathon Jongsma
/tests/nodedevmdevctltest.c > index 8ba1d2da70..e246de4d87 100644 > --- a/tests/nodedevmdevctltest.c > +++ b/tests/nodedevmdevctltest.c > @@ -360,6 +360,7 @@ mymain(void) > > DO_TEST_LIST_DEFINED(); > > + DO_TEST_PARSE_JSON("mdevctl-list-empty"); > DO_TEST_PARSE_JSON("mdevctl-list-multiple"); > > DO_TEST_DEFINE("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); Reviewed-by: Jonathon Jongsma I've pushed it upstream. Thanks, Jonathon

Re: [PATCH] nodedev: fix error when no defined mdev exist

2021-07-09 Thread Jonathon Jongsma
On Fri, 9 Jul 2021 15:39:47 +0200 Boris Fiuczynski wrote: > Commit e9b534905f4 introduced an error when parsing an empty list > returned from mdevctl. > > This occurs e.g. if nodedev-undefine is used to undefine the last > defined mdev which cuases the following error messages > >

Re: [libvirt PATCH 1/2] nodedev: fix parent device of inactive mdevs

2021-07-09 Thread Jonathon Jongsma
On Fri, Jul 9, 2021 at 6:11 AM Boris Fiuczynski wrote: > > Some observations without these patches > > > # mdevctl list -d > e60cef97-3f6b-485e-ac46-0520f9f66ac2 0.0.0033 vfio_ccw-io manual (active) > > # virsh nodedev-list --cap mdev > mdev_e60cef97_3f6b_485e_ac46_0520f9f66ac2 > > # virsh

Re: [libvirt PATCH] nodedev: Handle inactive mdevs with the same UUID

2021-07-08 Thread Jonathon Jongsma
On Thu, Jul 8, 2021 at 3:47 PM Boris Fiuczynski wrote: > > On 7/6/21 9:05 PM, Jonathon Jongsma wrote: > > Unfortunately, mdevctl supports defining more than one mdev with the > > same UUID as long as they have different parent devices. So we can't use > > the UUID al

[libvirt PATCH 2/2] virsh: allow nodedev-list --all --tree

2021-07-07 Thread Jonathon Jongsma
Allow the tree view with --all so that we can see all inactive mdevs in a tree structure nested under their parent devices. Signed-off-by: Jonathon Jongsma --- tools/virsh-nodedev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-nodedev.c b/tools/virsh

[libvirt PATCH 1/2] nodedev: fix parent device of inactive mdevs

2021-07-07 Thread Jonathon Jongsma
mock test environment. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979761 Signed-off-by: Jonathon Jongsma fixup --- src/node_device/node_device_driver.c | 20 ++- .../mdevctl-list-multiple.out.xml | 8 2 files changed, 23 insertions(+), 5

[libvirt PATCH] nodedev: Handle inactive mdevs with the same UUID

2021-07-06 Thread Jonathon Jongsma
: mdev_88a6b868_46bd_4015_8e5b_26107f82da38 After: mdev_88a6b868_46bd_4015_8e5b_26107f82da38__00_02_0 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1979440 Signed-off-by: Jonathon Jongsma --- QUESTION: Is there any expectation of stability in these device names? I'm not sure to what extent

Re: [libvirt PATCH v2 0/5] mdev tweaks

2021-06-30 Thread Jonathon Jongsma
On Wed, Jun 30, 2021 at 3:18 AM Michal Prívozník wrote: > > On 6/22/21 9:53 PM, Jonathon Jongsma wrote: > > A few minor fixes to mdev support in the nodedev driver > > > > Changes in v2: > > - split out the error-reporting macro into a separate commit as > &g

Re: [libvirt PATCH 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-06-23 Thread Jonathon Jongsma
On Wed, Jun 16, 2021 at 8:30 AM Boris Fiuczynski wrote: > > On 6/14/21 10:46 PM, Jonathon Jongsma wrote: > > On Mon, Jun 14, 2021 at 12:27 PM Boris Fiuczynski > > wrote: > >> > >> On 6/3/21 10:11 PM, Jonathon Jongsma wrote: > >>> Impleme

[libvirt PATCH v2 0/5] mdev tweaks

2021-06-22 Thread Jonathon Jongsma
consistent. v1 tried to return an error message and have the caller report the error. - Added a new patch (destroying inactive device) Jonathon Jongsma (5): nodedev: Remove useless device name from error message nodedev: Handle NULL command variable nodedev: add macro to handle command

[libvirt PATCH v2 5/5] nodedev: improve error message when destroying an inactive device

2021-06-22 Thread Jonathon Jongsma
is not valid: Device 'mdev_88a6b868_46bd_4015_8e5b_26107f82da38' is not active Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device

[libvirt PATCH v2 2/5] nodedev: Handle NULL command variable

2021-06-22 Thread Jonathon Jongsma
again: virsh # nodedev-create mdev-test.xml error: Failed to create node device from mdev-test.xml error: internal error: unable to find parent device 'pci__00_03_0' Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 16 1 file changed, 16

[libvirt PATCH v2 4/5] nodedev: handle mdevctl errors consistently

2021-06-22 Thread Jonathon Jongsma
ed for all error conditions rather than returning an error message back to the calling function. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 114 +++ 1 file changed, 65 insertions(+), 49 deletions(-) diff --git a/src/node_device/node_device_drive

[libvirt PATCH v2 3/5] nodedev: add macro to handle command errors

2021-06-22 Thread Jonathon Jongsma
This macro will be utilized in the following patch. Since mdevctl commands can fail with or without an error message, this macro makes it easy to print a fallback error in the case that the error message is not set. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 7

[libvirt PATCH v2 1/5] nodedev: Remove useless device name from error message

2021-06-22 Thread Jonathon Jongsma
. Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/node_device/node_device_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 8a0a2c3847..0f13cb4849 100644 --- a/sr

Re: [libvirt PATCH 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-06-22 Thread Jonathon Jongsma
On Tue, Jun 22, 2021 at 10:03 AM Boris Fiuczynski wrote: > > On 6/22/21 4:33 PM, Jonathon Jongsma wrote: > > So it appears that there is a bug where an mdev is still marked as > > autostart even after it's undefined. Was there anything else you were > > trying to demon

Re: [libvirt PATCH] nodedev: handle mdevs from multiple parents

2021-06-22 Thread Jonathon Jongsma
ping On Thu, Jun 10, 2021 at 1:18 PM Jonathon Jongsma wrote: > > Due to a rather unfortunate misunderstanding, we were parsing the list > of defined devices from mdevctl incorrectly. Since my primary > development machine only has a single device capable of mdevs, I > appar

Re: [libvirt PATCH 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-06-22 Thread Jonathon Jongsma
On Tue, Jun 22, 2021 at 2:08 AM Boris Fiuczynski wrote: > > On 6/14/21 10:46 PM, Jonathon Jongsma wrote: > > On Mon, Jun 14, 2021 at 12:27 PM Boris Fiuczynski > > wrote: > >> > >> On 6/3/21 10:11 PM, Jonathon Jongsma wrote: > >>> Impleme

[libvirt PATCH 3/3] nodedev: handle mdevctl errors consistently

2021-06-15 Thread Jonathon Jongsma
pty errmsg to "Unknown Error". Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 34 ++-- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index e6

[libvirt PATCH 2/3] nodedev: Handle NULL command variable

2021-06-15 Thread Jonathon Jongsma
again: virsh # nodedev-create mdev-test.xml error: Failed to create node device from mdev-test.xml error: internal error: unable to find parent device 'pci__00_03_0' Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 11 ++- 1 file changed, 6

[libvirt PATCH 1/3] nodedev: Remove useless device name from error message

2021-06-15 Thread Jonathon Jongsma
. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 8a0a2c3847..0f13cb4849 100644 --- a/src/node_device/node_device_drive

[libvirt PATCH 0/3] mdev tweaks

2021-06-15 Thread Jonathon Jongsma
A few minor fixes to mdev support in the nodedev driver Jonathon Jongsma (3): nodedev: Remove useless device name from error message nodedev: Handle NULL command variable nodedev: handle mdevctl errors consistently src/node_device/node_device_driver.c | 45 ++-- 1

Re: [libvirt PATCH 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-06-14 Thread Jonathon Jongsma
On Mon, Jun 14, 2021 at 12:27 PM Boris Fiuczynski wrote: > > On 6/3/21 10:11 PM, Jonathon Jongsma wrote: > > Implement these new API functions in the nodedev driver. > > > > Signed-off-by: Jonathon Jongsma > > --- > > src/n

[libvirt PATCH] nodedev: handle mdevs from multiple parents

2021-06-10 Thread Jonathon Jongsma
representing a parent device), the array always contains only a single object. That object has a separate property for each parent device. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 41 ++- .../mdevctl-list-multiple.json| 4 +- 2

Re: [libvirt PATCH v2 2/7] nodedev: implement virNodeDevice(Get|Set)Autostart()

2021-06-10 Thread Jonathon Jongsma
ping On Fri, Jun 4, 2021 at 1:58 PM Jonathon Jongsma wrote: > > Implement autostart functionality for mediated devices. > > Signed-off-by: Jonathon Jongsma > --- > src/conf/node_device_conf.h | 1 + > src/conf/virnodedeviceobj.c | 16 > src

[libvirt PATCH v2 2/7] nodedev: implement virNodeDevice(Get|Set)Autostart()

2021-06-04 Thread Jonathon Jongsma
Implement autostart functionality for mediated devices. Signed-off-by: Jonathon Jongsma --- src/conf/node_device_conf.h | 1 + src/conf/virnodedeviceobj.c | 16 src/conf/virnodedeviceobj.h | 6 ++ src/libvirt_private.syms | 2 + src/node_device

[libvirt PATCH v2 0/7] Enable autostarting mediated devices

2021-06-04 Thread Jonathon Jongsma
on the node device: IsActive() and IsPersistent(). These APIs are consistent with existing libvirt objects. Changes in version 2: - Parse the autostart property from mdevctl output. - only re-sending patch 2/7, all others were already ACKED Jonathon Jongsma (7): api: add virNodeDevice(Get|Set

Re: [libvirt PATCH 2/7] nodedev: implement virNodeDevice(Get|Set)Autostart()

2021-06-04 Thread Jonathon Jongsma
On Fri, Jun 4, 2021 at 3:07 AM Daniel P. Berrangé wrote: > > On Thu, Jun 03, 2021 at 03:11:51PM -0500, Jonathon Jongsma wrote: > > Implement autostart functionality for mediated devices. > > > > Signed-off-by: Jonathon Jongsma > > --- > > src/conf/virnodedevi

[libvirt PATCH 7/7] virsh: add nodedev-info

2021-06-03 Thread Jonathon Jongsma
This is currently the only way to view the 'autostart' property for a node device. Signed-off-by: Jonathon Jongsma --- docs/manpages/virsh.rst | 12 tools/virsh-nodedev.c | 68 + 2 files changed, 80 insertions(+) diff --git a/docs/manpages

[libvirt PATCH 5/7] api: add virNodeDeviceIsPersistent()/IsActive()

2021-06-03 Thread Jonathon Jongsma
-by: Jonathon Jongsma --- include/libvirt/libvirt-nodedev.h | 4 ++ src/driver-nodedev.h | 8 src/libvirt-nodedev.c | 65 +++ src/libvirt_public.syms | 2 + src/remote/remote_driver.c| 2 + src/remote/remote_protocol.x

[libvirt PATCH 4/7] virsh: add nodedev-autostart

2021-06-03 Thread Jonathon Jongsma
Add ability to set node devices to autostart on boot or parent device availability. Signed-off-by: Jonathon Jongsma --- docs/manpages/virsh.rst | 15 + tools/virsh-nodedev.c | 71 + 2 files changed, 86 insertions(+) diff --git a/docs/manpages

[libvirt PATCH 2/7] nodedev: implement virNodeDevice(Get|Set)Autostart()

2021-06-03 Thread Jonathon Jongsma
Implement autostart functionality for mediated devices. Signed-off-by: Jonathon Jongsma --- src/conf/virnodedeviceobj.c | 16 src/conf/virnodedeviceobj.h | 6 ++ src/libvirt_private.syms | 2 + src/node_device/node_device_driver.c | 116

[libvirt PATCH 6/7] nodedev: Implement virNodeDeviceIsPersistent()/IsActive()

2021-06-03 Thread Jonathon Jongsma
Implement these new API functions in the nodedev driver. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 50 src/node_device/node_device_driver.h | 6 src/node_device/node_device_udev.c | 21 +++- 3 files changed, 69

[libvirt PATCH 1/7] api: add virNodeDevice(Get|Set)Autostart()

2021-06-03 Thread Jonathon Jongsma
This will allow persistent mediated devices to be configured to be restarted automatically when the host reboots. Signed-off-by: Jonathon Jongsma --- include/libvirt/libvirt-nodedev.h | 6 +++ src/driver-nodedev.h | 10 src/libvirt-nodedev.c | 76

[libvirt PATCH 3/7] nodedev: Add tests for mdevctl autostart command

2021-06-03 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- .../nodedevmdevctldata/mdevctl-autostart.argv | 8 +++ tests/nodedevmdevctltest.c| 54 +++ 2 files changed, 62 insertions(+) create mode 100644 tests/nodedevmdevctldata/mdevctl-autostart.argv diff --git a/tests

[libvirt PATCH 0/7] Enable autostarting mediated devices

2021-06-03 Thread Jonathon Jongsma
on the node device: IsActive() and IsPersistent(). These APIs are consistent with existing libvirt objects. Jonathon Jongsma (7): api: add virNodeDevice(Get|Set)Autostart() nodedev: implement virNodeDevice(Get|Set)Autostart() nodedev: Add tests for mdevctl autostart command virsh: add nodedev

Re: [libvirt PATCH 0/2] Revert mdev autostart support

2021-05-27 Thread Jonathon Jongsma
On Thu, 27 May 2021 14:04:08 +0200 Michal Prívozník wrote: > On 5/26/21 5:40 PM, Jonathon Jongsma wrote: > > As Daniel Berrange mentioned, the method of supporting autostart > > for node devices was not consistent with other libvirt objects. > > This patch series revert

Re: Entering freeze for libvirt-7.4.0

2021-05-26 Thread Jonathon Jongsma
On Tue, May 25, 2021 at 10:12 AM Jiri Denemark wrote: > > I have just tagged v7.4.0-rc1 in the repository and pushed signed > tarballs and source RPMs to https://libvirt.org/sources/ > > Please give the release candidate some testing and in case you find a > serious issue which should have a fix

[libvirt PATCH 2/2] nodedev: Revert auto-start property for mdevs

2021-05-26 Thread Jonathon Jongsma
We supported autostart of node devices via an xml element, but this is not consistent with other libvirt objects which use an explicit API for setting autostart status. So revert this and implement it as an official API in a future commit. The initial support was refactored after merging, so this

[libvirt PATCH 0/2] Revert mdev autostart support

2021-05-26 Thread Jonathon Jongsma
As Daniel Berrange mentioned, the method of supporting autostart for node devices was not consistent with other libvirt objects. This patch series reverts this feature before it gets into a release. I will submit a follow-up patch soon which adds the feature back with a consistent API. Jonathon

[libvirt PATCH 1/2] Partial Revert of "tests: nodedevxml2xmltest: test more mdev files"

2021-05-26 Thread Jonathon Jongsma
This reverts parts of commit bb8c3b61208ed0f29dcbeca857529600f04b3146 that added tests for autostart functionality (which will be reverted in the following commit) --- tests/nodedevschemadata/mdev_autostart.xml| 10 -- tests/nodedevschemadata/mdev_manual.xml | 10

Re: [libvirt PATCH 0/4] Support autostart for mediated devices

2021-05-25 Thread Jonathon Jongsma
On Tue, 2021-05-25 at 11:20 +0100, Daniel P. Berrangé wrote: > On Fri, May 14, 2021 at 04:28:57PM -0500, Jonathon Jongsma wrote: > > This is a short patch series based on an initial patch from Boris > > Fiuczynski > > that I massaged a little bit and added a f

Re: [libvirt PATCH 1/4] test: move nodedev xml2xml output to a separate dir

2021-05-19 Thread Jonathon Jongsma
On Wed, 2021-05-19 at 10:46 +0200, Michal Prívozník wrote: > On 5/14/21 11:28 PM, Jonathon Jongsma wrote: > > Currently, we're loading and parsing the xml from the input file, > > and > > then formatting it and then comparing it directly back to the input > &g

[libvirt PATCH 3/4] tests: nodedevxml2xmltest: test more mdev files

2021-05-14 Thread Jonathon Jongsma
Add the rest of the mdev xml files to the xml2xml test, and include 2 new test cases: one that explicitly specifies 'manual' start, and one that explicitly specifies 'auto' start. Signed-off-by: Jonathon Jongsma --- tests/nodedevschemadata/mdev_autostart.xml| 10 ++ tests

[libvirt PATCH 4/4] docs: nodedev: document mdev uuid property

2021-05-14 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- docs/formatnode.html.in | 4 1 file changed, 4 insertions(+) diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index 3065570405..9a505f0fe9 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -384,6 +384,10

[libvirt PATCH 2/4] nodedev: support auto-start property for mdevs

2021-05-14 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- docs/formatnode.html.in | 10 ++ docs/schemas/nodedev.rng | 11 ++ src/conf/node_device_conf.c | 20 ++- src/conf/node_device_conf.h | 12

[libvirt PATCH 1/4] test: move nodedev xml2xml output to a separate dir

2021-05-14 Thread Jonathon Jongsma
xml2xml tests are already doing. Signed-off-by: Jonathon Jongsma --- tests/nodedevxml2xmlout/DVD_GCC_4247N.xml | 15 + tests/nodedevxml2xmlout/DVD_with_media.xml| 18 ++ tests/nodedevxml2xmlout/ap_07_0038.xml| 9 + tests/nodedevxml2xmlout/ap_card07.xml

[libvirt PATCH 0/4] Support autostart for mediated devices

2021-05-14 Thread Jonathon Jongsma
: support auto-start property for mdevs Jonathon Jongsma (3): test: move nodedev xml2xml output to a separate dir tests: nodedevxml2xmltest: test more mdev files docs: nodedev: document mdev uuid property docs/formatnode.html.in | 14 docs/schemas/nodedev.rng

Re: [PATCH v2] Add page_per_vq flag to the 'driver' element of virtio devices

2021-05-05 Thread Jonathon Jongsma
On Wed, 2021-05-05 at 10:25 +0300, Gavi Teitz wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > Add support for setting the page-per-vq flag, which is important for > vdpa with vhost-user performance. > > Signed-off-by: Gavi Teitz > --- >  docs/formatdomain.rst

Re: [PATCH 2/3] conf: Parse/format XML input type 'linux'

2021-04-30 Thread Jonathon Jongsma
On Fri, 2021-04-30 at 14:16 +0200, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- >  docs/formatdomain.rst    | 30 +++- >  docs/schemas/domaincommon.rng    | 20 >  src/conf/domain_audit.c  |  1 + >  src/conf/domain_conf.c 

Re: [PATCH] Add page_per_vq flag to the 'driver' element of virtio devices

2021-04-29 Thread Jonathon Jongsma
On Thu, 2021-04-29 at 14:12 +0300, Gavi Teitz wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > Add support for setting the page-per-vq flag, which is important for > vdpa with vhost-user performance. > > Signed-off-by: Gavi Teitz > [snip] > diff --git a/src/conf/domain_conf.c

Re: [libvirt PATCH 08/10] conf: domain: Register autoptr cleanup function for virDomainDeviceDef

2021-04-27 Thread Jonathon Jongsma
in the subject, I think you meant to say virDomainShmemDef? On Tue, 2021-04-27 at 17:04 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/conf/domain_conf.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index

[libvirt PATCH] NEWS: mention persistent mediated devices

2021-04-27 Thread Jonathon Jongsma
Signed-off-by: Jonathon Jongsma --- NEWS.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5f8b0ae02d..f64b24a0e6 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,6 +18,17 @@ v7.3.0 (unreleased) The xen driver now supports domains with more than 4TB

<    1   2   3   4   5   6   7   8   9   10   >