[libvirt] [PATCH] Host cpu offline/online removes the cpus available for vms

2014-01-31 Thread Shivaprasad G Bhat
Online/Offline operations on the host cpus removes the machine/cpuset.cpus which are never added back. The guests with vcpu pinning can fail to boot unless the xml is edited. If the possibility that the offlined cpus are onlined back, the cpuset.cpus can be updated upon start of the guest thus

[libvirt] [PATCH] virnetdevbandwidthtest: fix hard coded /sbin/tc

2014-01-31 Thread Cédric Bosdonnat
On openSuse, (and possibly other distros), tc isn't located in /sbin/tc. To get rid of that problem, use TC constant instead of hard coded /sbin/tc in the expected string --- tests/virnetdevbandwidthtest.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [libvirt] [PATCH] [RFC] libxl: add discard support to libxl_device_disk

2014-01-31 Thread Olaf Hering
On Thu, Jan 30, Daniel P. Berrange wrote: Here's two examples: Thanks, this worked for me: disk type='file' device='disk' driver name='qemu' type='raw' discard='ignore'/ source file='/disk0.raw'/ target dev='xvda' bus='xen'/ /disk disk type='file' device='disk'

Re: [libvirt] [PATCH] virnetdevbandwidthtest: fix hard coded /sbin/tc

2014-01-31 Thread Michal Privoznik
On 31.01.2014 09:52, Cédric Bosdonnat wrote: On openSuse, (and possibly other distros), tc isn't located in /sbin/tc. To get rid of that problem, use TC constant instead of hard coded /sbin/tc in the expected string --- tests/virnetdevbandwidthtest.c | 16 1 file changed, 8

Re: [libvirt] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Andreas Färber
Am 30.01.2014 22:47, schrieb Paolo Bonzini: Il 30/01/2014 20:48, Eduardo Habkost ha scritto: Is there any hope to get this into QEMU 2.0, or it is now too late? I got almost no feedback on take 6 (submitted November 27). It's not too late, not for me at least. I wanted to send the next

Re: [libvirt] [uq/master PATCH 1/7] target-i386: Eliminate CONFIG_KVM #ifdefs

2014-01-31 Thread Paolo Bonzini
Il 30/01/2014 20:48, Eduardo Habkost ha scritto: The compiler is already able to eliminate the kvm_arch_get_supported_cpuid() calls in kvm_cpu_fill_host() and filter_features_for_kvm(), so we can eliminate the CONFIG_KVM #ifdefs there. Also, kvm_cpu_fill_host() and host_cpuid() don't need to

Re: [libvirt] [uq/master PATCH 3/7] target-i386: Move KVM default-vendor hack to instance_init

2014-01-31 Thread Paolo Bonzini
Il 30/01/2014 20:48, Eduardo Habkost ha scritto: As we will not have a cpu_x86_find_by_name() function anymore, move the KVM default-vendor hack to instance_init. Unfortunately we can't move that code to class_init because it depends on KVM being initialized. Signed-off-by: Eduardo Habkost

Re: [libvirt] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Paolo Bonzini
Il 31/01/2014 12:30, Andreas Färber ha scritto: Further, I was under the impression that this series depends on Igor's feature property series, which I haven't found time to rework and haven't noticed anyone else do either. So if there's no prereqs (why uq/master?) I'll happily start reviewing

Re: [libvirt] [uq/master PATCH 2/7] target-i386: Don't change x86_def_t struct on cpu_x86_register()

2014-01-31 Thread Paolo Bonzini
Il 30/01/2014 20:48, Eduardo Habkost ha scritto: As eventually the x86_def_t data is going to be provided by the CPU class, it's better to not touch it, and handle the special cases on the X86CPU object itself. Current behavior of the code should stay exactly the same. Signed-off-by: Eduardo

Re: [libvirt] [uq/master PATCH 4/7] target-i386: Rename cpu_x86_register() to x86_cpu_load_def()

2014-01-31 Thread Paolo Bonzini
Il 30/01/2014 20:48, Eduardo Habkost ha scritto: There isn't any kind of registration involved in cpu_x86_register() anymore: it is simply looking up a CPU model name and loading the model definition data into the X86CPU object. Rename it to x86_cpu_load_def() to reflect what it does.

Re: [libvirt] [uq/master PATCH 6/7] target-i386: Rename x86_def_t to X86CPUDefinition

2014-01-31 Thread Paolo Bonzini
Il 30/01/2014 20:48, Eduardo Habkost ha scritto: As the new X86CPU subclass code is going to change lots of the code invoving x86_def_t, let's rename the struct to match coding style first. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- target-i386/cpu.c | 26 +-

[libvirt] [PATCH V3]Sheepdog: Auto Adding volume and pool refresh.

2014-01-31 Thread joel SIMOES
From: Joel joel.sim...@laposte.net Fix bug 1055479 https://bugzilla.redhat.com/show_bug.cgi?id=1055479 Libvirt lose sheepdogs volumes on pool refresh or restart. When restarting sheepdog pool, all volumes are missing. This patch add automatically all volume from the added pool. ---

Re: [libvirt] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 12:30:17PM +0100, Andreas Färber wrote: Am 30.01.2014 22:47, schrieb Paolo Bonzini: Il 30/01/2014 20:48, Eduardo Habkost ha scritto: Is there any hope to get this into QEMU 2.0, or it is now too late? I got almost no feedback on take 6 (submitted November 27).

Re: [libvirt] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 12:42:08PM +0100, Paolo Bonzini wrote: Il 31/01/2014 12:30, Andreas Färber ha scritto: Further, I was under the impression that this series depends on Igor's feature property series, which I haven't found time to rework and haven't noticed anyone else do either. So if

[libvirt] [PATCH] virnetdevbandwidthtest: Introduce some more tests

2014-01-31 Thread Michal Privoznik
And while doing this, fix one error raised by coverity. With current code, @actual_cmd is allowed to be NULL for the whole run of testVirNetDevBandwidthSet. However, if something else was expected, the @actal_cmd is passed to virtTestDifference which dereference it immediately. Signed-off-by:

[libvirt] [PATCHv2 1/2] network: only prevent forwarding of DNS requests for unqualified names

2014-01-31 Thread Laine Stump
In commit f386825 we began adding the options --domain-needed --local=/$mydomain/ to all dnsmasq commandlines with the stated reason of preventing forwarding of DNS queries for names that weren't fully qualified domain names (FQDN, i.e. a name that included some .s and a domain name). This

[libvirt] [PATCHv2 0/2] Fix problems with forwardPlainNames

2014-01-31 Thread Laine Stump
changes from V1: * Fix the test cases * more information in commit log * Add 2nd patch to make default forwardPlainNames='yes', as suggested by danpb (since that was the original behavior). Here is the thread of the original patch:

[libvirt] [PATCHv2 2/2] network: change default of forwardPlainNames to 'yes'

2014-01-31 Thread Laine Stump
The previous patch fixed forwardPlainNames so that it really is doing only what is intended, but left the default to be forwardPlainNames='no'. Discussion around the initial version of that patch led to the decision that the default should instead be forwardPlainNames='yes' (i.e. the original

Re: [libvirt] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Igor Mammedov
On Fri, 31 Jan 2014 12:30:17 +0100 Andreas Färber afaer...@suse.de wrote: Further, I was under the impression that this series depends on Igor's feature property series, which I haven't found time to rework and haven't noticed anyone else do either. So if there's no prereqs (why uq/master?)

Re: [libvirt] [v11 2/6] add unit test for hostdev common library

2014-01-31 Thread Cedric Bosdonnat
Hi ChunYan, On Fri, 2014-01-24 at 00:47 +0800, Chunyan Liu wrote: Add unit test for hostdev common library. Current tests are based on virpcimock. Signed-off-by: Chunyan Liu cy...@suse.com --- tests/Makefile.am |5 + tests/virhostdevtest.c | 473

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Igor Mammedov
On Thu, 30 Jan 2014 17:48:52 -0200 Eduardo Habkost ehabk...@redhat.com wrote: Is there any hope to get this into QEMU 2.0, or it is now too late? I got almost no feedback on take 6 (submitted November 27). This is the main blocker to allow libvirt finally implement an equivalent to the

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Paolo Bonzini
Il 31/01/2014 15:48, Igor Mammedov ha scritto: that's abusing of object-add interface and due to recent changes, object-add won't accept arbitrary objects. I hope that sooner or later device hotplug will be doable with object-add too. But yes, in the meanwhile device_add could work, and

Re: [libvirt] [PATCH v3 2/3] tests: Add test for new virkmod functions

2014-01-31 Thread John Ferlan
On 01/30/2014 12:50 PM, John Ferlan wrote: Adding tests for new virKMod{Config|Load|Unload}() API's. A test for virKModIsBlacklisted() would require some setup which cannot be assumed. Signed-off-by: John Ferlan jfer...@redhat.com --- .gitignore | 2 + ...snip... diff

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Paolo Bonzini
Il 31/01/2014 16:10, Eduardo Habkost ha scritto: I don't mind which command is used, as long as we have the same effect. I used object-add in my example because device_add rejects the CPU classes by now (because they have cannot_instantiate_with_device_add_yet=true). But now I have one

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 03:50:23PM +0100, Paolo Bonzini wrote: Il 31/01/2014 15:48, Igor Mammedov ha scritto: that's abusing of object-add interface and due to recent changes, object-add won't accept arbitrary objects. I hope that sooner or later device hotplug will be doable with

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
(CCing Luiz, in case he can give some advice about the expectations of QMP semantics stability) On Fri, Jan 31, 2014 at 03:48:53PM +0100, Igor Mammedov wrote: On Thu, 30 Jan 2014 17:48:52 -0200 Eduardo Habkost ehabk...@redhat.com wrote: Is there any hope to get this into QEMU 2.0, or it is

Re: [libvirt] [PATCH] virnetdevbandwidthtest: Introduce some more tests

2014-01-31 Thread John Ferlan
On 01/31/2014 09:12 AM, Michal Privoznik wrote: And while doing this, fix one error raised by coverity. With current code, @actual_cmd is allowed to be NULL for the whole run of testVirNetDevBandwidthSet. However, if something else was expected, the @actal_cmd is passed to virtTestDifference

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Igor Mammedov
On Fri, 31 Jan 2014 13:17:53 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Fri, Jan 31, 2014 at 03:50:23PM +0100, Paolo Bonzini wrote: Il 31/01/2014 15:48, Igor Mammedov ha scritto: that's abusing of object-add interface and due to recent changes, object-add won't accept arbitrary

[libvirt] [PATCH] qemu: minor cleanups

2014-01-31 Thread Martin Kletzander
Some cleanups around serial chardevs and miscellaneous things I've found inconsistent or not very clean. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/conf/domain_conf.c | 43 ++- src/qemu/qemu_capabilities.c | 4 ++--

[libvirt] [PATCH] spice: don't force user to specify spicevmc channel

2014-01-31 Thread Martin Kletzander
We support only one spicevmc channel name anyway and the code is prepared to use the default one, there's only one check missing. I'm not adding it to documentation in case there is another channel name aded in the future, but this helps people using virsh for defining domains with spice vdagent.

Re: [libvirt] Warnings messages in logs from DHCP snooping code

2014-01-31 Thread Anastasis Andronidis
Any news on that? is libvirt-0.10.2-29 solving this problem? Thanks -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] Host cpu offline/online removes the cpus available for vms

2014-01-31 Thread Eric Blake
On 01/31/2014 12:22 AM, Shivaprasad G Bhat wrote: Online/Offline operations on the host cpus removes the machine/cpuset.cpus which are never added back. The guests with vcpu pinning can fail to boot unless the xml is edited. If the possibility that the offlined cpus are onlined back, the

Re: [libvirt] [PATCH] virnetdevbandwidthtest: Introduce some more tests

2014-01-31 Thread Eric Blake
On 01/31/2014 07:12 AM, Michal Privoznik wrote: And while doing this, fix one error raised by coverity. With current code, @actual_cmd is allowed to be NULL for the whole run of testVirNetDevBandwidthSet. However, if something else was expected, the @actal_cmd is passed to virtTestDifference

[libvirt] [PATCH] libxl: Resove Coverity dead_error_begin

2014-01-31 Thread John Ferlan
Coverity complains about default: label not be able to be reached. It's by design for the code, so just add a Coverity tag for dead_error_begin Signed-off-by: John Ferlan jfer...@redhat.com --- src/libxl/libxl_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libxl/libxl_driver.c

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 05:06:21PM +0100, Igor Mammedov wrote: On Fri, 31 Jan 2014 13:17:53 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Fri, Jan 31, 2014 at 03:50:23PM +0100, Paolo Bonzini wrote: Il 31/01/2014 15:48, Igor Mammedov ha scritto: that's abusing of object-add

[libvirt] [PATCH v1 0/2] Network hooks

2014-01-31 Thread Michal Privoznik
With the latest noise I made on the list with QoS I'm coming forward with this idea. Network hooks can fill some holes in our functionality. For instance if somebody is willing to set a QoS that is not covered by libvirt, or just want to insert some additional iptables rules, etc. You name it.

[libvirt] [PATCH v1 1/2] networkStartNetwork: Be more verbose

2014-01-31 Thread Michal Privoznik
The lack of debug printings might be frustrating in the future. Moreover, this function doesn't follow the usual pattern we have in the rest of the code: int ret = -1; /* do some work */ ret = 0; cleanup: /* some cleanup work */ return ret; Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH] libxl: Resove Coverity dead_error_begin

2014-01-31 Thread Eric Blake
On 01/31/2014 09:35 AM, John Ferlan wrote: Coverity complains about default: label not be able to be reached. It's by design for the code, so just add a Coverity tag for dead_error_begin Signed-off-by: John Ferlan jfer...@redhat.com --- src/libxl/libxl_driver.c | 1 + 1 file changed, 1

[libvirt] [PATCH v1 2/2] network: Introduce start and shutdown hooks

2014-01-31 Thread Michal Privoznik
There might be some use cases, where user wants to prepare the host or its environment prior to starting a network and do some cleanup after the network has been shut down. Consider all the functionality that libvirt doesn't currently have as an example what a hook script can possibly do.

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Paolo Bonzini
Il 31/01/2014 17:42, Eduardo Habkost ha scritto: It looks like only -device would be able to create actual CPU models, but for -device to work we need as minimum this series and conversion of CPU features to properties in tree. Then I guess we can override

Re: [libvirt] [PATCH v5 0/6] Support keyboard device

2014-01-31 Thread Vitor Lima
Is this patch series ready to be pushed? Without it, libvirt cannot create VMs in ppc64 hosts with a working VNC console (unless you use the qemu command line pass-through hack), this affects both oVirt and VDSM, since they rely on graphical terminals to work. On Thu, Dec 19, 2013 at 5:50 AM,

Re: [libvirt] [PATCH] libxl: Resove Coverity dead_error_begin

2014-01-31 Thread John Ferlan
On 01/31/2014 11:45 AM, Eric Blake wrote: On 01/31/2014 09:35 AM, John Ferlan wrote: Coverity complains about default: label not be able to be reached. It's by design for the code, so just add a Coverity tag for dead_error_begin Signed-off-by: John Ferlan jfer...@redhat.com ---

Re: [libvirt] [Qemu-devel] [uq/master PATCH 7/7] target-i386: CPU model subclasses

2014-01-31 Thread Eduardo Habkost
On Thu, Jan 30, 2014 at 05:48:59PM -0200, Eduardo Habkost wrote: Register separate QOM classes for each x86 CPU model. This will allow management code to more easily probe what each CPU model provides, by simply creating objects using the appropriate class name, without having to restart

Re: [libvirt] [PATCH] libxl: Resove Coverity dead_error_begin

2014-01-31 Thread Eric Blake
On 01/31/2014 10:11 AM, John Ferlan wrote: +/* coverity[dead_error_begin] */ default: break; } Why not just delete the label instead; then you don't need a Coverity marker? So are you advocating for removal of the other [dead_error_begin]

[libvirt] [PATCH v2] Resolve Coverity dead_error_begin

2014-01-31 Thread John Ferlan
Coverity complains about default: label in libxl_driver.c not be able to be reached. It's by design for the code and since it's not necessary in the code nor does it elicit any compiler/make check warnings - just remove it rather than adding a coverity[dead_error_begin] tag. While I'm at it,

Re: [libvirt] [PATCH v2] Resolve Coverity dead_error_begin

2014-01-31 Thread Eric Blake
On 01/31/2014 10:59 AM, John Ferlan wrote: Coverity complains about default: label in libxl_driver.c not be able to be reached. It's by design for the code and since it's not necessary in the code nor does it elicit any compiler/make check warnings - just remove it rather than adding a

[libvirt] [uq/master PATCH 7/7 v8] target-i386: CPU model subclasses

2014-01-31 Thread Eduardo Habkost
Register separate QOM classes for each x86 CPU model. This will allow management code to more easily probe what each CPU model provides, by simply creating objects using the appropriate class name, without having to restart QEMU. This also allows us to eliminate the

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 05:52:57PM +0100, Paolo Bonzini wrote: Il 31/01/2014 17:42, Eduardo Habkost ha scritto: It looks like only -device would be able to create actual CPU models, but for -device to work we need as minimum this series and conversion of CPU features to properties in tree.

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eric Blake
On 01/31/2014 11:51 AM, Eduardo Habkost wrote: Allowing -device may be okay, since in the (very?) long term -device can be replaced by -object. But -object is definitive. OK, one additional reason to try device_add first. But then we have one additional problem: * We want to allow

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 11:56:18AM -0700, Eric Blake wrote: On 01/31/2014 11:51 AM, Eduardo Habkost wrote: Allowing -device may be okay, since in the (very?) long term -device can be replaced by -object. But -object is definitive. OK, one additional reason to try device_add first.

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Igor Mammedov
On Fri, 31 Jan 2014 11:56:18 -0700 Eric Blake ebl...@redhat.com wrote: On 01/31/2014 11:51 AM, Eduardo Habkost wrote: Allowing -device may be okay, since in the (very?) long term -device can be replaced by -object. But -object is definitive. OK, one additional reason to try

Re: [libvirt] [Qemu-devel] [uq/master PATCH 0/7] x86 CPU subclasses, take 7

2014-01-31 Thread Eduardo Habkost
On Fri, Jan 31, 2014 at 08:18:39PM +0100, Igor Mammedov wrote: On Fri, 31 Jan 2014 11:56:18 -0700 Eric Blake ebl...@redhat.com wrote: On 01/31/2014 11:51 AM, Eduardo Habkost wrote: Allowing -device may be okay, since in the (very?) long term -device can be replaced by -object. But

[libvirt] [PATCH 0/6] arbitrary qemu event detection

2014-01-31 Thread Eric Blake
Originally proposed as an RFC: https://www.redhat.com/archives/libvir-list/2013-December/msg01100.html Requires these patches to be reviewed first: https://www.redhat.com/archives/libvir-list/2014-January/msg01406.html https://www.redhat.com/archives/libvir-list/2014-January/msg01457.html Eric

[libvirt] [PATCH 1/6] qemu: new API for tracking arbitrary monitor events

2014-01-31 Thread Eric Blake
Several times in the past, qemu has implemented a new event, but libvirt has not yet caught up to reporting that event to the user applications. While it is possible to track libvirt logs to see that an unknown event was received and ignored, it would be nicer to copy what 'virsh

[libvirt] [PATCH 2/6] qemu: virsh wrapper for qemu events

2014-01-31 Thread Eric Blake
Any new API deserves a good virsh wrapper :) qemu-monitor-event [domain] [event] [--pretty] [--loop] [--timeout number] It helps that we already have an event loop running in a dedicated thread, so a blocking read() on a pipe-to-self is sufficient to handle all three means of ending the

[libvirt] [PATCH 4/6] qemu: wire up RPC for qemu monitor events

2014-01-31 Thread Eric Blake
These are the first async events in the qemu protocol, so this patch looks rather big compared to most RPC additions. However, a large majority of this patch is just mechanical copy-and-paste from recently-added network events. It didn't help that this is also the first virConnect rather than

[libvirt] [PATCH 5/6] qemu: enable monitor event reporting

2014-01-31 Thread Eric Blake
Wire up all the pieces to send arbitrary qemu events to a client using libvirt-qemu.so. If the extra bookkeeping of generating event objects even when no one is listening turns out to be noticeable, we can try to further optimize things by adding a counter for how many connections are using

[libvirt] [PATCH 3/6] qemu: create object for qemu monitor events

2014-01-31 Thread Eric Blake
Create qemu monitor events as a distinct class to normal domain events, because they will be filtered differently. For ease of review, the logic for filtering by event name is saved for a later patch. * src/conf/domain_event.c (virDomainQemuMonitorEventClass): New class.

[libvirt] [PATCH 6/6] qemu: enable monitor event filtering by name

2014-01-31 Thread Eric Blake
Filtering monitor events by name requires tracking the name for the duration of the filtering. In order to free the name, I found it easiest to just piggyback on the user's freecb function, which gets called when the event is deregistered. For events without a name filter, we have the design of

Re: [libvirt] [PATCH] Host cpu offline/online removes the cpus available for vms

2014-01-31 Thread Shivaprasad bhat
Thanks for the comments Eric. The offline, removes the entry from the cgroups and all its subcgroups. On Online, I guess kernel does not know till which sub-cgroup it should add the entry. I think that is how cgroup is designed to behave when it lacks the policy knowledge. Let me know what you