Re: [libvirt] [PATCH 00/16] snapshot refactoring (incremental backup saga)

2019-03-21 Thread Eric Blake
On 3/20/19 12:40 AM, Eric Blake wrote: > A couple of these have seen the list before, but most of them are > new. The bulk of this series is about refactoring snapshot_conf.c into > smaller pieces that I can then reuse for implementing checkpoints, > without having to open-code the hierarchy algori

Re: [libvirt] [PATCH 15/16] snapshot: Tweaks to support new bulk dumpxml/import API

2019-03-21 Thread Eric Blake
On 3/21/19 7:41 PM, John Ferlan wrote: > > > On 3/20/19 1:41 AM, Eric Blake wrote: >> Change the return value of virDomainSnapshotObjLisParse() to return > > *ListParse > >> the number of snapshots imported, and allow a return of 0 (the >> original proposal of adding a flag to virDomainSnapshot

Re: [libvirt] [PATCH 14/16] snapshot: Move snapshot list code into generic file

2019-03-21 Thread Eric Blake
On 3/21/19 7:33 PM, John Ferlan wrote: > > > On 3/20/19 1:41 AM, Eric Blake wrote: >> Finish the code motion of generic moment list handling. Well, mostly - >> we need to convert to using virObject to get polymorphic cleanup >> functions (so for now there are still a few lingering ties specific t

[libvirt] [PATCH 14.5/16] snapshot: Make virDomainMomentObjListGetNames more generic

2019-03-21 Thread Eric Blake
Rather than hard-coding the snapshot filter bit values into the generic code, add another layer of indirection: callers must map which of their public filter bits correspond to supported moment bits, then pass two separate flags (the ones translated for moment code to operate on, and the remaining

Re: [libvirt] [PATCH v3 10/36] network: move fixup for domain actual net def out of network driver

2019-03-21 Thread Laine Stump
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: The hypervisor drivers are soon going to communicate with the network driver via public APIs only. As such the network driver will not ever see the domain actual network def. Thus the backwards compatibility fixup logic must be moved out of the networ

Re: [libvirt] [PATCH v3 09/36] network: move re-attach of bridge device out of network driver

2019-03-21 Thread Laine Stump
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: During initial NIC setup the hypervisor drivers are responsible for attaching the TAP device to the bridge device. Any fixup after libvirtd restarts should thus also be their responsibility. Signed-off-by: Daniel P. Berrangé *And* this fixes a bu

Re: [libvirt] [PATCH v3 06/36] util: add helper method for re-attaching a tap device to a bridge

2019-03-21 Thread Laine Stump
On 3/21/19 9:14 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/libvirt_private.syms | 1 + src/util/virnetdevtap.c | 69 src/util/virnetdevtap.h | 12 +++ 3 files changed, 82 i

Re: [libvirt] [PATCH v3 05/36] network: use 'bridge' as actual type instead of 'network'

2019-03-21 Thread Laine Stump
On 3/21/19 9:07 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: Ports allocated on virtual networks with type=nat|route|open all get given an actual type of 'network'. Only ports in networks with type=bridge use an actual type of 'bridge'. This distinction makes little s

Re: [libvirt] [PATCH v3 04/36] network: add missing bandwidth limits for bridge forward type

2019-03-21 Thread Laine Stump
On 3/21/19 9:52 PM, Laine Stump wrote: On 3/21/19 8:58 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: In the case of a network with forward=bridge, which has a bridge device listed, we are capable of setting bandwidth limits but fail to call the function to register them

Re: [libvirt] [PATCH 14/16] snapshot: Move snapshot list code into generic file

2019-03-21 Thread Eric Blake
On 3/21/19 7:33 PM, John Ferlan wrote: > > > On 3/20/19 1:41 AM, Eric Blake wrote: >> Finish the code motion of generic moment list handling. Well, mostly - >> we need to convert to using virObject to get polymorphic cleanup >> functions (so for now there are still a few lingering ties specific t

Re: [libvirt] [PATCH v3 04/36] network: add missing bandwidth limits for bridge forward type

2019-03-21 Thread Laine Stump
On 3/21/19 8:58 PM, Cole Robinson wrote: On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: In the case of a network with forward=bridge, which has a bridge device listed, we are capable of setting bandwidth limits but fail to call the function to register them. Signed-off-by: Daniel P. Berrangé --

Re: [libvirt] [PATCH v3 01/36] network: restrict usage of port management APIs

2019-03-21 Thread Laine Stump
On 3/21/19 8:27 PM, Cole Robinson wrote: Okay so I needed to do some studying to understand what's going on in the first part of this series. Just gonna type some notes here: virDomainActualNetDef tracks all the data we need to convert a virNetworkPtr content to a virDomainNetDef . It's only eve

Re: [libvirt] [PATCH v3 08/36] virt drivers: don't handle type=network after resolving actual network type

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > The call to resolve the actual network type will turn any NICs with > type=network into one of the other types. Thus there should be no need > to handle type=network in later switch() statements jumping off the > actual type. > > Signed-off-by: Danie

Re: [libvirt] [PATCH v3 07/36] network: use virNetDevTapReattachBridge API

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > Switch over to use the new API for re-attaching the bridge device > > Signed-off-by: Daniel P. Berrangé > --- > src/network/bridge_driver.c | 47 - > 1 file changed, 10 insertions(+), 37 deletions(-) > Reviewed

Re: [libvirt] [PATCH v3 06/36] util: add helper method for re-attaching a tap device to a bridge

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > src/libvirt_private.syms | 1 + > src/util/virnetdevtap.c | 69 > src/util/virnetdevtap.h | 12 +++ > 3 files changed, 82 insertions(+) > > diff --git a/src/l

Re: [libvirt] [PATCH v3 05/36] network: use 'bridge' as actual type instead of 'network'

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > Ports allocated on virtual networks with type=nat|route|open all get > given an actual type of 'network'. > > Only ports in networks with type=bridge use an actual type of 'bridge'. > > This distinction makes little sense since the virtualization dr

Re: [libvirt] [PATCH v3 04/36] network: add missing bandwidth limits for bridge forward type

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > In the case of a network with forward=bridge, which has a bridge device > listed, we are capable of setting bandwidth limits but fail to call the > function to register them. > > Signed-off-by: Daniel P. Berrangé > --- > src/network/bridge_driver.c

Re: [libvirt] [PATCH v3 03/36] conf: simplify link from hostdev back to network device

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > hostdevs have a link back to the original network device. This is fairly > generic accepting any type of device, however, we don't intend to make > use of this approach in future. It can thus be specialized to network > devices. > > Signed-off-by: Da

Re: [libvirt] [PATCH v3 02/36] network: pass a virNetworkPtr to port management APIs

2019-03-21 Thread Cole Robinson
On 3/19/19 8:46 AM, Daniel P. Berrangé wrote: > The APIs for allocating/notifying/removing network ports just take > an internal domain interface struct right now. As a step towards > turning these into public facing APIs, add a virNetworkPtr argument > to all of them. > > Signed-off-by: Daniel P.

Re: [libvirt] [PATCH 16/16] backup: Introduce virDomainCheckpointPtr

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Prepare for introducing a bunch of new public APIs related to backup > checkpoints by first introducing a new internal type and errors > associated with that type. Checkpoints are modeled heavily after > virDomainSnapshotPtr (both represent a point in tim

Re: [libvirt] [PATCH 13/16] snapshot: Rename file for virDomainMomentObj

2019-03-21 Thread Eric Blake
On 3/21/19 6:56 PM, John Ferlan wrote: > > > On 3/20/19 1:41 AM, Eric Blake wrote: >> Now that we have made virDomainMomentObj sufficiently generic to >> support both snapshots and checkpoints, it is time to rename the file >> that it lives in. The split between a generic object and a list of the

Re: [libvirt] [PATCH 15/16] snapshot: Tweaks to support new bulk dumpxml/import API

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Change the return value of virDomainSnapshotObjLisParse() to return *ListParse > the number of snapshots imported, and allow a return of 0 (the > original proposal of adding a flag to virDomainSnapshotCreateXML > required returning an arbitrary non-NULL

Re: [libvirt] [PATCH 06/16] snapshot: Track current snapshot in virDomainSnapshotObjList

2019-03-21 Thread John Ferlan
On 3/21/19 3:58 PM, Eric Blake wrote: > On 3/20/19 4:03 PM, Eric Blake wrote: >> On 3/20/19 3:39 PM, John Ferlan wrote: >>> >>> >>> On 3/20/19 1:40 AM, Eric Blake wrote: It is easier to track the current snapshot as part of the list of snapshots. In particular, doing so lets us guarant

Re: [libvirt] [PATCH 14/16] snapshot: Move snapshot list code into generic file

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Finish the code motion of generic moment list handling. Well, mostly - > we need to convert to using virObject to get polymorphic cleanup > functions (so for now there are still a few lingering ties specific to > snapshots). In this case, I kept virDomain

Re: [libvirt] [PATCH v3 01/36] network: restrict usage of port management APIs

2019-03-21 Thread Cole Robinson
Okay so I needed to do some studying to understand what's going on in the first part of this series. Just gonna type some notes here: virDomainActualNetDef tracks all the data we need to convert a virNetworkPtr content to a virDomainNetDef . It's only ever filled in for when a domain is running.

Re: [libvirt] [PATCH 13/16] snapshot: Rename file for virDomainMomentObj

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Now that we have made virDomainMomentObj sufficiently generic to > support both snapshots and checkpoints, it is time to rename the file > that it lives in. The split between a generic object and a list of the > generic objects doesn't buy us as much, so i

Re: [libvirt] [PATCH 12/16] snapshot: Rename virDomainSnapshotObjPtr

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Now that the core of SnapshotObj is agnostic to snapshots and can be > shared with upcoming checkpoint code, it is time to rename the struct > and the functions specific to list operations. A later patch will > shuffle which file holds the common code. Thi

Re: [libvirt] [PATCH 11/16] snapshot: Switch type of virDomainSnapshotObj.def

2019-03-21 Thread John Ferlan
On 3/20/19 1:41 AM, Eric Blake wrote: > Another step towards making the object list reusable for both > snapshots and checkpoints: the list code only ever needs items that > are in the common virDomainMomentDef base type. This undoes a lot of > the churn in accessing common members added the ear

[libvirt] [PATCH 14/21] qemu_hotplug: remove extra function in middle of DetachController call chain

2019-03-21 Thread Laine Stump
qemuDomainDetachDeviceControllerLive() just checks if the controller type is SCSI, and then either returns failure, or calls qemuDomainDetachControllerDevice(). Instead, lets just check for type != SCSI at the top of the latter function, and call it directly. Signed-off-by: Laine Stump --- src/

[libvirt] [PATCH 12/21] qemu_hotplug: move (Attach|Detach)Lease functions with others of same type

2019-03-21 Thread Laine Stump
The Attach and Detach Lease functions were together in the middle of the Detach functions. Put them at the end of their respective sections, since they behave differently from the other attach/detach functions (DetachLease doesn't use qemuDomainDeleteDevice(), and is always synchronous). Signed-of

[libvirt] [PATCH 03/21] qemu_hotplug: remove unnecessary check for valid PCI address

2019-03-21 Thread Laine Stump
When support for hotplug/unplug of SCSI controllers was added way back in December 2009 (commit da9d937b), unplug was handled by calling the now-extinct function qemuMonitorRemovePCIDevice(), which required a PCI address as an argument. At the same time, the idea of every device in the config havin

[libvirt] [PATCH 04/21] qemu_hotplug: rename a virDomainDeviceInfoPtr to avoid confusion

2019-03-21 Thread Laine Stump
Having an InfoPtr named "dev" made my brain hurt. Renaming it to "info" gives one less thing to confuse when looking at the code. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qe

[libvirt] [PATCH 19/21] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-21 Thread Laine Stump
This function can be called with a virDomainDevicePtr and whether or not the removal was successful, and it will call the appropriate virDomainAudit*() function with the appropriate args for whatever type of device it's given (or do nothing, if that's appropriate). This permits generalizing some co

[libvirt] [PATCH 07/21] qemu_hotplug: refactor qemuDomainDetachDiskLive and qemuDomainDetachDiskDevice

2019-03-21 Thread Laine Stump
qemuDomainDetachDiskDevice() is only called from one place. Moving the contents of the function to that place makes qemuDomainDetachDiskLive() more similar to the other Detach functions called by the toplevel qemuDomainDetachDevice(). The goal is to make each of the device-type-specific functions

[libvirt] [PATCH 08/21] qemu_hotplug: don't call DetachThisHostDevice for hostdev network devices

2019-03-21 Thread Laine Stump
Back in the bad old days different device types required a different qemu monitor call to detach them, and so an needed to call the function for detaching hostdevs, while other types could be deleted as netdevs. Times have changed, and *all* device types are detached by calling the common functi

[libvirt] [PATCH 21/21] qemu_hotplug: delay sending DEVICE_REMOVED event until after *all* teardown

2019-03-21 Thread Laine Stump
The VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event is sent after qemu has responded to a device_del command with a DEVICE_DELETED event. Before queuing the event, *some* of the final teardown of the device's trappings in libvirt is done, but not *all* of it. As a result, an application may receive and pr

[libvirt] [PATCH 16/21] test: replace calls to individual detach functions with one call to main detach

2019-03-21 Thread Laine Stump
The individual qemuDomainDetach*Device() functions will soon be "less functional", since some of the code that is duplicated in 10 of the 12 detach functions is going to be moved into the common qemuDomainDetachDeviceLive(), which calls them all. qemuhotplugtest.c is the only place any of these in

[libvirt] [PATCH 06/21] qemu_hotplug: eliminate unnecessary call to qemuDomainDetachNetDevice()

2019-03-21 Thread Laine Stump
qemuDomainDetachHostDevice() has a check at the end that calls qemuDomainDetachNetDevice() in the case that the hostdev is actually a Net device of type='hostdev'. A long time ago when device removal was (supposedly but not actually) synchronous, this would cause some extra code to be run prior to

[libvirt] [PATCH 15/21] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
qemuDomainDetachDeviceLive() is called from two places in qemu_driver.c. Move the call to qemuDomainUpdateDeviceList() from the end of that function, which is now in qemu_hotplug.c, to the two places that call qemuDomainDetachDeviceLive(). Removing that one call from qemuDomainDetachDeviceList() w

[libvirt] [PATCH 11/21] qemu_hotplug: move (almost) all qemuDomainDetach*() functions together

2019-03-21 Thread Laine Stump
There were two outliers at the end of the file beyond the Vcpu functions. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 174 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[libvirt] [PATCH 13/21] qemu_hotplug: move qemuDomainDetachDeviceLive() to qemu_hotplug.c

2019-03-21 Thread Laine Stump
This function is going to take on some of the functionality of its subordinate functions, which all live in qemu_hotplug.c. Signed-off-by: Laine Stump --- src/qemu/qemu_driver.c | 95 - src/qemu/qemu_hotplug.c | 129 +++- src/qemu

[libvirt] [PATCH 20/21] qemu_hotplug: consolidate all common detach code in qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
Now that all the qemuDomainDetachPrep*() functions look nearly identical at the end, we can put one copy of that identical code in qemuDomainDetachDeviceLive() at the point after the individual prep functions have been called, and remove the duplicated code from all the prep functions. The code to

[libvirt] [PATCH 18/21] qemu_hotplug: standardize the names/args/calling of qemuDomainDetach*()

2019-03-21 Thread Laine Stump
Most of these functions will soon contain only some setup for detaching the device, not the detach code proper (since that code is identical for these devices). Their device specific functions are all being renamed to qemuDomainDetachPrep*(), where * is the name of that device's data member in the

[libvirt] [PATCH 01/21] qemu_hotplug: remove erroneous call to qemuDomainDetachExtensionDevice()

2019-03-21 Thread Laine Stump
qemuDomainDetachControllerDevice() calls qemuDomainDetachExtensionDevice() when the *controller* type is PCI. This is incorrect in multiple ways: * Any code that tears down a device should be in the qemuDomainRemove*Device() function (which is called after libvirt gets a DEVICE_DELETED event f

[libvirt] [PATCH 02/21] qemu_hotplug: remove another erroneous qemuDomainDetachExtensionDevice() call

2019-03-21 Thread Laine Stump
qemuDomainRemoveRNGDevice() calls qemuDomainDetachExtensionDevice(). According to commit 1d1e264f1 that added this code, it should not be necessary to explicitly remove the zPCI extension device for a PCI device during unplug, because "QEMU implements an unplug callback which will unplug both PCI a

[libvirt] [PATCH 10/21] qemu_hotplug: move qemuDomainChangeGraphicsPasswords()

2019-03-21 Thread Laine Stump
It was sitting down in the middle of all the qemuDomainDetach*() functions. Move it up with the rest of the qemuDomain*Graphics*() functions. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 151 1 file changed, 77 insertions(+), 74 deletions(-)

[libvirt] [PATCH 05/21] qemu_hotplug: eliminate multiple identical qemuDomainDetachHost*Device() functions

2019-03-21 Thread Laine Stump
There are separate Detach functions for PCI, USB, SCSI, Vhost, and Mediated hostdevs, but the functions are all 100% the same code, except that the PCI function checks for the guest side of the device being a PCI Multifunction device, while the other 4 check that the device's alias != NULL. The ch

[libvirt] [PATCH 17/21] qemu_hotplug: rename dev to match in qemuDomainDetachDeviceLive

2019-03-21 Thread Laine Stump
I'm about to add a second virDomainDeviceDef to this function that will point to the actual device in the domain object. while this is just a partially filled-in example of what to look for. Naming it match will make the code easier to follow. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug

[libvirt] [PATCH 00/21] qemu_hotplug: refactor device detach functions to fix one serious and other minor bugs

2019-03-21 Thread Laine Stump
This all started with the observation that we were sending the DEVICE_REMOVED events for unplugged devices too soon (reported in https://bugzilla.redhat.com/1658198 ). While noticing that *all* of the device types send their DEVICE_REMOVED event too early, I also noticed how eerily similar all the

[libvirt] [PATCH 09/21] qemu_hotplug: merge qemuDomainDetachThisHostDevice into qemuDomainDetachHostDevice

2019-03-21 Thread Laine Stump
It's now only called from one place, and combining the two functions highlights the similarity with Detach functions for other device types. Signed-off-by: Laine Stump --- src/qemu/qemu_hotplug.c | 107 +++- 1 file changed, 41 insertions(+), 66 deletions(-) d

Re: [libvirt] [PATCH 10/16] snapshot: Factor out virDomainMomentDef class

2019-03-21 Thread John Ferlan
On 3/20/19 1:40 AM, Eric Blake wrote: > Pull out the common parts of virDomainSnapshotDef that will be reused > for virDomainCheckpointDef into a new base class. Adjust all callers > that use the direct fields (some of it is churn that disappears when > the next patch refactors virDomainSnapsho

Re: [libvirt] [PATCH 06/16] snapshot: Track current snapshot in virDomainSnapshotObjList

2019-03-21 Thread Eric Blake
On 3/20/19 4:03 PM, Eric Blake wrote: > On 3/20/19 3:39 PM, John Ferlan wrote: >> >> >> On 3/20/19 1:40 AM, Eric Blake wrote: >>> It is easier to track the current snapshot as part of the list of >>> snapshots. In particular, doing so lets us guarantee that the current >>> snapshot is cleared if th

[libvirt] [PATCH v2 1/4] tests: qemuxml2argv: Tweak TEST_CAPS_PATH

2019-03-21 Thread Cole Robinson
Make it an actual path and not a string prefix Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 14d3df02a9..d982a497a9 100644 --- a/tests/qemuxml2argvtest.c

[libvirt] [PATCH v2 0/4] tests: qemuxml2argv: support optional arguments

2019-03-21 Thread Cole Robinson
Small/completion follow up to v1 here, which is mostly pushed: https://www.redhat.com/archives/libvir-list/2019-March/msg00943.html Patch 1 and 3 are new additions based on Andrea's reviews. Rest of the review comments should be addressed Cole Robinson (4): tests: qemuxml2argv: Tweak TEST_CAPS_

[libvirt] [PATCH v2 3/4] tests: qemuxml2argv: report error on ARG_* collisions

2019-03-21 Thread Cole Robinson
* ARG_CAPS_ARCH must be specified with ARG_CAPS_VER * ARG_QEMU_CAPS shouldn't be specified with ARG_CAPS_* Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 191a437

[libvirt] [PATCH v2 2/4] tests: qemuxml2argv: move DO_CAPS_TEST* qemuCaps init

2019-03-21 Thread Cole Robinson
Move DO_CAPS_TEST* qemuCaps init and all the associated setup into testInfoSetArgs, adding ARG_CAPS_ARCH and ARG_CAPS_VER options and using those to build the capsfile path locally Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 69 +++- 1 file cha

[libvirt] [PATCH v2 4/4] tests: qemuxml2argv: add DO_TEST_INTERNAL

2019-03-21 Thread Cole Robinson
Base macro to unify the actual testCompareXMLToArgv test calls Reviewed-by: Andrea Bolognani Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2arg

Re: [libvirt] [PATCH 20/21] tests: qemuxml2argv: move DO_CAPS_TEST* qemuCaps init

2019-03-21 Thread Cole Robinson
On 3/19/19 11:18 AM, Andrea Bolognani wrote: > On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote: > [...] >> @@ -612,20 +614,25 @@ typedef enum { >> ARG_MIGRATE_FD, >> ARG_FLAGS, >> ARG_PARSEFLAGS, >> +ARG_CAPS_ARCH, >> +ARG_CAPS_VER, > > I guess these could be simply A

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Laszlo Ersek
On 03/21/19 18:58, Peter Maydell wrote: > On Thu, 21 Mar 2019 at 17:35, Laszlo Ersek wrote: >> It simply keeps the status quo from before the patchset. >> >> The specific emulation targets that virtio-vga should not be enabled for >> (regardless of other targets / machine types) are arm/aarch64. I

Re: [libvirt] [PATCH 09/16] snapshot: Refactor list filtering

2019-03-21 Thread Eric Blake
On 3/20/19 4:40 PM, John Ferlan wrote: > > > On 3/20/19 1:40 AM, Eric Blake wrote: >> Separate the algorithm for which list members to vist (which is >> generic and can be shared with checkpoints, provided that checkpoints >> pick the same bit values for some of its flags) from the decision on >>

Re: [libvirt] [PATCH 08/16] snapshot: Access snapshot def directly when needed

2019-03-21 Thread Eric Blake
On 3/20/19 4:37 PM, John Ferlan wrote: > > > On 3/20/19 1:40 AM, Eric Blake wrote: >> An upcoming patch will rework virDomainSnapshotObjList to be generic >> for both snapshots and checkpoints; reduce the churn by adding a new >> accessor virDomainSnapshotObjGetDef() which returns the >> snapshot

Re: [libvirt] [PATCH 07/16] snapshot: Add accessors for updating snapshot list relations

2019-03-21 Thread Eric Blake
On 3/20/19 4:28 PM, John Ferlan wrote: > > > On 3/20/19 1:40 AM, Eric Blake wrote: >> Rather than allowing a leaky abstraction where multiple drivers have >> to open-code operations that update the relations in a >> virDomainSnapshotObjList, it is better to add accessor functions so >> that updat

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Peter Maydell
On Thu, 21 Mar 2019 at 17:35, Laszlo Ersek wrote: > It simply keeps the status quo from before the patchset. > > The specific emulation targets that virtio-vga should not be enabled for > (regardless of other targets / machine types) are arm/aarch64. IOW, in > the longer term, it's not that virtio

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Laszlo Ersek
On 03/21/19 15:21, Philippe Mathieu-Daudé wrote: > Le jeu. 21 mars 2019 13:39, Laszlo Ersek a écrit : > >> On 03/21/19 01:53, Laszlo Ersek wrote: >>> Hi Paolo, >>> >>> (+libvir-list) >>> >>> I'd like to report a regression introduced by this patch set: >>> >>> On 03/07/19 21:58, Paolo Bonzini wro

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Laszlo Ersek
On 03/21/19 14:04, Peter Maydell wrote: > On Thu, 21 Mar 2019 at 12:40, Laszlo Ersek wrote: >> In brief, the regression is that the aarch64 system emulator now lists >> the "virtio-vga" device for the "virt" machine type: >> >> $ qemu-system-aarch64 -M virt -device \? | grep virtio-vga >> name "vi

Re: [libvirt] [PATCH 05/16] snapshot: Drop virDomainSnapshotDef.current

2019-03-21 Thread Eric Blake
On 3/20/19 12:40 AM, Eric Blake wrote: > The only use for the 'current' member of virDomainSnapshotDef was with > the PARSE/FORMAT_INTERNAL flag for controlling an internal-use > element marking whether a particular snapshot definition was > current, and even then, only by the qemu driver on outpu

Re: [libvirt] [PATCH 15/21] tests: qemuxml2argv: remove full testInfo initialization

2019-03-21 Thread Cole Robinson
On 3/19/19 10:12 AM, Andrea Bolognani wrote: > On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote: > [...] >> +# define DO_TEST_CAPS_INTERNAL(_name, _suffix, \ >> arch, capsfile, stripmachinealiases, ...) \ >> do { \ >> static struct testInfo info =

Re: [libvirt] [PATCH 10/21] tests: qemuxml2argv: remove DO_TEST_PARSE_FLAGS_ERROR

2019-03-21 Thread Cole Robinson
On 3/19/19 9:24 AM, Andrea Bolognani wrote: > On Thu, 2019-03-14 at 10:44 -0400, Cole Robinson wrote: > [...] >> +DO_TEST_FULL("missing-machine", >> + ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, >> + ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDAT

Re: [libvirt] [PATCH 03/21] tests: qemuxml2argv: add va_arg enum handling

2019-03-21 Thread Cole Robinson
On 3/19/19 7:36 AM, Andrea Bolognani wrote: > On Thu, 2019-03-14 at 10:43 -0400, Cole Robinson wrote: > [...] >> +typedef enum { >> +ARG_QEMU_CAPS = 1, > > Any specific reason to start from 1 rather than 0, or even leaving > out the start value entirely? > Nope it's not necessary, I've droppe

Re: [libvirt] [PATCH 05/16] snapshot: Drop virDomainSnapshotDef.current

2019-03-21 Thread Eric Blake
On 3/20/19 2:57 PM, John Ferlan wrote: > > > On 3/20/19 1:40 AM, Eric Blake wrote: >> The only use for the 'current' member of virDomainSnapshotDef was with >> the PARSE/FORMAT_INTERNAL flag for controlling an internal-use >> element marking whether a particular snapshot definition was >> curren

Re: [libvirt] [PATCH 03/16] snapshot: Create virDomainMoment base class

2019-03-21 Thread Eric Blake
On 3/20/19 2:57 PM, John Ferlan wrote: > > > On 3/20/19 1:40 AM, Eric Blake wrote: >> Upcoming patches want to add virDomainCheckpoint that behaves very >> similarly to virDomainSnapshot; the easiest way to share common code >> is to give both classes a common base class. Thanks to the accessor

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Paolo Bonzini
On 21/03/19 14:04, Peter Maydell wrote: >> >> were then removed in commit 9483cf27dd36 ("hppa-softmmu.mak: express >> dependencies with Kconfig", 2019-03-07) and commit 87f9108bad0c ("ppc64: >> Express dependencies of 'pseries' and 'powernv' machines with kconfig", >> 2019-03-07), from files >> >>

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Peter Maydell
On Thu, 21 Mar 2019 at 12:40, Laszlo Ersek wrote: > In brief, the regression is that the aarch64 system emulator now lists > the "virtio-vga" device for the "virt" machine type: > > $ qemu-system-aarch64 -M virt -device \? | grep virtio-vga > name "virtio-vga", bus PCI > > Here's where I think the

Re: [libvirt] [PATCH] xml: nodedev: make pci capability class element optional

2019-03-21 Thread Nikolay Shirokovskiy
On 21.03.2019 15:28, Erik Skultety wrote: > On Thu, Mar 21, 2019 at 11:49:55AM +, Nikolay Shirokovskiy wrote: >> >> >> On 21.03.2019 14:32, Erik Skultety wrote: >>> On Thu, Mar 21, 2019 at 10:27:14AM +0300, Nikolay Shirokovskiy wrote: Commit 3bd4ed46 introduced this element as required

Re: [libvirt] [Qemu-devel] [PULL v3 00/54] Kconfig conversion, excluding ARM and MIPS

2019-03-21 Thread Laszlo Ersek
On 03/21/19 01:53, Laszlo Ersek wrote: > Hi Paolo, > > (+libvir-list) > > I'd like to report a regression introduced by this patch set: > > On 03/07/19 21:58, Paolo Bonzini wrote: >> The following changes since commit >> 6cb4f6db4f4367faa33da85b15f75bbbd2bed2a6: >> >> Merge remote-tracking bra

Re: [libvirt] [PATCH] xml: nodedev: make pci capability class element optional

2019-03-21 Thread Erik Skultety
On Thu, Mar 21, 2019 at 11:49:55AM +, Nikolay Shirokovskiy wrote: > > > On 21.03.2019 14:32, Erik Skultety wrote: > > On Thu, Mar 21, 2019 at 10:27:14AM +0300, Nikolay Shirokovskiy wrote: > >> Commit 3bd4ed46 introduced this element as required which > >> breaks backcompat for test driver. Let'

Re: [libvirt] [PATCH] nwfilter: fix adding std MAC and IP values to filter binding

2019-03-21 Thread Daniel P . Berrangé
On Thu, Mar 21, 2019 at 10:32:07AM +0300, Nikolay Shirokovskiy wrote: > Commit d1a7c08eb changed filter instantiation code to ignore MAC and IP > variables explicitly specified for filter binding. It just replaces > explicit values with values associated with the binding. Before the > commit virNWF

Re: [libvirt] [PATCH] xml: nodedev: make pci capability class element optional

2019-03-21 Thread Nikolay Shirokovskiy
On 21.03.2019 14:32, Erik Skultety wrote: > On Thu, Mar 21, 2019 at 10:27:14AM +0300, Nikolay Shirokovskiy wrote: >> Commit 3bd4ed46 introduced this element as required which >> breaks backcompat for test driver. Let's make the element optional. >> >> Signed-off-by: Nikolay Shirokovskiy >> ---

Re: [libvirt] [PATCH] nwfilter: fix adding std MAC and IP values to filter binding

2019-03-21 Thread Nikolay Shirokovskiy
On 21.03.2019 13:41, Daniel P. Berrangé wrote: > On Thu, Mar 21, 2019 at 10:32:07AM +0300, Nikolay Shirokovskiy wrote: >> Commit d1a7c08eb changed filter instantiation code to ignore MAC and IP >> variables explicitly specified for filter binding. It just replaces >> explicit values with values a

Re: [libvirt] [PATCH] xml: nodedev: make pci capability class element optional

2019-03-21 Thread Erik Skultety
On Thu, Mar 21, 2019 at 10:27:14AM +0300, Nikolay Shirokovskiy wrote: > Commit 3bd4ed46 introduced this element as required which > breaks backcompat for test driver. Let's make the element optional. > > Signed-off-by: Nikolay Shirokovskiy > --- > docs/formatnode.html.in

[libvirt] [PATCH 0/2] tests: qemuxml2argv updates and tweaks

2019-03-21 Thread Andrea Bolognani
Andrea Bolognani (2): tests: Update aarch64-virt-graphics for virtio-blk tests: Add s390x-ccw-graphics test case .../aarch64-virt-graphics.aarch64-latest.args | 9 ++-- .../aarch64-virt-graphics.xml | 3 +- .../s390x-ccw-graphics.s390x-latest.args | 49 +

[libvirt] [PATCH 1/2] tests: Update aarch64-virt-graphics for virtio-blk

2019-03-21 Thread Andrea Bolognani
As of commit db6c7070e25a, virt-manager will default to using virtio-blk rather than virtio-scsi for aarch64/virt guests, bringing them in line with other architectures. Update our test case to reflect this change. Signed-off-by: Andrea Bolognani --- .../aarch64-virt-graphics.aarch64-latest.args

[libvirt] [PATCH 2/2] tests: Add s390x-ccw-graphics test case

2019-03-21 Thread Andrea Bolognani
We have tests for simple guests with graphics for basically all other architectures, so it makes sense to include s390x too. Signed-off-by: Andrea Bolognani --- .../s390x-ccw-graphics.s390x-latest.args | 49 +++ tests/qemuxml2argvdata/s390x-ccw-graphics.xml | 43

Re: [libvirt] [PATCH] nwfilter: fix adding std MAC and IP values to filter binding

2019-03-21 Thread Daniel P . Berrangé
On Thu, Mar 21, 2019 at 10:32:07AM +0300, Nikolay Shirokovskiy wrote: > Commit d1a7c08eb changed filter instantiation code to ignore MAC and IP > variables explicitly specified for filter binding. It just replaces > explicit values with values associated with the binding. Before the > commit virNWF

[libvirt] [PATCH] nwfilter: fix adding std MAC and IP values to filter binding

2019-03-21 Thread Nikolay Shirokovskiy
Commit d1a7c08eb changed filter instantiation code to ignore MAC and IP variables explicitly specified for filter binding. It just replaces explicit values with values associated with the binding. Before the commit virNWFilterCreateVarsFrom was used so that explicit value take precedence. Let's bri

[libvirt] [PATCH] xml: nodedev: make pci capability class element optional

2019-03-21 Thread Nikolay Shirokovskiy
Commit 3bd4ed46 introduced this element as required which breaks backcompat for test driver. Let's make the element optional. Signed-off-by: Nikolay Shirokovskiy --- docs/formatnode.html.in| 2 +- docs/schemas/nodedev.rng | 12 ++- s