[libvirt] [PATCH go-xml] Add support for memory device element

2017-10-10 Thread zhenwei.pi
Support model, access and target. Add Marshal/Unmarshal mothed for memory device. Add test code for device list in full domain. Signed-off-by: zhenwei.pi --- domain.go | 29 + domain_test.go | 45 + 2 files changed, 74

[libvirt] [PATCH 1/3] vbox: Make autoport set RDP port range.

2017-10-10 Thread Dawid Zamirski
Originally autoport in vbox driver was setting the port to default value (3389) which caused mutiple VM instances use the same port. Since libvirt XML does not allow to set port ranges, this patch changes the "autoport" behavior to set VBox's "TCP/Ports" property to an arbitraty port range (3389-36

[libvirt] [PATCH 3/3] docs: Fix multiUser/replaceUser in RDP display doc.

2017-10-10 Thread Dawid Zamirski
The original description got it backwards. --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c0e3c2221..19a778bce 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @

[libvirt] [PATCH 2/3] vbox: Read runtime RDP port and handle autoport.

2017-10-10 Thread Dawid Zamirski
VirutalBox has a IVRDEServerInfo sturcture available that gives the effective runtime port that the VM is using when it's running. This is useful when the "TCP/Ports" VBox property was set to port range (e.g. via autoport = "yes" or via VBoxManage) in which case it would be impossible to get the "a

[libvirt] [PATCH 0/3] vbox: Update VRDE server port handling.

2017-10-10 Thread Dawid Zamirski
Hello, The following patches improve how VRDE is handled by libvirt vbox driver: * When autoport=yes, it will now set the VRDE server to a port range 3389-3689, thus when muliple VMs are started with autoport=yes, they will use non-conflicting ports from this port range - previously all VMs

[libvirt] [PATCH 2/2] network: Introduce virNetworkObjListForEachCb

2017-10-10 Thread John Ferlan
Rather than separate callbacks for the NumOfNetworks, GetNames, and Export functions, let's combine them all into one multi-purpose callback. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 153 +++ 1 file changed, 62 insertions(+), 91 deleti

[libvirt] [PATCH 0/2] Tie up some loose ends w/ network common object

2017-10-10 Thread John Ferlan
Patches speak for themselves. Use RWObjectLockable and a common callback helper to peruse the lists for NumOfNetworks, GetNames, and Export. John Ferlan (2): network: Convert virNetworkObjList to use RWObjectLockable network: Introduce virNetworkObjListForEachCb src/conf/virnetworkobj.c | 19

[libvirt] [PATCH 1/2] network: Convert virNetworkObjList to use RWObjectLockable

2017-10-10 Thread John Ferlan
Let's use the RWObjectLockable for the various list lock mgmt. Only time need Write lock will be for Add, Remove, and Prune logic. Signed-off-by: John Ferlan --- src/conf/virnetworkobj.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff

Re: [libvirt] [PATCH 0/7] x86: Rework KVM-defaults compat code, enable kvm_pv_unhalt by default

2017-10-10 Thread Eduardo Habkost
On Tue, Oct 10, 2017 at 02:07:25PM -0400, Waiman Long wrote: > On 10/10/2017 11:50 AM, Eduardo Habkost wrote: > >> Yes. Another possibility is to enable it when there is >1 NUMA node in > >> the guest. We generally don't do this kind of magic but higher layers > >> (oVirt/OpenStack) do. > > Can't

Re: [libvirt] [PATCH 0/7] x86: Rework KVM-defaults compat code, enable kvm_pv_unhalt by default

2017-10-10 Thread Waiman Long
On 10/10/2017 11:50 AM, Eduardo Habkost wrote: >> Yes. Another possibility is to enable it when there is >1 NUMA node in >> the guest. We generally don't do this kind of magic but higher layers >> (oVirt/OpenStack) do. > Can't the guest make this decision, instead of the host? By guest, do you m

Re: [libvirt] [PATCH v2] qemu: Don't crash when parsing command line lacking -M

2017-10-10 Thread John Ferlan
[...] while scanning > +} else if (STREQ(arg, "-M") || > + STREQ(arg, "-machine")) { > +// This option has already been processed before entering this > +// loop, so we just need to skip its argument and move along I saw // instead of /* ...

Re: [libvirt] [PATCH v2] qemu: Don't crash when parsing command line lacking -M

2017-10-10 Thread Daniel P. Berrange
On Tue, Oct 10, 2017 at 06:01:17PM +0200, Andrea Bolognani wrote: > Parse the -M (or -machine) command line option before starting > processing in earnest and have a fallback ready in case it's not > present, so that while parsing other options we can rely on > def->os.machine being initialized. >

[libvirt] [PATCH v2] qemu: Don't crash when parsing command line lacking -M

2017-10-10 Thread Andrea Bolognani
Parse the -M (or -machine) command line option before starting processing in earnest and have a fallback ready in case it's not present, so that while parsing other options we can rely on def->os.machine being initialized. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1379218 Signed-off-b

Re: [libvirt] [PATCH 0/7] x86: Rework KVM-defaults compat code, enable kvm_pv_unhalt by default

2017-10-10 Thread Eduardo Habkost
(CCing libvir-list) On Mon, Oct 09, 2017 at 05:47:44PM +0200, Paolo Bonzini wrote: > On 09/10/2017 17:15, Waiman Long wrote: > > On 10/09/2017 09:39 AM, Paolo Bonzini wrote: > >> On 06/10/2017 23:52, Eduardo Habkost wrote: > >>> This series enables kvm_pv_unhalt by default on pc-*-2.11 and > >>> n

Re: [libvirt] [PATCH] qemu: Avoid crashes in qemuDomainMachineIs*()

2017-10-10 Thread Daniel P. Berrange
On Tue, Oct 10, 2017 at 05:05:33PM +0200, Andrea Bolognani wrote: > On Tue, 2017-10-10 at 15:49 +0100, Daniel P. Berrange wrote: > > I think rather than trying to fix up the assumption about > > machine being non-NULL, we should restructure the ARGV > > parsing into we need a 2 pass process. > > >

Re: [libvirt] [PATCH] qemu: Avoid crashes in qemuDomainMachineIs*()

2017-10-10 Thread Andrea Bolognani
On Tue, 2017-10-10 at 15:49 +0100, Daniel P. Berrange wrote: > I think rather than trying to fix up the assumption about > machine being non-NULL, we should restructure the ARGV > parsing into we need a 2 pass process. > > In the first pass only look for the -machine arg. If no > -machine arg is g

Re: [libvirt] [PATCH] qemu: Avoid crashes in qemuDomainMachineIs*()

2017-10-10 Thread Andrea Bolognani
On Tue, 2017-10-10 at 16:10 +0100, Daniel P. Berrange wrote: > > Wouldn't it be much safer to leave the newly-added NULL checks > > in place so that the qemuDomainMachineIs*() functions are locally > > correct instead of relying on external guarantees in order not > > to crash on the user? > > Are

Re: [libvirt] [PATCH] qemu: Avoid crashes in qemuDomainMachineIs*()

2017-10-10 Thread Daniel P. Berrange
On Tue, Oct 10, 2017 at 04:21:02PM +0200, Andrea Bolognani wrote: > Make sure pointers are non-NULL before dereferencing them, and > add test suite coverage for the crashers doing so fixes. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1379218 Hmm, I don't think that is a good fix for

[libvirt] [PATCH] qemu: Avoid crashes in qemuDomainMachineIs*()

2017-10-10 Thread Andrea Bolognani
Make sure pointers are non-NULL before dereferencing them, and add test suite coverage for the crashers doing so fixes. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1379218 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 35 ...

Re: [libvirt] [PATCH] spec: Install README.md

2017-10-10 Thread Andrea Bolognani
On Tue, 2017-10-10 at 15:19 +0200, Jiri Denemark wrote: > Installing dead README symlink only is pretty useless. > > Signed-off-by: Jiri Denemark > --- > libvirt.spec.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virt

[libvirt] [PATCH 0/3] Tie up some loose ends w/ nodedev common object

2017-10-10 Thread John Ferlan
Patches speak for themselves... Convert to RWObjectLockable and then merge the various ForEach callback functions into one API and structure. John Ferlan (3): nodedev: Convert virNodeDeviceObjList to use RWObjectLockable nodedev: Convert virNodeDeviceObjHasCap to bool nodedev: Introduce virN

[libvirt] [PATCH 2/3] nodedev: Convert virNodeDeviceObjHasCap to bool

2017-10-10 Thread John Ferlan
It only returns 0 or 1 anyway, let's be realistic Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 49f4f436b8..7db8fccbc3 100644 --- a/src/conf

[libvirt] [PATCH 3/3] nodedev: Introduce virNodeDeviceObjListForEachCb

2017-10-10 Thread John Ferlan
Rather than separate functions for NumOfDevices, GetNames, and ListExport - let's converge the code into one handler. Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 191 +--- 1 file changed, 75 insertions(+), 116 deletions(-) diff --git a/sr

[libvirt] [PATCH 1/3] nodedev: Convert virNodeDeviceObjList to use RWObjectLockable

2017-10-10 Thread John Ferlan
Let's use the RWObjectLockable for the various list lock mgmt. Only time need Write lock will be for Add/Remove logic. Signed-off-by: John Ferlan --- src/conf/virnodedeviceobj.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/conf/vi

[libvirt] [PATCH] spec: Install README.md

2017-10-10 Thread Jiri Denemark
Installing dead README symlink only is pretty useless. Signed-off-by: Jiri Denemark --- libvirt.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index e053f05f1c..0e72e167a3 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1737,7

[libvirt] [PATCH 2/3] cputest: Update Xeon-E7-8890 data

2017-10-10 Thread Jiri Denemark
Without the fix in the previous patch the JSON data from QEMU would be interpreted as Haswell-noTSX because x86DataFilterTSX would filter rtm and hle features as a result of family == 6 && model == 63 && stepping < 4 test even though this CPU has stepping == 4. Signed-off-by: Jiri Denemark

[libvirt] [PATCH 3/3] cputest: Add query-cpu-definitions reply for Xeon-E7-8890

2017-10-10 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputest.c | 2 +- tests/cputestdata/x86_64-cpuid-Xeon-E7-8890.json | 286 +++ 2 files changed, 287 insertions(+), 1 deletion(-) diff --git a/tests/cputest.c b/tests/cputest.c index ff54182696..2aedc9043

[libvirt] [PATCH] nodedev: Fix missing network devices

2017-10-10 Thread John Ferlan
Commit id '8708ca01c' added a check to determine whether the NIC had Switchdev capabilities; however, in doing so inadvertently would cause network devices without a PCI device to not be added to the node device database. Thus, network devices having a "computer" as a parent, such as "net_lo*", "ne

[libvirt] [PATCH 0/3] qemu: Parse CPU stepping from query-cpu-model-expansion

2017-10-10 Thread Jiri Denemark
Even though only family and model are used for matching CPUID data with CPU models from cpu_map.xml, stepping is used by x86DataFilterTSX which is supposed to disable TSX on CPU models with broken TSX support. This series applies on top of "Fix host-model if the chosen CPU model has more features

[libvirt] [PATCH 1/3] qemu: Parse CPU stepping from query-cpu-model-expansion

2017-10-10 Thread Jiri Denemark
Even though only family and model are used for matching CPUID data with CPU models from cpu_map.xml, stepping is used by x86DataFilterTSX which is supposed to disable TSX on CPU models with broken TSX support. Thus we need to start parsing stepping from QEMU to make sure we don't disable TSX on CPU

Re: [libvirt] [libvit-jenkins-ci PATCH v2 00/16] Ansible all the things!

2017-10-10 Thread Martin Kletzander
On Fri, Oct 06, 2017 at 04:53:34PM +0200, Pavel Hrdina wrote: On Fri, Oct 06, 2017 at 02:29:44PM +0100, Daniel P. Berrange wrote: On Fri, Oct 06, 2017 at 02:48:36PM +0200, Andrea Bolognani wrote: > Changes from [v1]: > > * drop support for building projects; > * reduce redundancy by using ma

Re: [libvirt] [RFC PATCH 2/4] util: Fix deadlock across fork()

2017-10-10 Thread Daniel P. Berrange
On Mon, Oct 09, 2017 at 09:14:56PM +0200, Marc Hartmayer wrote: > This commit fixes the deadlock introduced by commit > 0980764dee687e8da86dc410c351759867163389. The call getgrouplist() of > the glibc library isn't safe to be called in between fork and > exec (see commit 75c125641ac73473ba4b0542524

Re: [libvirt] [PATCH] qemu: Floppy disks not supported on pSeries machines

2017-10-10 Thread Madhu Pavan
On 10/10/2017 02:05 PM, Ján Tomko wrote: On Sun, Oct 08, 2017 at 03:26:13PM +0530, Kothapally Madhu Pavan wrote: Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_parse_command.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse

[libvirt] [PATCH] maint: update to latest gnulib

2017-10-10 Thread Daniel P. Berrange
This pulls in the fix for getopt tests on Fedora >= 28 / glibc > 2.26.0 Signed-off-by: Daniel P. Berrange --- .gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gnulib b/.gnulib index 8d116e3f65..5e9abf8716 16 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@ -Subproject comm

Re: [libvirt] [RFC PATCH 0/4] Deadlock fix and some minor fixes

2017-10-10 Thread Daniel P. Berrange
On Mon, Oct 09, 2017 at 09:14:54PM +0200, Marc Hartmayer wrote: > The first patch is a preparatory patch for the deadlock fix (patch > 2). The cleanup path for 'virExecCommon' may now be superflous. > Patches 3-4 are only minor fixes. > > Important: there may still be a deadlock for LXC (see the

Re: [libvirt] [PATCH] qemu: Floppy disks not supported on pSeries machines

2017-10-10 Thread Ján Tomko
On Sun, Oct 08, 2017 at 03:26:13PM +0530, Kothapally Madhu Pavan wrote: Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_parse_command.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 7c409b0..d5745ce 100644 ---

Re: [libvirt] [RFC PATCH 1/4] util: Add virCommandGetGID and virCommandGetUID

2017-10-10 Thread Marc Hartmayer
On Mon, Oct 09, 2017 at 10:04 PM +0200, Cedric Bosdonnat wrote: > On Mon, 2017-10-09 at 21:14 +0200, Marc Hartmayer wrote: >> These functions are used by an upcoming commit. >> >> Signed-off-by: Marc Hartmayer >> Reviewed-by: Boris Fiuczynski >> --- >>  src/libvirt_private.syms |  2 ++ >>  src

Re: [libvirt] [PATCH] qemu: Remove redundant code in qemuParseCommandLineDisk

2017-10-10 Thread Ján Tomko
On Sun, Oct 08, 2017 at 02:54:53PM +0530, Kothapally Madhu Pavan wrote: Signed-off-by: Kothapally Madhu Pavan --- src/qemu/qemu_parse_command.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ACK and pushed. Jan signature.asc Description: Digital signature -- libvir-list mailing li