Re: [libvirt] [PATCH] conf: don't output managed attr for non-pci hostdevs

2019-02-27 Thread Nikolay Shirokovskiy
On 27.02.2019 20:43, John Ferlan wrote: > > > On 2/22/19 4:35 AM, Nikolay Shirokovskiy wrote: >> It is ignored on input for non pci hostdevs as written in docs. >> I guess it would be better if the attr was disabled to be specified >> in the first place instead but such behaviour is already do

Re: [libvirt] [Qemu-devel] Virtio-net control queue handling

2019-02-27 Thread Jason Wang
On 2019/2/28 上午1:39, Nikhil Agarwal wrote: Hi Stefan, Thanks for directing question to correct people, yes your understanding is correct. I want virtio-net control virtqueue to be handled by vhost-user-net device based backend for vdpa use case where control message would do some configurat

Re: [libvirt] [PATCH v4 11/20] wip: backup: Parse and output checkpoint XML

2019-02-27 Thread John Ferlan
On 2/25/19 4:06 PM, Eric Blake wrote: > On 2/12/19 11:23 AM, John Ferlan wrote: >> >> >> On 2/6/19 2:18 PM, Eric Blake wrote: >>> Work in progress - the checkpoint code is not quite passing >>> tests (part of that is figuring out the minimal XML that is >>> still valid as a element, or just use

[libvirt] Release candidate 2 of libvirt-5.1.0

2019-02-27 Thread Daniel Veillard
It's there, tagged in git and with signed tarball and rpms at the usual place: ftp://libvirt.org/libvirt/ Seems to work fin in my limited testing, I didn't hear any complaint about RC1, and incredibly https://ci.centos.org/view/libvirt/ is still all green, so this looks good so far, but pl

Re: [libvirt] [PATCH v4 08/20] backup: Introduce virDomainBackup APIs

2019-02-27 Thread John Ferlan
[...] > >>> +++ b/src/libvirt-domain-checkpoint.c >>> @@ -721,3 +721,205 @@ virDomainCheckpointFree(virDomainCheckpointPtr >>> checkpoint) >>> virObjectUnref(checkpoint); >>> return 0; >>> } >> >> Dirtying the namespace of libvirt-domain-checkpoint w/ Backup. Why not a >> separate l

Re: [libvirt] [PATCH v4 07/20] backup: Introduce virDomainCheckpoint APIs

2019-02-27 Thread John Ferlan
On 2/25/19 2:15 PM, Eric Blake wrote: > On 2/11/19 3:19 PM, John Ferlan wrote: >> >> >> On 2/6/19 2:18 PM, Eric Blake wrote: >>> Introduce a bunch of new public APIs related to backup checkpoints. >>> Checkpoints are modeled heavily after virDomainSnapshotPtr (both >>> represent a point in time

Re: [libvirt] [PATCH v4 06/20] backup: Document new XML for backups

2019-02-27 Thread John Ferlan
[...] I placed reviewing other changes higher over returning to this series to answer, agree with, provide feedback, etc. on anything that you responded to. Also, trying to avoid doing too many things at one time. So I'll just provide some extra thoughts and wait for v5. I think we're at a point

Re: [libvirt] [PATCH v1 00/15] Firmware auto selection

2019-02-27 Thread Kashyap Chamarthy
On Wed, Feb 27, 2019 at 11:04:32AM +0100, Michal Privoznik wrote: > Libvirt allows specifying firmware for domains for quite some time now. > However, problem for mgmt applications is that they do not know which > firmware to chose as all they see are their paths and from that it's > impossible to

Re: [libvirt] [PATCH] snapshot: Improve message for VIR_ERR_INVALID_DOMAIN_SNAPSHOT

2019-02-27 Thread Eric Blake
On 2/25/19 10:49 AM, Daniel P. Berrangé wrote: > On Mon, Feb 25, 2019 at 10:40:00AM -0600, Eric Blake wrote: >> For consistency with other error messages, and the fact that >> the object is always called a virDomainSnapshot rather than >> a mere virSnapshot, include the word "domain" in the error >

Re: [libvirt] [PATCH v2 5/7] snapshot: Rework virDomainSnapshotState enum

2019-02-27 Thread Eric Blake
On 2/27/19 2:04 PM, Eric Blake wrote: > The existing virDomainSnapshotState is a superset of virDomainState, > adding one more state (disk-snapshot) on top of valid domain states. > But as written, the enum cannot be used for gcc validation that all > enum values are covered in a strongly-typed swi

[libvirt] [PATCH v2 5/7] snapshot: Rework virDomainSnapshotState enum

2019-02-27 Thread Eric Blake
The existing virDomainSnapshotState is a superset of virDomainState, adding one more state (disk-snapshot) on top of valid domain states. But as written, the enum cannot be used for gcc validation that all enum values are covered in a strongly-typed switch condition, because the enum does not expli

[libvirt] [PATCH v2 6/7] qemu: Use virDomainSnapshotState for switch statements

2019-02-27 Thread Eric Blake
Clean up the previous patch which abused a switch on virDomainState when contrasted to a variable containing virDomainSnapshotState, by converting the two affected switch statements to now use the right enum. No semantic changes now (the caller to qemuDomainSnapshotValidate passes in a domain stat

[libvirt] [PATCH variant2 v2 7/7] qemu: Fix snapshot redefine vs. domain state bug

2019-02-27 Thread Eric Blake
The existing qemu snapshot code has a slight bug: if the domain is currently pmsuspended, you can't use the _REDEFINE flag even though the current domain state should have no bearing on being able to recreate metadata state; and conversely, you can use the _REDEFINE flag to create snapshot metadata

[libvirt] [PATCH v2 2/7] DO NOT MERGE: Revert "qemu: Fix snapshot redefine vs. domain state bug"

2019-02-27 Thread Eric Blake
This reverts commit a6ecf44211ec62786dc1dc6ff30f1c7ea1a18f8b. --- src/qemu/qemu_driver.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 36426cd65a..1d5b5f8653 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu

[libvirt] [PATCH variant1 v2 1/7] qemu: Fix snapshot redefine vs. domain state bug

2019-02-27 Thread Eric Blake
The existing qemu snapshot code has a slight bug: if the domain is currently pmsuspended, you can't use the _REDEFINE flag even though the current domain state should have no bearing on being able to recreate metadata state; and conversely, you can use the _REDEFINE flag to create snapshot metadata

[libvirt] [PATCH v2 4/7] qemu: Factor out qemuDomainSnapshotValidate() helper

2019-02-27 Thread Eric Blake
Straight code motion, coupled with changing goto into return -1 as needed. This change will be important to later patches adding bulk redefinition (where each snapshot in a list has to meet the same constraints), but moving it out now also makes it easier for a more immediate bug-fix related to whi

[libvirt] [PATCH v2 3/7] qemu: Refactor check for _LIVE vs. _REDEFINE

2019-02-27 Thread Eric Blake
The current qemu code rejects the combination of the two flags VIR_DOMAIN_SNAPSHOT_CREATE_LIVE in tandem with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE, but rather late in the cycle (after the snapshot was already parsed), and with a rather confusing message (complaining that live snapshots require exter

[libvirt] [PATCH v2 0/7] fix snapshot --redefine bugs (incremental backup saga)

2019-02-27 Thread Eric Blake
John pointed out that patch 2 of my original bug fix did too much in one patch. Now that we are in freeze for 5.1, I've proposed two variants of the same fix: patch 1 is the bare minimum to fix the bug and nothing else, while patches 3-7 are more in line with my v1 patch at doing other refactoring

[libvirt] [PATCH 2/2] qemu: Allow creating ppc64 guests with graphics and no USB mouse

2019-02-27 Thread Andrea Bolognani
The existing behavior for ppc64 guests is to always add a USB keyboard and mouse combo if graphics are present; unfortunately, this means any attempt to use a USB tablet will cause both pointing devices to show up in the guest, which in turn will result in poor user experience. We can't just stop

[libvirt] [PATCH 0/2] qemu: Allow creating ppc64 guests with graphics and no USB mouse

2019-02-27 Thread Andrea Bolognani
See patch 2/2. Andrea Bolognani (2): tests: Add simple guests with graphics to qemuxml2argv qemu: Allow creating ppc64 guests with graphics and no USB mouse src/qemu/qemu_domain.c| 20 +++ .../aarch64-virt-graphics.aarch64-latest.args | 59 +++ ...

[libvirt] [PATCH 1/2] tests: Add simple guests with graphics to qemuxml2argv

2019-02-27 Thread Andrea Bolognani
These are similar to the existing simple headless guests, but also include a graphical output and some input devices. Input files were generated by running $ virt-install \ --name guest --os-variant fedora29 \ --vcpus 4 --memory 4096 --disk size=5 \ --graphics vnc \ --print-xml

Re: [libvirt] [PATCH v2 11/11] qemu: Implement bulk snapshot operations

2019-02-27 Thread Eric Blake
On 2/27/19 11:27 AM, John Ferlan wrote: > > > On 2/23/19 4:24 PM, Eric Blake wrote: >> Implement the new flags for bulk snapshot dump and redefine. This >> borrows from ideas in the test driver, but is further complicated >> by the fact that qemu must write snapshot XML to disk, and thus must >>

Re: [libvirt] [Qemu-devel] [PATCH v3 00/10] dirty-bitmaps: deprecate @status field

2019-02-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190223000614.13894-1-js...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190223000614.13894-1-js...@redhat.com Subject: [Qemu-devel] [PATCH v3 00/10] dirty-bitmaps: deprecate @s

Re: [libvirt] [PATCH v2 10/11] test: Implement bulk snapshot operations

2019-02-27 Thread Eric Blake
On 2/27/19 11:03 AM, John Ferlan wrote: > > > On 2/23/19 4:24 PM, Eric Blake wrote: >> Implement the new flags for bulk snapshot dump and redefine. The >> bulk of the work is already done by the common code. >> >> Since each connection to test:///default restarts at the same >> canned state, this

Re: [libvirt] [PATCH] conf: don't output managed attr for non-pci hostdevs

2019-02-27 Thread John Ferlan
On 2/22/19 4:35 AM, Nikolay Shirokovskiy wrote: > It is ignored on input for non pci hostdevs as written in docs. > I guess it would be better if the attr was disabled to be specified > in the first place instead but such behaviour is already documented. > At least let's not output it back. This

Re: [libvirt] [PATCH v2 09/11] virsh: Expose bulk snapshot dumpxml/redefine

2019-02-27 Thread Eric Blake
On 2/27/19 10:54 AM, John Ferlan wrote: > > > On 2/23/19 4:24 PM, Eric Blake wrote: >> Add flags to the 'dumpxml' and 'snapshot-create' commands to pass >> the newly-added bulk snapshot flags through. >> >> For command-line convenience, I intentionally made --redefine-list >> imply --redefine, ev

Re: [libvirt] [PATCH v2 07/11] domain: Add VIR_DOMAIN_XML_SNAPSHOTS flag

2019-02-27 Thread Eric Blake
On 2/27/19 10:32 AM, John Ferlan wrote: >> >> Unfortunately, libvirt versions between 1.2.12 and 5.0.0 will >> silently ignore the new flag, rather than diagnosing that they >> don't support it; but at least silent lack of snapshots from >> an older server is not a security hole. >> >> Signed-off-

Re: [libvirt] [PATCH v2 05/11] domain: Expand virDomainDefFormatInternal with snapshots

2019-02-27 Thread Eric Blake
On 2/27/19 10:27 AM, John Ferlan wrote: > > > On 2/23/19 4:24 PM, Eric Blake wrote: >> Make it possible to grab all snapshot XMLs via a single API >> call, by adding a new internal flag. All callers are adjusted, >> for now passing NULL and not using the new flag. A new wrapper >> virDomainDefFo

Re: [libvirt] [PATCH v2 0/6] Alter domain_conf to make use of autofree

2019-02-27 Thread John Ferlan
ping? I also think that w/ Peter's addition of VIR_XPATH_NODE_AUTORESTORE even more changes could be done, but I'd leave those for either Peter to finish what he started or the mythical future someone else. Tks - John On 2/20/19 1:33 PM, John Ferlan wrote: > v1: https://www.redhat.com/archives/

Re: [libvirt] [PATCH v2 00/17] Add support to list Storage Driver backend capabilities

2019-02-27 Thread John Ferlan
ping^2? Yes, there are patches that indicate 5.1.0 that would need to be changed to 5.2.0 that I've already changed in my local branch. Tks, John On 2/12/19 10:27 AM, John Ferlan wrote: > v1: https://www.redhat.com/archives/libvir-list/2019-January/msg00479.html > > Changes since v1: > > * T

Re: [libvirt] [PATCH v2 11/11] qemu: Implement bulk snapshot operations

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Implement the new flags for bulk snapshot dump and redefine. This > borrows from ideas in the test driver, but is further complicated > by the fact that qemu must write snapshot XML to disk, and thus must > do additional validation after the initial parse

Re: [libvirt] [PATCH v2 10/11] test: Implement bulk snapshot operations

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Implement the new flags for bulk snapshot dump and redefine. The > bulk of the work is already done by the common code. > > Since each connection to test:///default restarts at the same > canned state, this can easily be tested with: > > $ virsh -c test:

Re: [libvirt] [PATCH v2 09/11] virsh: Expose bulk snapshot dumpxml/redefine

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Add flags to the 'dumpxml' and 'snapshot-create' commands to pass > the newly-added bulk snapshot flags through. > > For command-line convenience, I intentionally made --redefine-list > imply --redefine, even though the counterpart C flags are distinct >

Re: [libvirt] [PATCH v2 08/11] snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE_LIST flag

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Continue the work of the previous patch in making it possible > to copy the state of a transient domain with snapshots from one > host to another, by allowing the destination to perform bulk > redefines. Note that the destination still has to do separate

Re: [libvirt] [PATCH v2 07/11] domain: Add VIR_DOMAIN_XML_SNAPSHOTS flag

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Right now, copying the state of a transient domain with snapshots > from one host to another requires multiple API calls on both > machines - on the host: get the domain XML, get a list of the > snapshots, and then for each snapshot get the snapshot's XML;

[libvirt] [PATCH v2 32/36] network: add implementation of network port APIs

2019-02-27 Thread Daniel P . Berrangé
This initial implementation just wires up the APIs and does tracking of the port XML definitions. It is not yet integrated into the resource allocation logic. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 400 1 file changed, 400 inserti

[libvirt] [PATCH v2 34/36] lxc, libxl: save domain status after reconnect

2019-02-27 Thread Daniel P . Berrangé
The various steps involved in reconnecting to a domain may cause updates to the virDomainObj struct that need to be reflected in the saved status file. Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_driver.c | 3 +++ src/lxc/lxc_process.c| 5 + 2 files changed, 8 insertions(+) di

[libvirt] [PATCH v2 33/36] lxc, libxl: notify network driver of NICs during reconnect

2019-02-27 Thread Daniel P . Berrangé
When starting up it is important to notify the network driver of any NICs which are used by running guests so that it can account for any resources they are using. Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_driver.c | 30 ++ src/lxc/lxc_process.c| 30 ++

Re: [libvirt] [PATCH v2 06/11] snapshot: Add virDomainSnapshotDefParseList

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Add a new function to make it possible to parse a list of snapshots > at once. This is a counterpart to the previous patch making it > possible to produce all snapshots in a single XML string, and > intentionally parses the same top-level element with >

[libvirt] [PATCH v2 28/36] access: add permissions for network port objects

2019-02-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/access/genpolkit.pl| 2 +- src/access/viraccessdriver.h | 6 src/access/viraccessdrivernop.c| 11 src/access/viraccessdriverpolkit.c | 26 ++ src/access/viraccessdriverstack.c | 25 +

[libvirt] [PATCH v2 21/36] network: convert hook script to take a network port XML

2019-02-27 Thread Daniel P . Berrangé
When (un)plugging an interface into a network, the 'plugged' and 'unplugged' operations are invoked in the hook script. The data provided to the script contains the network XML, the domain XML and the domain interface XML. When we strictly split the drivers up this will no longer be possible and t

[libvirt] [PATCH v2 20/36] network: convert networkReleaseActualDevice to virNetworkPortDef

2019-02-27 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkReleaseActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 137 +++- 1 file

[libvirt] [PATCH v2 31/36] conf: support recording ports against virNetworkObjPtr

2019-02-27 Thread Daniel P . Berrangé
The virNetworkObjPtr state will need to maintain a record of all virNetworkPortDefPtr objects associated with the network. Record these in a hash and add APIs for manipulating them. Signed-off-by: Daniel P. Berrangé --- src/conf/virnetworkobj.c | 303 +++ src/

[libvirt] [PATCH v2 25/36] network: introduce networkReleasePort

2019-02-27 Thread Daniel P . Berrangé
Separate network port deletion code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 91 - 1 file changed, 59 insertions(+), 32 deletions(-) diff --git a/src/network/bridge_driver.c b/

[libvirt] [PATCH v2 19/36] network: convert networkNotifyActualDevice to virNetworkPortDef

2019-02-27 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkNotifyActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 91 ++--- 1 file c

[libvirt] [PATCH v2 26/36] network: introduce networkUpdatePortBandwidth

2019-02-27 Thread Daniel P . Berrangé
Separate network port bandwidth update code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 115 1 file changed, 65 insertions(+), 50 deletions(-) diff --git a/src/network/bridge_dri

[libvirt] [PATCH v2 22/36] network: remove the virDomainNetBandwidthChangeAllowed callback

2019-02-27 Thread Daniel P . Berrangé
The current qemu driver code for changing bandwidth on a NIC first asks the network driver if the change is supported, then changes the bandwidth on the VIF, and then tells the network driver to update the bandwidth on the bridge. This is potentially racing if a parallel API call causes the networ

[libvirt] [PATCH v2 13/36] conf: introduce virNetworkPortDefPtr struct and XML support

2019-02-27 Thread Daniel P . Berrangé
Introduce a virNetworkPortDefPtr struct to represent the data associated with a virtual network port. Add APIs for parsing/formatting XML docs with the data. Signed-off-by: Daniel P. Berrangé --- src/conf/Makefile.inc.am | 2 + src/conf/virnetworkportdef.c

[libvirt] [PATCH v2 35/36] conf: record a portid against the domain conf

2019-02-27 Thread Daniel P . Berrangé
The portid will be the UUID of the virNetworkPort object associated with the network interface when a guest is running. Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.html.in | 8 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf

[libvirt] [PATCH v2 27/36] network: add public APIs for network port object

2019-02-27 Thread Daniel P . Berrangé
Introduce a new virNetworPort object that will present an attachment to a virtual network from a VM. Signed-off-by: Daniel P. Berrangé --- include/libvirt/libvirt-network.h | 122 include/libvirt/virterror.h | 3 + src/datatypes.c | 60 src/datatypes.h

[libvirt] [PATCH v2 29/36] remote: add support for new network port APIs

2019-02-27 Thread Daniel P . Berrangé
Define the wire protocol for the virNetworkPort APIs and enable the client/server RPC dispatch. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 73 src/remote/remote_driver.c | 69 src/remote/remote_protocol.x| 124

[libvirt] [PATCH v2 30/36] virsh: add support for network port APIs

2019-02-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- tools/virsh-completer.c | 51 + tools/virsh-completer.h | 4 + tools/virsh-network.c | 399 +++- tools/virsh-network.h | 5 + 4 files changed, 458 insertions(+), 1 deletion(-) diff --git a/tools/virsh-complete

[libvirt] [PATCH v2 24/36] network: introduce networkNotifyPort

2019-02-27 Thread Daniel P . Berrangé
Separate network port notification code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 106 +--- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/src/network/bridge_driver.

[libvirt] [PATCH v2 23/36] network: introduce networkAllocatePort

2019-02-27 Thread Daniel P . Berrangé
Separate network port allocation code from the domain driver network callback implementation. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 143 +++- 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH v2 16/36] util: add API for copying virtual port profile data

2019-02-27 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/libvirt_private.syms | 1 + src/util/virnetdevvportprofile.c | 16 src/util/virnetdevvportprofile.h | 2 ++ 3 files changed, 19 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c63e204c61..a9

[libvirt] [PATCH v2 14/36] network: stop passing virDomainNetDefPtr into bandwidth functions

2019-02-27 Thread Daniel P . Berrangé
The networkPlugBandwidth & networkUnplugBandwidth methods currently take a virDomainNetDefPtr. To remove the dependency on the domain config struct, pass individual parameters instead. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 94 - 1

[libvirt] [PATCH v2 15/36] network: make networkLogAllocation independent of domain conf

2019-02-27 Thread Daniel P . Berrangé
Stop passing a virDomainNetDefPtr parameter to networkLogAllocation, instead just pass in the MAC address. The actual device type is also not required, since virNetworkForwardIfDefPtr has a type field that can be used instad. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 21

[libvirt] [PATCH v2 36/36] conf: switch over to use network port APIs for virt drivers

2019-02-27 Thread Daniel P . Berrangé
Change the domain conf so invoke the new network port public APIs instead of the network callbacks. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 262 src/conf/domain_conf.h | 26 src/network/bridge_driver.c | 200

[libvirt] [PATCH v2 17/36] conf: add APIs to convert virDomainNetDef to virNetworkPortDef

2019-02-27 Thread Daniel P . Berrangé
Helper APIs are needed to - Populate basic virNetworkPortDef from virDomainNetDef - Set a virDomainActualNetDef from virNetworkPortDef - Populate a full virNetworkPortDef from virDomainActualNetDef Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 272 +

[libvirt] [PATCH v2 18/36] network: convert networkAllocateActualDevice to virNetworkPortDef

2019-02-27 Thread Daniel P . Berrangé
Convert the virDomainNetDef object into a virNetworkPortDef object at the start of networkAllocateActualDevice. This largely decouples the method impl from the domain object type. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 222 +++- 1 file

[libvirt] [PATCH v2 12/36] conf: don't pass interface type into virNetDevBandwidthParse

2019-02-27 Thread Daniel P . Berrangé
The virNetDevBandwidthParse method uses the interface type to decide whether to allow use of the "floor" parameter. Using the interface type is not convenient as callers may not have that available, but still wish to allow use of "floor". Switch to an explicit boolean to control its usage. Signed-

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

2019-02-27 Thread Daniel P . Berrangé
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 network driver. Signed-off-by: Daniel P. Berrangé --

[libvirt] [PATCH v2 11/36] network: unconditionally merge port profiles

2019-02-27 Thread Daniel P . Berrangé
All but one of the network types supports port profiles. Rather than duplicating the code to merge profiles 3 times, do it once and then later report an error if used from the wrong place. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 54 +++-

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

2019-02-27 Thread Daniel P . Berrangé
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é --- src/conf/domain_conf.c | 20 +++- src/conf/dom

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

2019-02-27 Thread Daniel P . Berrangé
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(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.

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

2019-02-27 Thread Daniel P . Berrangé
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: Daniel P. Berrangé --- src/conf/domain_conf.c | 18

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

2019-02-27 Thread Daniel P . Berrangé
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. Berrangé --- src/conf/domain_conf.c | 40 +

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

2019-02-27 Thread Daniel P . Berrangé
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 | 39 ++--- 1 file changed,

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

2019-02-27 Thread Daniel P . Berrangé
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 drivers will treat both actual types in exactly the same way

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

2019-02-27 Thread Daniel P . Berrangé
The port allocation APIs are currently called unconditionally for all types of NIC, but (mostly) only do anything for NICs with type=network. The exception is the port allocate API which does some validation even for NICs with type!=network. Relying on this validation is flawed, however, since the

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

2019-02-27 Thread Daniel P . Berrangé
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: Daniel P. Berrangé --- src/libxl/libxl_conf.c| 21 +++

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

2019-02-27 Thread Daniel P . Berrangé
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/libvirt_private.syms b/src/libvirt_private.syms index 038a74498

[libvirt] [PATCH v2 00/36] network: refactor to decouple virt drivers from network driver

2019-02-27 Thread Daniel P . Berrangé
An update to v1: https://www.redhat.com/archives/libvir-list/2018-December/msg00681.html Currently the network driver registers a set of callbacks with the virt driver in order to handle allocating/releasing network ports associated with guest NICs. This series introduces a virNetworkPortPtr o

Re: [libvirt] [PATCH v2 05/11] domain: Expand virDomainDefFormatInternal with snapshots

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Make it possible to grab all snapshot XMLs via a single API > call, by adding a new internal flag. All callers are adjusted, > for now passing NULL and not using the new flag. A new wrapper > virDomainDefFormatFull() is added to make it easier for the No

Re: [libvirt] [PATCH v2 04/11] snapshot: Add virDomainSnapshotObjListFormat

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Add a new function to output all of the domain's snapshots in one > buffer. > > Signed-off-by: Eric Blake > --- > src/conf/snapshot_conf.h | 8 +++- > src/conf/snapshot_conf.c | 39 +++ > src/libvirt_private.syms

Re: [libvirt] [PATCH 3/1] virsh: Test batch mode parser improvements

2019-02-27 Thread Andrea Bolognani
On Wed, 2019-02-27 at 09:22 -0600, Eric Blake wrote: > On 2/27/19 2:53 AM, Andrea Bolognani wrote: > > On Tue, 2019-02-26 at 15:48 -0600, Eric Blake wrote: > > > I redid this into the two patches, and pushed. > > > > I don't think that was appropriate, considering that we're during > > the pre-rel

Re: [libvirt] [PATCH v2 03/11] snapshot: Refactor virDomainSnapshotDefFormat

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Split out an internal helper that produces format into a > virBuffer, similar to what domain_conf.c does, and making > the next patch easier to write. > > Signed-off-by: Eric Blake > --- > src/conf/snapshot_conf.c | 103 ++---

Re: [libvirt] [PATCH v2 02/11] snapshot: Give virDomainSnapshotDefFormat its own flags

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > virDomainSnapshotDefFormat currently takes two sets of knobs: > an 'unsigned int flags' argument that can currently just be > VIR_DOMAIN_DEF_FORMAT_SECURE, and an 'int internal' argument used as > a bool to determine whether to output an additional element

Re: [libvirt] [PATCH v2 01/11] domain: Document VIR_DOMAIN_XML_MIGRATABLE

2019-02-27 Thread John Ferlan
On 2/23/19 4:24 PM, Eric Blake wrote: > Commit 28f8dfdc (1.0.0) added a flag to virDomainGetXMLDesc, but > failed to document its effects. And considering that the > MIGRATABLE flag has been the source of past bugs (CVE-2014-7823, > fixed in commit b1674ad5 (1.2.11), or even cf2d4c60 (1.2.13) w

Re: [libvirt] [tck PATCH] Add script testing network bandwidth functionality

2019-02-27 Thread Daniel P . Berrangé
On Tue, Feb 26, 2019 at 06:44:18PM -0500, Laine Stump wrote: > On 2/26/19 1:07 PM, Daniel P. Berrangé wrote: > > Signed-off-by: Daniel P. Berrangé > > --- > > lib/Sys/Virt/TCK/DomainBuilder.pm | 10 ++ > > lib/Sys/Virt/TCK/NetworkBuilder.pm | 20 > > scripts/networks/400-guest-

Re: [libvirt] [PATCH 4/5] util: XML: Introduce automatic reset of XPath's current node

2019-02-27 Thread Eric Blake
On 2/27/19 3:27 AM, Peter Krempa wrote: >>> + * node pointer is reset to the original value when this macro was used. >>> + */ >>> +# define VIR_XPATH_NODE_AUTORESTORE(ctxt) \ >>> +VIR_AUTOCLEAN(virXPathContextNodeSave) ctxt ## CtxtSave = {(ctxt), >>> (ctxt)->node} >> >> Worth using C99 synta

Re: [libvirt] [Qemu-devel] Virtio-net control queue handling

2019-02-27 Thread Stefan Hajnoczi
On Tue, Feb 26, 2019 at 02:13:43PM +, Nikhil Agarwal wrote: > Is there any option in QEMU to offload virtio device control queue handling > to backend instead of deciphering and passing to libvirt via QMP? if not, is > there any interface in libvirt which passes on these message to applicatio

Re: [libvirt] [PATCH 3/1] virsh: Test batch mode parser improvements

2019-02-27 Thread Eric Blake
On 2/27/19 2:53 AM, Andrea Bolognani wrote: > On Tue, 2019-02-26 at 15:48 -0600, Eric Blake wrote: >> I redid this into the two patches, and pushed. > > I don't think that was appropriate, considering that we're during > the pre-release freeze and this looks like a new feature rather > than an urg

Re: [libvirt] [PATCH] util: Use VIR_AUTOUNREF for virstoragefile

2019-02-27 Thread John Ferlan
ping? I know, not for this release, but to be queued when 5.2.0 opens. Tks, John On 2/18/19 10:27 AM, John Ferlan wrote: > Let's make use of the auto __cleanup capabilities cleaning up any > now unnecessary goto paths. > > Signed-off-by: John Ferlan > --- > > BTW: I did try this with a link

[libvirt] [PATCH] conf: fix title and description for virDomainSetMetadata API

2019-02-27 Thread Pavel Hrdina
If we pass XML to virDomainDefineXML API with these two elements: ... ... libvirt correctly ignores these two elements and they will not appear in the parsed XML. However, if we use virDomainSetMetadata API and with "" as value for title or description we will end up with the p

[libvirt] [PATCH 2/2] monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove

2019-02-27 Thread Daniel P . Berrangé
The various ACL related commands are obsolete now that the QAuthZ framework for authorization is fully integrated throughout QEMU network services. These only ever worked with VNC and were never used by libvirt. Mark it as deprecated with no direct replacement to be provided. Authorization is now

[libvirt] [PATCH 1/2] vnc: allow specifying a custom authorization object name

2019-02-27 Thread Daniel P . Berrangé
From: "Daniel P. Berrange" The VNC server has historically had support for ACLs to check both the SASL username and the TLS x509 distinguished name. The VNC server was responsible for creating the initial ACL, and the client app was then responsible for populating it with rules using the HMP 'acl

[libvirt] [PATCH 0/2] ui: support for authorization control on TLS connections

2019-02-27 Thread Daniel P . Berrangé
This series provides the VNC parts of the authorization control series previously posted as: v1: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg04482.html v2: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg05727.html v3: https://lists.gnu.org/archive/html/qemu-devel/2018-

Re: [libvirt] [PATCH 05/26] cputest: Add data for Intel(R) Xeon(R) CPU E5-2650

2019-02-27 Thread Ján Tomko
On Wed, Feb 27, 2019 at 02:28:55PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86_64-cpuid-Xeon-E5-2650-disabled.xml| 5 + .../x86_64-cpuid-Xeon-E5-2650-enabled.xml | 8 + .../x86_64-cpuid-Xeon-E5-2650-guest.xm

[libvirt] [PATCH] Drop some useless comparisons and checks

2019-02-27 Thread Michal Privoznik
In these cases the check that is removed has been done a few lines above already (as can even be seen in the context). Drop them. Signed-off-by: Michal Privoznik --- examples/dommigrate/dommigrate.c | 3 +-- src/conf/nwfilter_conf.c | 4 +--- src/qemu/qemu_command.c | 3 +--

Re: [libvirt] [PATCH 04/26] cputest: Add data for Intel(R) Xeon(R) CPU E7540

2019-02-27 Thread Ján Tomko
On Wed, Feb 27, 2019 at 02:28:54PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/cputest.c |1 + .../x86_64-cpuid-Xeon-E7540-disabled.xml |5 + .../x86_64-cpuid-Xeon-E7540-enabled.xml |7 + .../x86_64-cpuid-Xeon-E7540-guest.x

Re: [libvirt] [PATCH 03/26] cputest: Add data for Intel(R) Core(TM) i7-7600U

2019-02-27 Thread Ján Tomko
On Wed, Feb 27, 2019 at 02:28:53PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86_64-cpuid-Core-i7-7600U-disabled.xml | 6 + .../x86_64-cpuid-Core-i7-7600U-enabled.xml| 8 + .../x86_64-cpuid-Core-i7-7600U-guest.x

Re: [libvirt] [PATCH 02/26] cputest: Add data for Intel(R) Xeon(R) CPU E5-2630 v4

2019-02-27 Thread Ján Tomko
On Wed, Feb 27, 2019 at 02:28:52PM +0100, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/cputest.c | 1 + .../x86_64-cpuid-Xeon-E5-2630-v4-disabled.xml | 7 + .../x86_64-cpuid-Xeon-E5-2630-v4-enabled.xml | 8 + .../x86_64-cpuid-Xeon-E5-2630-v4-guest

[libvirt] [PATCH] virstoragefile: identify GPFS as cluster FS

2019-02-27 Thread Diego Michelotto
GPFS is 'IBM General Parallel File System', also called 'IBM Spectrum Scale', stalls when a process issues a lot of fsyncs in a short timeframe. It is better if the VM I/O is not synchronous. It is racommended to use writeback caching policy. In order to permit that it is added VIR_FILE_SHFS_GPFS

Re: [libvirt] [PATCH v2 4/4] util: alloc: Note that VIR_AUTOPTR/VIR_AUTOCLEAN must not be used with vectors

2019-02-27 Thread Erik Skultety
On Tue, Feb 26, 2019 at 04:48:26PM +0100, Peter Krempa wrote: > We'd free only the first element of the vector leaking the rest. > > Signed-off-by: Peter Krempa > --- > src/util/viralloc.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/util/viralloc.h b/src/util/viralloc.h > i

Re: [libvirt] [PATCH 01/26] cputest: Make sure generated files pass syntax-check

2019-02-27 Thread Ján Tomko
On Wed, Feb 27, 2019 at 02:28:51PM +0100, Jiri Denemark wrote: The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU replies which wouldn't pass syntax-check. Let's fix this by not emitting an extra new line after reformatting the JSON file. Signed-off-by: Jiri Denemark --- test

Re: [libvirt] [PATCH 5/5] qemu: Use VIR_XPATH_NODE_AUTORESTORE when XPath context is modified

2019-02-27 Thread Ján Tomko
On Tue, Feb 26, 2019 at 06:08:12PM +0100, Peter Krempa wrote: Use the new helper when moving around the current node of the XPath context. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_domain.c | 6 ++ src/qemu/qemu_migration_cookie.c | 9 ++

Re: [libvirt] [PATCH 4/5] util: XML: Introduce automatic reset of XPath's current node

2019-02-27 Thread Ján Tomko
On Tue, Feb 26, 2019 at 06:08:11PM +0100, Peter Krempa wrote: Quite a few parts modify the XPath context current node to shif the shift scope and allow easier queries. This also means that the node needs to be restored afterwards. Introduce a macro based on 'VIR_AUTOCLEAN' which adds a local

Re: [libvirt] [glib PATCH v2 00/15] po: improve translation handling

2019-02-27 Thread Michal Privoznik
On 2/20/19 6:49 PM, Daniel P. Berrangé wrote: > ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/5] util: alloc: Clarify docs for VIR_DEFINE_AUTOCLEAN_FUNC

2019-02-27 Thread Ján Tomko
On Tue, Feb 26, 2019 at 06:08:10PM +0100, Peter Krempa wrote: Document that @func must take pointer to @type. Signed-off-by: Peter Krempa --- src/util/viralloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

  1   2   >