Re: [libvirt] [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-10-06 Thread Kirti Wankhede
Ping.. Pulling the questions at the top. >> Will libvirt report 'description' RO attribute, its output would be >> string, so that user could be able to see the configuration of that >> profile? >> > > Daniel, > Waiting for your input on this. > >> We can have 'class' as optional attribute. So In

[libvirt] [PATCH v2 12/12] virsh: Add _length parameters to virsh output

2016-10-06 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1349898 Add the duration parameters to the virsh input/output for blkdeviotune command and describe them in the pod file. Signed-off-by: John Ferlan --- tools/virsh-domain.c | 55 tools/virsh.pod

[libvirt] [PATCH v2 11/12] virsh: Create a macro to add IOTUNE values

2016-10-06 Thread John Ferlan
Rework the repetitive lines to add iotune values into easier to read macro Signed-off-by: John Ferlan --- tools/virsh-domain.c | 141 +-- 1 file changed, 25 insertions(+), 116 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c i

[libvirt] [PATCH v2 03/12] qemu: Move setting of conf_disk in qemuDomainSetBlockIoTune

2016-10-06 Thread John Ferlan
Since persistent_def is the only place that uses it, let's just keep it closer to where it's used. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3ce3f

[libvirt] [PATCH v2 09/12] conf: Add support for blkiotune "_length" options

2016-10-06 Thread John Ferlan
Modify _virDomainBlockIoTuneInfo and rng schema to support the _length options for bps/iops throttling values. Document the new values. Signed-off-by: John Ferlan --- docs/formatdomain.html.in | 40 - docs/schemas/domaincommon.rng | 38 ++

[libvirt] [PATCH v2 07/12] caps: Add new capability for the bps/iops throttling length

2016-10-06 Thread John Ferlan
Add the capability to detect if the qemu binary can support the feature to use bps-max-length and friends. Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c| 2 ++ src/qemu/qemu_capabilities.h| 1 + tests/qemucapabilitiesdata/caps

[libvirt] [PATCH v2 02/12] qemu: Return real error message for block_set_io_throttle

2016-10-06 Thread John Ferlan
This patch will also adjust the qemuMonitorJSONSetBlockIoThrottle error procession so that rather than returning/displaying: "error: internal error: Unexpected error" Fetch the actual error message from qemu and display that Signed-off-by: John Ferlan --- src/qemu/qemu_monitor_json.c | 14

[libvirt] [PATCH v2 08/12] qemu: Add length for bps/iops throttling parameters to driver

2016-10-06 Thread John Ferlan
Add support for a duration/length for the bps/iops and friends. Modify the API in order to add the "blkdeviotune." specific definitions for the iotune throttling duration/length options total_bytes_sec_max_length write_bytes_sec_max_length read_bytes_sec_max_length total_iops_sec_

[libvirt] [PATCH v2 04/12] qemu: Introduce qemuDomainSetBlockIoTuneSetDefaults

2016-10-06 Thread John Ferlan
Create a helper to set the bytes/iops iotune default values based on the current qemu setting Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 66 ++ 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_driver.c b/sr

[libvirt] [PATCH v2 06/12] include: Add new definitions for duration for bps/iops throttling

2016-10-06 Thread John Ferlan
Add new options to allow proving a duration/length in seconds to allow the bps/iops (and friends) to occur: total_bytes_sec_max_length write_bytes_sec_max_length read_bytes_sec_max_length total_iops_sec_max_length write_iops_sec_max_length read_iops_sec_max_length Add cont

[libvirt] [PATCH v2 10/12] qemu: Add the length options to the iotune command line

2016-10-06 Thread John Ferlan
Add in the block I/O throttling length/duration parameter to the command line if supported. If not supported, fail command creation. Add the xml2argvtest for testing. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c| 21 + .../qemuxml2argv-blkdeviot

[libvirt] [PATCH v2 05/12] qemu: Use qemuDomainsetBlockIoTuneSetDefaults for config

2016-10-06 Thread John Ferlan
Rather than repeat the lines in the persistent def, use the same helper to set config values. This also fixes a bug where config values for *_max and size_iops_sec would be set back to 0 if a config value was set. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 15 +++ 1 fil

[libvirt] [PATCH v2 01/12] qemu: Create a macro to handle setting bytes/iops iotune values

2016-10-06 Thread John Ferlan
Create a macros to hide all the comparisons for each of the fields. Add a 'continue;' for a compiler hint that we only need to find one this should be similar enough to the if - elseif - elseif logic. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 153 +++---

[libvirt] [PATCH v2 00/12] Add length (duration) params for iotune throttling

2016-10-06 Thread John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2016-September/msg01090.html Differences since v1: Patches 1-5 are new... Patch 1 is essentially the former patch 8.5 added after initial review based on a review comment. Erik Skultety and I went back and forth on this one a few times

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Eric Blake
On 10/06/2016 10:06 AM, Kashyap Chamarthy wrote: > On Thu, Oct 06, 2016 at 09:25:26AM -0500, Eric Blake wrote: >> On 10/06/2016 06:34 AM, Peter Krempa wrote: > > [...] > >>> We expose the state of the copy job in the XML and forward the READY >>> event from qemu to the users. >> >> I was not awar

Re: [libvirt] [PATCH v3 13/18] qemu: assign nec-xhci (USB3) controller to a PCIe address when appropriate

2016-10-06 Thread Andrea Bolognani
On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote: > The nec-usb-xhci device (which is a USB3 controller) has always > presented itself as a PCI device when plugged into a legacy PCI slot, > and a PCIe device when plugged into a PCIe slot, but libvirt has > always auto-assigned it to a PCI slot.

[libvirt] [PATCH] private_syms: add virLogFilterListFree to libvirt_private.syms

2016-10-06 Thread Erik Skultety
Commit 660468b1 forgot to add it, so let's add it now to prevent future linker issues. Signed-off-by: Erik Skultety --- Pushed under trivial rule src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index c4af57d..923af

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread John Snow
On 10/06/2016 10:25 AM, Eric Blake wrote: On 10/06/2016 06:34 AM, Peter Krempa wrote: Currently libvirt block APIs (& consequently higher-level applications like Nova which use these APIs) rely on polling for job completion via libvirt is _not_ polling the data. Libvirt relies on the events

Re: [libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised

2016-10-06 Thread Ian Jackson
Martin Kletzander writes ("Re: [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised"): > Well then, unfortunately you do. > > Also, looking at how the code is structured, if you have live migration > but don't have save/restore, you won't have there > at all. R

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Laine Stump
On 10/06/2016 11:20 AM, Richard W.M. Jones wrote: On Thu, Oct 06, 2016 at 10:00:39AM -0400, Laine Stump wrote: * x 4 - a set of USB2 controllers. This will turn into a single USB3 controller on a root-port after my patches. Alternately, since it seems you don't use it, you could eliminate it wi

Re: [libvirt] [PATCH v3.5 14/18] qemu: only force an available legacy-PCI slot on domains with pci-root

2016-10-06 Thread Andrea Bolognani
On Thu, 2016-10-06 at 12:04 -0400, Laine Stump wrote: > > Since now you're using info exclusively inside this block, > > you can move its declaration here as well. > > Except that patch 19/18 uses it too (it was that patch that led to me > re-doing this one and posting a v3.5) Nevermind then :)

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Andrea Bolognani
On Thu, 2016-10-06 at 11:57 -0400, Laine Stump wrote: > (BTW, isn't there something wrt aarch64 about "no pci controllers in  > config means use mmio for devices", or something like that? (Or maybe we  > were just *thinking* about that and didn't actually do it, I don't  > remember). Using the lack

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 11:57:17AM -0400, Laine Stump wrote: > On 10/06/2016 11:31 AM, Daniel P. Berrange wrote: > > On Thu, Oct 06, 2016 at 12:58:51PM +0200, Andrea Bolognani wrote: > > > On Wed, 2016-10-05 at 18:36 +0100, Richard W.M. Jones wrote: > > > > > > (b) It would be nice to turn the whol

Re: [libvirt] [PATCH v3.5 14/18] qemu: only force an available legacy-PCI slot on domains with pci-root

2016-10-06 Thread Laine Stump
On 10/06/2016 11:39 AM, Andrea Bolognani wrote: On Thu, 2016-09-29 at 10:14 -0400, Laine Stump wrote: Andrea had the right idea when he disabled the "reserve an extra unused slot" bit for aarch64/virt. For *any* PCI Express-based machine, it is pointless since 1) an extra legacy-PCI slot can't b

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Laine Stump
On 10/06/2016 11:31 AM, Daniel P. Berrange wrote: On Thu, Oct 06, 2016 at 12:58:51PM +0200, Andrea Bolognani wrote: On Wed, 2016-10-05 at 18:36 +0100, Richard W.M. Jones wrote: (b) It would be nice to turn the whole thing off for people who don't care about / need hotplugging. I had contempl

Re: [libvirt] [PATCH] virCgroupDetect: Print pid as long long

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 05:18:11PM +0200, Pavel Hrdina wrote: > On Thu, Oct 06, 2016 at 04:58:40PM +0200, Michal Privoznik wrote: > > Pids are signed, report them as such. > > > > Before: > > Detected mount/mapping 2:cpuset at /sys/fs/cgroup/cpuset in > > /machine/qemu-4-fedora.libvirt-qemu/vcpu0

Re: [libvirt] [PATCH v3.5 14/18] qemu: only force an available legacy-PCI slot on domains with pci-root

2016-10-06 Thread Andrea Bolognani
On Thu, 2016-09-29 at 10:14 -0400, Laine Stump wrote: > Andrea had the right idea when he disabled the "reserve an extra > unused slot" bit for aarch64/virt. For *any* PCI Express-based > machine, it is pointless since 1) an extra legacy-PCI slot can't be > used for hotplug, since hotplug into lega

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 12:58:51PM +0200, Andrea Bolognani wrote: > On Wed, 2016-10-05 at 18:36 +0100, Richard W.M. Jones wrote: > > > > (b) It would be nice to turn the whole thing off for people who don't > > > > care about / need hotplugging. > > >  > > > I had contemplated having an "availableP

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Richard W.M. Jones
On Thu, Oct 06, 2016 at 10:00:39AM -0400, Laine Stump wrote: > * x 4 - a set of USB2 > controllers. This will turn into a single USB3 controller on a > root-port after my patches. Alternately, since it seems you don't > use it, you could eliminate it with: Yup, this is auto-added, and a mistake.

Re: [libvirt] [PATCH] virCgroupDetect: Print pid as long long

2016-10-06 Thread Pavel Hrdina
On Thu, Oct 06, 2016 at 04:58:40PM +0200, Michal Privoznik wrote: > Pids are signed, report them as such. > > Before: > Detected mount/mapping 2:cpuset at /sys/fs/cgroup/cpuset in > /machine/qemu-4-fedora.libvirt-qemu/vcpu0 for pid 18446744073709551615 > > After: > Detected mount/mapping 2:cpuse

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
On Thu, Oct 06, 2016 at 09:25:26AM -0500, Eric Blake wrote: > On 10/06/2016 06:34 AM, Peter Krempa wrote: [...] > > We expose the state of the copy job in the XML and forward the READY > > event from qemu to the users. > > I was not aware of that when I was chatting on IRC yesterday; that's > us

[libvirt] [PATCH] virCgroupDetect: Print pid as long long

2016-10-06 Thread Michal Privoznik
Pids are signed, report them as such. Before: Detected mount/mapping 2:cpuset at /sys/fs/cgroup/cpuset in /machine/qemu-4-fedora.libvirt-qemu/vcpu0 for pid 18446744073709551615 After: Detected mount/mapping 2:cpuset at /sys/fs/cgroup/cpuset in /machine/qemu-4-fedora.libvirt-qemu/vcpu0 for pid -

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Eric Blake
On 10/06/2016 06:34 AM, Peter Krempa wrote: >> Currently libvirt block APIs (& consequently higher-level applications >> like Nova which use these APIs) rely on polling for job completion via > > libvirt is _not_ polling the data. Libvirt relies on the events from > qemu which are also exposed as

Re: [libvirt] [PATCH v3 12/18] qemu: assign e1000e network devices to PCIe slots when appropriate

2016-10-06 Thread Andrea Bolognani
On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote: > The e1000e is an emulated network device based on the Intel 82574, > present in qemu 2.7.0 and later. Among other differences from the > e1000, it presents itself as a PCIe device rather than legacy PCI. In > order to get it assigned to a PCIe

Re: [libvirt] [PATCH] qemu_process: add pid of vm in domain log

2016-10-06 Thread Michal Privoznik
On 28.09.2016 13:43, Chen Hanxiao wrote: > From: Chen Hanxiao > > Add pid of VM in domain log. > We used to show this info in debug log. > > For example: > If a process send SIGKILL to a qemu process, > we could find something in audit logs. > Then the pid of VM in domain log will be helpful. >

Re: [libvirt] [PATCH] qemu_process: add pid of vm in domain log

2016-10-06 Thread Daniel P. Berrange
On Thu, Oct 06, 2016 at 04:29:46PM +0200, Michal Privoznik wrote: > On 28.09.2016 13:43, Chen Hanxiao wrote: > > From: Chen Hanxiao > > > > Add pid of VM in domain log. > > We used to show this info in debug log. > > > > For example: > > If a process send SIGKILL to a qemu process, > > we could

Re: [libvirt] [PATCH v3 11/18] qemu: assign virtio devices to PCIe slot when appropriate

2016-10-06 Thread Laine Stump
On 10/06/2016 10:13 AM, Andrea Bolognani wrote: On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote: libvirt previously assigned nearly all devices to a "hotpluggable" legacy PCI slot even on machines with a PCIe root bus (and even though most such machines don't even support hotplug on legacy

Re: [libvirt] [PATCH v3 11/18] qemu: assign virtio devices to PCIe slot when appropriate

2016-10-06 Thread Andrea Bolognani
On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote: > libvirt previously assigned nearly all devices to a "hotpluggable" > legacy PCI slot even on machines with a PCIe root bus (and even though > most such machines don't even support hotplug on legacy PCI slots!) > Forcing all devices onto legacy

Re: [libvirt] [PATCH] m4: Drop PKG_PROG_PKG_CONFIG compatibility code

2016-10-06 Thread Michal Privoznik
On 06.10.2016 13:30, Andrea Bolognani wrote: > This was needed for RHEL 4 vintage distributions, which we > haven't supported for a long time now. > --- > m4/virt-pkgconfig-back-compat.m4 | 23 --- > 1 file changed, 23 deletions(-) > delete mode 100644 m4/virt-pkgconfig-back-c

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Laine Stump
On 10/06/2016 06:58 AM, Andrea Bolognani wrote: On Wed, 2016-10-05 at 18:36 +0100, Richard W.M. Jones wrote: (b) It would be nice to turn the whole thing off for people who don't care about / need hotplugging. I had contemplated having an "availablePCIeSlots" (or something like that) that wa

[libvirt] [PATCH v2 10/14] qemuBuildVhostuserCommandLine: Reuse qemuBuildChrChardevStr

2016-10-06 Thread Michal Privoznik
There's no need to reinvent the wheel here. We already have a function to format virDomainChrSourceDefPtr. It's called qemuBuildChrChardevStr(). Use that instead of some dummy virBufferAsprintf(). Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 16 +--- 1 file changed,

[libvirt] [PATCH v2 13/14] qemuBuildHostNetStr: Support VIR_DOMAIN_NET_TYPE_VHOSTUSER

2016-10-06 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1366505 So far, this function lacked support for VIR_DOMAIN_NET_TYPE_VHOSTUSER leaving callers to hack around the problem by constructing the command line on their own. This is not ideal as it blocks hot plug support. Signed-off-by: Michal Privoznik --

[libvirt] [PATCH v2 12/14] qemuBuildVhostuserCommandLine: Unify -netdev creation

2016-10-06 Thread Michal Privoznik
Currently, what we do for vhost-user network is generate the following part of command line: -netdev type=vhost-user,id=hostnet0,chardev=charnet0 There's no need for 'type=' it is the default. Drop it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 05/14] qemuBuildInterfaceCommandLine: Move from if-else forest to switch

2016-10-06 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5ca82ec..cc3b24f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_com

[libvirt] [PATCH v2 03/14] qemuBuildInterfaceCommandLine: Move hostdev handling a bit further

2016-10-06 Thread Michal Privoznik
The idea is to have function that does some checking of the arguments at its beginning and then have one big switch for all the interface types it supports. Each one of them generating the corresponding part of the command line. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 04/14] qemuBuildInterfaceCommandLine: Move vhostuser handling a bit further

2016-10-06 Thread Michal Privoznik
The idea is to have function that does some checking of the arguments at its beginning and then have one big switch for all the interface types it supports. Each one of them generating the corresponding part of the command line. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 07/14] qemuDomainAttachNetDevice: Explicitly list allowed types for hotplug

2016-10-06 Thread Michal Privoznik
Instead of blindly claim support for hot-plugging of every interface type out there we should copy approach we have for device types: white listing supported types and explicitly error out on unsupported ones. For instance, trying to hotplug vhostuser interface results in nothing usable from guest

[libvirt] [PATCH v2 09/14] qemuBuildChrChardevStr: Introduce @nowait argument

2016-10-06 Thread Michal Privoznik
This alone makes not much sense. But the aim is to reuse this function in qemuBuildVhostuserCommandLine() where 'nowait' is not supported for vhost-user devices. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 35 +++ 1 file changed, 19 insertions(+)

[libvirt] [PATCH v2 14/14] qemu_hotplug: Support interface type of vhost-user hotplug

2016-10-06 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1366108 There are couple of things that needs to be done in order to allow vhost-user hotplug. Firstly, vhost-user requires a chardev which is connected to vhost-user bridge and through which qemu communicates with the bridge (no acutal guest traffic is

[libvirt] [PATCH v2 11/14] qemuBuildInterfaceCommandLine: Pass proper args

2016-10-06 Thread Michal Privoznik
Instead of various NULL arguments, we can pass proper qemu driver config, log manager, and virCommand. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/q

[libvirt] [PATCH v2 06/14] qemuDomainAttachNetDevice: Move hostdev handling a bit further

2016-10-06 Thread Michal Privoznik
The idea is to have function that does some checking at its beginning and then have one big switch for all the interface types it supports. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a

[libvirt] [PATCH v2 00/14] Couple of vhost-user fixes and cleanups

2016-10-06 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2016-August/msg00806.html The first patches are mostly code movement and cleanups. diff to v1: - Hopefully all John's review suggestions are worked in now Michal Privoznik (14): virDomainNetDefParseXML: Realign virDomainNetGetActualType: Re

[libvirt] [PATCH v2 08/14] qemuBuildHostNetStr: Explicitly enumerate net types

2016-10-06 Thread Michal Privoznik
We tend to prevent using 'default' in switches. And it is for a good reason - control may end up in paths we wouldn't want for new values. In this specific case, if qemuBuildHostNetStr is called over VIR_DOMAIN_NET_TYPE_VHOSTUSER it would produce meaningless output. Fortunately, there no such call

[libvirt] [PATCH v2 01/14] virDomainNetDefParseXML: Realign

2016-10-06 Thread Michal Privoznik
There are couple of formatting issues. No functional change though. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f562323..8f04e6f 100644 --- a/src/conf/

[libvirt] [PATCH v2 02/14] virDomainNetGetActualType: Return type is virDomainNetType

2016-10-06 Thread Michal Privoznik
This function for some weird reason returns integer instead of virDomainNetType type. It is important to return the correct type so that we know what values we can expect. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_command.c | 2 +- src/bhyve/bhyve_process.c | 2 +- src/conf/domain_co

Re: [libvirt] [PATCH v3 10/18] qemu: set/use proper pciConnectFlags during hotplug

2016-10-06 Thread Andrea Bolognani
On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote: > Before now, all the qemu hotplug functions assumed that all devices to > be hotplugged were legacy PCI endpoint devices > (VIR_PCI_CONNECT_TYPE_PCI_DEVICE). This worked out "okay", because all > devices *are* legacy PCI endpoint devices on x86

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
On Thu, Oct 06, 2016 at 01:34:59PM +0200, Peter Krempa wrote: > On Thu, Oct 06, 2016 at 12:26:50 +0200, Kashyap Chamarthy wrote: [...] > > And, libvirt was fixed to use the above field in this commit (available > > in libvirt v1.2.18 or above): > > > > http://libvirt.org/git/?p=libvirt.git;a

Re: [libvirt] PCP libvirt Plugin

2016-10-06 Thread Martin Kletzander
On Wed, Oct 05, 2016 at 07:28:00PM +0300, Marko Myllynen wrote: Hi, FYI, I've written a PCP plugin (PMDA in PCP parlance) to support most hypervisor / domain information and metrics available over the libvirt Python API, it's up to date as of libvirt 2.3 (so it already supports the recently adde

Re: [libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Peter Krempa
On Thu, Oct 06, 2016 at 12:26:50 +0200, Kashyap Chamarthy wrote: > Backround > - > > For QEMU block device jobs, the "ready" boolean field (part of QMP > `query-block-jobs`) was introduced in commit ef6dbf1 (available in QEMU > v2.2.0 or above): > > http://git.qemu.org/?p=qemu.git;a=c

[libvirt] [PATCH] m4: Drop PKG_PROG_PKG_CONFIG compatibility code

2016-10-06 Thread Andrea Bolognani
This was needed for RHEL 4 vintage distributions, which we haven't supported for a long time now. --- m4/virt-pkgconfig-back-compat.m4 | 23 --- 1 file changed, 23 deletions(-) delete mode 100644 m4/virt-pkgconfig-back-compat.m4 diff --git a/m4/virt-pkgconfig-back-compat.m4 b

Re: [libvirt] Question about QEMU + hugepages + NUMA memory + migration

2016-10-06 Thread Martin Kletzander
On Thu, Oct 06, 2016 at 03:58:54PM +1100, Sam Bobroff wrote: On Tue, Oct 04, 2016 at 11:28:15AM +0200, Martin Kletzander wrote: On Tue, Oct 04, 2016 at 02:34:57PM +1100, Sam Bobroff wrote: >On Mon, Oct 03, 2016 at 04:27:25PM +0200, Martin Kletzander wrote: >>On Mon, Aug 01, 2016 at 02:01:22PM +1

Re: [libvirt] [PATCH] virt-yajl: Fix detection of yajl requirements

2016-10-06 Thread Andrea Bolognani
On Thu, 2016-10-06 at 11:32 +0200, Martin Kletzander wrote: > Running the output of qemu -help doesn't make any sense. We should be > looking for libvirt being mentioned in the output. This worked by > accident, let's make it work as expected it to. > > Signed-off-by: Martin Kletzander > --- >

Re: [libvirt] Analysis of the effect of adding PCIe root ports

2016-10-06 Thread Andrea Bolognani
On Wed, 2016-10-05 at 18:36 +0100, Richard W.M. Jones wrote: > > > (b) It would be nice to turn the whole thing off for people who don't > > > care about / need hotplugging. > >  > > I had contemplated having an "availablePCIeSlots" (or something like > > that) that was either an attribute of the c

Re: [libvirt] [PATCH v2 15/20] daemon: Split output parsing and output defining

2016-10-06 Thread John Ferlan
On 10/06/2016 06:42 AM, Erik Skultety wrote: > On 21/09/16 21:14, John Ferlan wrote: >> >> >> On 08/18/2016 07:47 AM, Erik Skultety wrote: >>> Since virLogParseAndDefineOutputs is going to be stripped from 'output >>> defining' >>> logic, replace all relevant occurrences with virLogSetOutputs ca

Re: [libvirt] [PATCH v2 17/20] virlog: Remove functions that aren't used anywhere anymore

2016-10-06 Thread Erik Skultety
On 21/09/16 21:39, John Ferlan wrote: > > > On 08/18/2016 07:47 AM, Erik Skultety wrote: >> This is mainly virLogAddOutputTo* which were replaced by virLogNewOutputTo* >> and >> the previously poorly named ones virLogParseAndDefine* functions. All of >> these >> are unnecessary now, since all t

Re: [libvirt] [PATCH v2 15/20] daemon: Split output parsing and output defining

2016-10-06 Thread Erik Skultety
On 21/09/16 21:14, John Ferlan wrote: > > > On 08/18/2016 07:47 AM, Erik Skultety wrote: >> Since virLogParseAndDefineOutputs is going to be stripped from 'output >> defining' >> logic, replace all relevant occurrences with virLogSetOutputs call to make >> the >> change transparent to all origi

Re: [libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised

2016-10-06 Thread Martin Kletzander
On Thu, Oct 06, 2016 at 10:59:06AM +0100, Ian Jackson wrote: Martin Kletzander writes ("Re: [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised"): Since offline migration (as in migrating a domain between hosts without being running) is not that used in the co

Re: [libvirt] [PATCH v2 11/20] virlog: Introduce virLogParseOutputs

2016-10-06 Thread Erik Skultety
>> + >> +VIR_DEBUG("outputs=%s", src); >> + >> +if (!(strings = virStringSplit(src, " ", 0))) > > You could use the Count version and then... > >> +goto cleanup; >> + >> +for (i = 0; strings[i]; i++) { > > ...rather than strings[i], it's < count Well, this way we spared one

[libvirt] RFC: Exposing "ready" bool (of `query-block-jobs`) or QMP BLOCK_JOB_READY event

2016-10-06 Thread Kashyap Chamarthy
Backround - For QEMU block device jobs, the "ready" boolean field (part of QMP `query-block-jobs`) was introduced in commit ef6dbf1 (available in QEMU v2.2.0 or above): http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ef6dbf1e4 -- blockjob: Add "ready" field "When a block job s

Re: [libvirt] [OSSTEST PATCH 1/2] libvirt: Check migration capabilities using proper XML parser

2016-10-06 Thread Ian Jackson
Julien Grall writes ("Re: [OSSTEST PATCH 1/2] libvirt: Check migration capabilities using proper XML parser"): > On 04/10/2016 10:05, Ian Jackson wrote: > > Missing _. I didn't test this again before sending it. I'd still > > like a review from libvirt (and Xen/ARM) folks. > > I am not sure wha

Re: [libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised

2016-10-06 Thread Ian Jackson
Martin Kletzander writes ("Re: [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised"): > Since offline migration (as in migrating a domain between hosts without > being running) is not that used in the code and talked about, I'm > guessing offline means save resto

Re: [libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised

2016-10-06 Thread Martin Kletzander
On Wed, Oct 05, 2016 at 06:06:29PM -0600, Jim Fehlig wrote: On 10/04/2016 11:02 AM, Ian Jackson wrote: Currently, osstest wrongly thinks that ARM can do save/restore, because `virsh help' does mention the save command (on all architectures). Additionally, check the virth capabilities xpath /

[libvirt] [PATCH] virt-yajl: Fix detection of yajl requirements

2016-10-06 Thread Martin Kletzander
Running the output of qemu -help doesn't make any sense. We should be looking for libvirt being mentioned in the output. This worked by accident, let's make it work as expected it to. Signed-off-by: Martin Kletzander --- m4/virt-yajl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [libvirt] [PATCH] vsh: Fix warnings in command line completer

2016-10-06 Thread Erik Skultety
On 06/10/16 09:57, Michal Privoznik wrote: > On 05.10.2016 09:26, Jiri Denemark wrote: >> GCC complained that >> >> vsh.c: In function 'vshReadlineOptionsGenerator': >> vsh.c:2622:29: warning: unused variable 'opt' [-Wunused-variable] >> const vshCmdOptDef *opt = &cmd->opts[list_index]; >>

Re: [libvirt] [PATCH v2 20/20] virlog: Split parsing and setting priority

2016-10-06 Thread Erik Skultety
On 21/09/16 22:01, John Ferlan wrote: > > > On 08/18/2016 07:47 AM, Erik Skultety wrote: >> Handling of outputs and filters has been changed in a way that splits >> parsing and defining. Do the same thing for logging priority as well, this >> however, doesn't need much of a preparation. >> --- >>

Re: [libvirt] [PATCH 3/3] qemu: report block job errors from qemu to the user

2016-10-06 Thread Nikolay Shirokovskiy
On 06.10.2016 11:01, Jiri Denemark wrote: > On Wed, Oct 05, 2016 at 16:52:10 +0300, Nikolay Shirokovskiy wrote: >> --- >> src/qemu/qemu_blockjob.c | 13 +++-- >> src/qemu/qemu_blockjob.h | 3 ++- >> src/qemu/qemu_domain.h | 1 + >> src/qemu/qemu_driver.c | 4 ++-- >

Re: [libvirt] [libvirt-glib 03/20] gconfig: Introduce GVirConfigDomainGraphicsListenAddress

2016-10-06 Thread Daniel P. Berrange
On Wed, Oct 05, 2016 at 09:37:52AM +0200, Christophe Fergeau wrote: > hey, > > On Tue, Oct 04, 2016 at 04:30:14PM +0100, Daniel P. Berrange wrote: > > > + > > > +/** > > > + * gvir_config_domain_graphics_listen_address_get_inet_address: > > > + * > > > + * Returns the #GInetAddress associated with

Re: [libvirt] [PATCH 2/3] qemu: use blockjob completed event's error field to detect errors

2016-10-06 Thread Nikolay Shirokovskiy
On 06.10.2016 11:02, Peter Krempa wrote: > On Wed, Oct 05, 2016 at 16:52:09 +0300, Nikolay Shirokovskiy wrote: >> BLOCK_JOB_COMPLETED has error field set on error from day one (12bd451f) >> thus there is no need to guess for error. Is it true that when >> len == offset then can be no error? > >

Re: [libvirt] [PATCH 2/3] qemu: use blockjob completed event's error field to detect errors

2016-10-06 Thread Peter Krempa
On Wed, Oct 05, 2016 at 16:52:09 +0300, Nikolay Shirokovskiy wrote: > BLOCK_JOB_COMPLETED has error field set on error from day one (12bd451f) > thus there is no need to guess for error. Is it true that when > len == offset then can be no error? That is the question you should be able to answer wh

Re: [libvirt] [PATCH 3/3] qemu: report block job errors from qemu to the user

2016-10-06 Thread Jiri Denemark
On Wed, Oct 05, 2016 at 16:52:10 +0300, Nikolay Shirokovskiy wrote: > --- > src/qemu/qemu_blockjob.c | 13 +++-- > src/qemu/qemu_blockjob.h | 3 ++- > src/qemu/qemu_domain.h | 1 + > src/qemu/qemu_driver.c | 4 ++-- > src/qemu/qemu_migration.c| 34 +++

Re: [libvirt] [PATCH] vsh: Fix warnings in command line completer

2016-10-06 Thread Michal Privoznik
On 05.10.2016 09:26, Jiri Denemark wrote: > GCC complained that > > vsh.c: In function 'vshReadlineOptionsGenerator': > vsh.c:2622:29: warning: unused variable 'opt' [-Wunused-variable] > const vshCmdOptDef *opt = &cmd->opts[list_index]; > ^ > vsh.c: In functi

Re: [libvirt] [[PATCH v2] 0/4] try harder to get dest qemu errors on migation

2016-10-06 Thread Nikolay Shirokovskiy
On 06.10.2016 10:29, Peter Krempa wrote: > On Thu, Oct 06, 2016 at 10:23:05 +0300, Nikolay Shirokovskiy wrote: >> >> >> On 05.10.2016 18:13, Peter Krempa wrote: >>> On Mon, Sep 12, 2016 at 17:34:39 +0300, Nikolay Shirokovskiy wrote: Hi, all. In case migration fails due to destina

Re: [libvirt] [[PATCH v2] 0/4] try harder to get dest qemu errors on migation

2016-10-06 Thread Jiri Denemark
On Thu, Oct 06, 2016 at 10:23:05 +0300, Nikolay Shirokovskiy wrote: > > > On 05.10.2016 18:13, Peter Krempa wrote: > > On Mon, Sep 12, 2016 at 17:34:39 +0300, Nikolay Shirokovskiy wrote: > >> Hi, all. > >> > >> In case migration fails due to destination qemu exits unexpectedly user > >> recevie

Re: [libvirt] [[PATCH v2] 0/4] try harder to get dest qemu errors on migation

2016-10-06 Thread Peter Krempa
On Thu, Oct 06, 2016 at 10:23:05 +0300, Nikolay Shirokovskiy wrote: > > > On 05.10.2016 18:13, Peter Krempa wrote: > > On Mon, Sep 12, 2016 at 17:34:39 +0300, Nikolay Shirokovskiy wrote: > >> Hi, all. > >> > >> In case migration fails due to destination qemu exits unexpectedly user > >> recevie

Re: [libvirt] [PATCH 1/3] qemu: simplify switch case for blockjob events

2016-10-06 Thread Nikolay Shirokovskiy
On 05.10.2016 17:36, Jiri Denemark wrote: > On Wed, Oct 05, 2016 at 16:52:08 +0300, Nikolay Shirokovskiy wrote: >> --- >> src/qemu/qemu_monitor_json.c | 6 ++ >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c >>

Re: [libvirt] [[PATCH v2] 0/4] try harder to get dest qemu errors on migation

2016-10-06 Thread Nikolay Shirokovskiy
On 05.10.2016 18:13, Peter Krempa wrote: > On Mon, Sep 12, 2016 at 17:34:39 +0300, Nikolay Shirokovskiy wrote: >> Hi, all. >> >> In case migration fails due to destination qemu exits unexpectedly user >> recevies the qemu log in the error message. Unfortunately log is truncated >> and >> the m

Re: [libvirt] [[PATCH v2] 3/4] virtlogd: add flag to wait for log end on read

2016-10-06 Thread Nikolay Shirokovskiy
On 05.10.2016 18:08, Peter Krempa wrote: > On Mon, Sep 12, 2016 at 17:34:42 +0300, Nikolay Shirokovskiy wrote: > > This is a pretty big change but you did not write anything to describe > or justify it. > >> --- >> src/logging/log_handler.c | 38 -- >> src/

Re: [libvirt] [PATCH V2 4/4] qemu: Ensure reported VCPU state is current in driver API

2016-10-06 Thread Viktor Mihajlovski
On 29.09.2016 16:35, John Ferlan wrote: [...] >> --- a/src/qemu/qemu_driver.c >> +++ b/src/qemu/qemu_driver.c >> @@ -1478,13 +1478,17 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, >> virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i); >> pid_t vcpupid = qemuDomainGetVcpu

Re: [libvirt] [PATCH 4/6] tests: qemumonitorjsontest: Do some actual testing in qemuMonitorJSONTestAttachChardev

2016-10-06 Thread Peter Krempa
On Wed, Oct 05, 2016 at 09:38:16 -0400, John Ferlan wrote: > On 09/27/2016 12:39 PM, Peter Krempa wrote: > > Until now the test was rather useless since it didn't check the > > arguments formatted and didn't use properly configured chardev objects. > > > > Add the expected arguments and instrument

Re: [libvirt] [PATCH V2 3/4] qemu: Add domain support for VCPU halted state

2016-10-06 Thread Viktor Mihajlovski
On 29.09.2016 16:34, John Ferlan wrote: [...] >> --- a/src/qemu/qemu_domain.c >> +++ b/src/qemu/qemu_domain.c >> @@ -5956,6 +5956,75 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver, >> return ret; >> } >> >> +/** >> + * qemuDomainGetVcpuHalted: >> + * @vm: domain object >> + * @vcpu: c