[libvirt] [PATCH v2 7/7] qemu: Enable multiqueue for macvtaps

2015-12-09 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1240439 Ta-da! Now that we know how to open a macvtap device multiple times, we can finally enable the multiqueue feature. Everything else is already prepared (e.g. command line generation) from the previous iteration where the feature was implemented fo

[libvirt] [PATCH v2 4/7] virNetDevMacVLanTapSetup: Rework to support multiple FDs

2015-12-09 Thread Michal Privoznik
For the multiqueue on macvtaps we are going to need to open the device multiple times. Currently, this is not supported. Rework the function, so that upper layers can be reworked too. Signed-off-by: Michal Privoznik --- src/util/virnetdevmacvlan.c | 66 ---

[libvirt] [PATCH v2 1/7] virNetDevMacVLanCreateWithVPortProfile: Turn vnet_hdr into flag

2015-12-09 Thread Michal Privoznik
So yet again one of integer arguments that we use as a boolean. Since the argument count of the function is unbearably long enough, lets turn those booleans into flags. Signed-off-by: Michal Privoznik --- src/lxc/lxc_process.c | 2 +- src/qemu/qemu_command.c | 5 ++--- src/util/virnetd

[libvirt] [PATCH v2 3/7] virNetDevMacVLanTapOpen: Rework to support multiple FDs

2015-12-09 Thread Michal Privoznik
For the multiqueue on macvtaps we are going to need to open the device multiple times. Currently, this is not supported. Rework the function, so that upper layers can be reworked too. Signed-off-by: Michal Privoznik --- src/util/virnetdevmacvlan.c | 57 ---

[libvirt] [PATCH v2 0/7] Add multiqueue support for macvtaps

2015-12-09 Thread Michal Privoznik
Patches 1, 2, 3, 6, 7 have been ACKed in previous round. However, I did slightly change them to reflect Laine's review suggestions. Patch 4 has not been ACKed yet, patch 5 is new. Michal Privoznik (7): virNetDevMacVLanCreateWithVPortProfile: Turn vnet_hdr into flag virNetDevMacVLanTapOpen: Sli

[libvirt] [PATCH v2 2/7] virNetDevMacVLanTapOpen: Slightly rework

2015-12-09 Thread Michal Privoznik
There are few outdated things. Firstly, we don't need to undergo the torture of fopen, fscanf and fclose just to get the interface index when we have nice wrapper over that: virNetDevGetIndex. Secondly, we don't need to have statically allocated buffer for the path we are opening. Signed-off-by: M

Re: [libvirt] [PATCH 0/6] Add build options to pool create[-as] and start

2015-12-09 Thread John Ferlan
ping? tks John On 11/25/2015 02:11 PM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=830056 > > Add the capability to build the pool during pool creation or startup > > NOTE: If patches 2-4 regarding usage of #define for repeated command > options are acceptible, I can start

Re: [libvirt] [PATCHv2 3/4] qemu: Implement share memory device hot-plug

2015-12-09 Thread John Ferlan
[...] > +int > +qemuDomainAttachShmemDevice(virQEMUDriverPtr driver, > +virDomainObjPtr vm, > +virDomainShmemDefPtr shmem) > +{ > +int ret = -1; > +qemuDomainObjPrivatePtr priv = vm->privateData; > +char *devstr = NULL; > +ch

Re: [libvirt] [PATCHv2 3/4] qemu: Implement share memory device hot-plug

2015-12-09 Thread John Ferlan
$SUBJ s/share/shared On 11/26/2015 04:06 AM, Luyao Huang wrote: > Signed-off-by: Luyao Huang > --- > src/qemu/qemu_driver.c | 10 - > src/qemu/qemu_hotplug.c | 58 > + > src/qemu/qemu_hotplug.h | 3 +++ > 3 files changed, 70 insertions

Re: [libvirt] [PATCHv2 2/4] qemu: Implement shared memory device cold (un)plug

2015-12-09 Thread John Ferlan
On 11/26/2015 04:06 AM, Luyao Huang wrote: > Add support for using the attach/detach device APIs on the inactive > configuration to add/del shared memory devices. > > Signed-off-by: Luyao Huang > --- > src/libvirt_private.syms | 1 + > src/qemu/qemu_driver.c | 21 +++-- > 2

Re: [libvirt] [PATCHv2 1/4] conf: Add helpers to insert/remove/find shmem devices in domain def

2015-12-09 Thread John Ferlan
On 11/26/2015 04:06 AM, Luyao Huang wrote: > The helpers will be useful when implementing hotplug and coldplug of > shared memory devices. > > Signed-off-by: Luyao Huang > --- > src/conf/domain_conf.c | 66 > > src/conf/domain_conf.h | 7 +

Re: [libvirt] [PATCH 6/6] qemu: Replace Mlock with MemLock in function names

2015-12-09 Thread John Ferlan
On 11/24/2015 08:56 AM, Andrea Bolognani wrote: > MemLock is already used in other modules and, while still an > abbreviation, is not ambiguous. > --- > src/qemu/qemu_command.c | 4 ++-- > src/qemu/qemu_domain.c | 10 +- > src/qemu/qemu_domain.h | 4 ++-- > 3 files changed, 9 inserti

Re: [libvirt] [PATCH 5/6] qemu: Reduce memlock limit after detaching hostdev

2015-12-09 Thread John Ferlan
On 11/24/2015 08:56 AM, Andrea Bolognani wrote: > We increase the limit before plugging in a PCI hostdev or a memory > module because some memory might need to be locked due to eg. VFIO. > > Of course we should do the opposite after unplugging a device: this > was already the case for memory mod

Re: [libvirt] [PATCH 3/6] qemu: Add qemuDomainAdjustMaxMemLock()

2015-12-09 Thread John Ferlan
On 11/24/2015 08:56 AM, Andrea Bolognani wrote: > This function detects whether a domain needs RLIMIT_MEMLOCK > to be set, and if so, uses an appropriate value. > > It also stores the original value inside the virDomainObj for > the domain so that it can be later restored. > --- > src/conf/doma

[libvirt] [PATCH 1/3] qemu_hotplug: remove qemuDomainAttachDeviceControllerLive

2015-12-09 Thread Ján Tomko
This function calls qemuDomainAttachControllerDevice for SCSI controllers and reports an error for all other controllers. Move the error inside qemuDomainAttachControllerDevice and delete this wrapper. --- src/qemu/qemu_driver.c | 23 +-- src/qemu/qemu_hotplug.c | 7 +++

[libvirt] [PATCH 0/3] qemu_hotplug: dead code removal

2015-12-09 Thread Ján Tomko
Originally posted as a part of https://www.redhat.com/archives/libvir-list/2015-August/msg00521.html Ján Tomko (3): qemu_hotplug: remove qemuDomainAttachDeviceControllerLive Remove dead code from qemuDomainAttachControllerDevice mark virDomainVirtioSerialAddrSetAddController as static. sr

Re: [libvirt] [PATCH 1/6] process: Allow virProcessPrLimit() to get current limit

2015-12-09 Thread John Ferlan
On 11/24/2015 08:56 AM, Andrea Bolognani wrote: > The prlimit() function allows both getting and setting limits for > a process; expose the same functionality in our wrapper. > > Add the const modifier for new_limit, in accordance with the > prototype for prlimit(). Since the current way hasn't

Re: [libvirt] [PATCH 2/6] process: Add virProcessGetMaxMemLock()

2015-12-09 Thread John Ferlan
On 11/24/2015 08:56 AM, Andrea Bolognani wrote: > This function can be used to retrieve the current locked memory > limit for a process, so that the setting can be later restored. > > Add a configure check for getrlimit(), which we now use. > --- > configure.ac | 2 +- > src/libvir

[libvirt] [PATCH 3/3] mark virDomainVirtioSerialAddrSetAddController as static.

2015-12-09 Thread Ján Tomko
This function is no longer used outside domain_addr.c --- src/conf/domain_addr.c | 2 +- src/conf/domain_addr.h | 4 src/libvirt_private.syms | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index c7eab0c..9883c4f 100644

[libvirt] [PATCHv2 2/3] qemu: do not put a task into machine cgroup

2015-12-09 Thread Henning Schild
The machine cgroup is a superset, a parent to the emulator and vcpuX cgroups. The parent cgroup should never have any tasks directly in it. In fact the parent cpuset might contain way more cpus than the sum of emulatorpin and vcpupins. So putting tasks in the superset will allow them to run outside

Re: [libvirt] [PATCH 5/5] qemu: auto-add a USB2 controller set for Q35 machines

2015-12-09 Thread John Ferlan
On 11/19/2015 01:25 PM, Laine Stump wrote: > Use virDomainDefAddUSBController() to add an EHCI1+UHCI1+UHCI2+UHCI3 > controller set to newly defined Q35 domains that don't have any USB > controllers defined. > --- > src/qemu/qemu_domain.c | 14 +++--- > tests/qemuxml

Re: [libvirt] [PATCH 1/3] util: cgroups do not implicitly add task to new machine cgroup

2015-12-09 Thread Henning Schild
On Tue, 8 Dec 2015 12:23:14 -0500 John Ferlan wrote: > > > On 11/13/2015 11:56 AM, Henning Schild wrote: > > virCgroupNewMachine used to add the pidleader to the newly created > > machine cgroup. Do not do this implicit anymore. > > > > Signed-off-by: Henning Schild > > --- > > src/lxc/lxc_c

Re: [libvirt] [PATCH 3/5] conf: add virDomainDefAddController()

2015-12-09 Thread John Ferlan
On 11/19/2015 01:25 PM, Laine Stump wrote: > We need a virDomainDefAddController() that doesn't check for an > existing controller at the same index (since USB2 controllers must be > added in sets of 4 that are all at the same index), so rather than > duplicating the code in virDomainDefMaybeAddC

[libvirt] [PATCHv2 2/3] security_selinux: remove extra Security from function names

2015-12-09 Thread Ján Tomko
Many of the functions follow the pattern: virSecurity.*Security.*Label Remove the second 'Security' from the names, it should be obvious that the virSecurity* functions deal with security labels even without it. --- src/security/security_selinux.c | 375 1

[libvirt] [PATCHv2 3/3] security_stack: : remove extra security from function names

2015-12-09 Thread Ján Tomko
Many of the functions follow the pattern: virSecurity.*Security.*Label Remove the second 'Security' from the names, it should be obvious that the virSecurity* functions deal with security labels even without it. --- src/security/security_stack.c | 68 +-- 1

[libvirt] [PATCHv2 1/3] security_dac: remove extra Security from function names

2015-12-09 Thread Ján Tomko
Many of the functions follow the pattern: virSecurity.*Security.*Label Remove the second 'Security' from the names, it should be obvious that the virSecurity* functions deal with security labels even without it. --- src/security/security_dac.c | 242 ++-- 1

Re: [libvirt] [PATCH v2 7/8] virsh: implement new command to support perf

2015-12-09 Thread Daniel P. Berrange
On Wed, Dec 09, 2015 at 01:28:22PM +, Ren, Qiaowei wrote: > > > > -Original Message- > > From: Daniel P. Berrange [mailto:berra...@redhat.com] > > Sent: Tuesday, December 8, 2015 7:07 PM > > To: Ren, Qiaowei > > Cc: libvir-list@redhat.com; Jiri Denemark > > Subject: Re: [PATCH v2 7/8]

Re: [libvirt] FD passing for chardevs and chardev backend multiplexing

2015-12-09 Thread Paolo Bonzini
On 09/12/2015 12:19, Daniel P. Berrange wrote: > > > Now in practice this doesn't work, because qmp_chardev_open_file() > > > passes the O_CREAT|O_TRUNC flags in, which means the qemu_open() > > > call will fail when using the pipe FD pased in via fdsets. > > > > Is it just the O_TRUNC that is f

Re: [libvirt] volume download/upload but for snapshots

2015-12-09 Thread Vasiliy Tolstov
2015-12-02 12:50 GMT+03:00 Vasiliy Tolstov : > Hi! I'm happy with libvirt volume download/upload ability, but also i > need to download snapshot, what is the best way to do that? > Define volume from snapshot? Or write libvirt function for this? Anybody can help? I think that stadard interface fo

Re: [libvirt] [PATCH 1/5] qemu: don't assume slot 0 is unused/reserved.

2015-12-09 Thread John Ferlan
On 11/19/2015 01:24 PM, Laine Stump wrote: > When qemuAssignDevicePCISlots() is looking for companion controllers > for a USB controller that has no PCI address specified, it initializes > a virDevicePCIAddress to :00:00.0, fills it in with the > companion's address if one is found, then chec

Re: [libvirt] [PATCH v2 00/27] Prepare for specific vcpu hot(un)plug - part 1

2015-12-09 Thread Peter Krempa
On Fri, Nov 27, 2015 at 17:12:44 +0100, Peter Krempa wrote: > This series is getting rather big. The target is to refactor the way libvirt > stores info about vCPUs into a single structure (okay, two structures for the > qemu driver. Part 1 is not yet completely there, well, not even halfway. > >

Re: [libvirt] Handling large amount of VF's with intelligent passthrough

2015-12-09 Thread Jan Gutter
On Wed, Dec 9, 2015 at 11:09 AM, Jan Gutter wrote: > On Wed, Dec 9, 2015 at 11:05 AM, Jan Gutter wrote: >> On Tue, Dec 8, 2015 at 9:52 PM, Laine Stump wrote: >>> What version of libvirt and libnl are you using? I thought that we had >>> solved this problem, either in libvirt or in libnl at least

Re: [libvirt] How should libvirt apps enable virtio-pci for aarch64?

2015-12-09 Thread Pavel Fedin
Hello! > > I don't remember the exact outcome. So, i decided to use addPCIeRoot > > instead, and > everything just worked. > > Except the extra stuff. The origin of the problem was in my overloading > "addPCIeRoot" to indicate that the other two controllers should also be > added. You only ma

Re: [libvirt] [PATCH v2] guest-agent-socket: don't generate default path to config XML

2015-12-09 Thread Martin Kletzander
On Mon, Nov 30, 2015 at 12:37:58PM +0100, Pavel Hrdina wrote: While we started using for all unix sockets as default one common directory based on a guest name it introduced several issues, for example with renaming the guest or cloning it. In general it's not entirely bad, but in this case it w

Re: [libvirt] [PATCH 6/7] device: cleanup input device code

2015-12-09 Thread Pavel Hrdina
On Wed, Dec 09, 2015 at 09:37:53AM +, Daniel P. Berrange wrote: > On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote: > > On 12/07/2015 06:49 PM, Pavel Hrdina wrote: > > >On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: > > >>On 12/04/2015 02:30 PM, Pavel Hrdina wrote: > >

[libvirt] Release of libvirt-1.3.0

2015-12-09 Thread Daniel Veillard
So as planned, I tagged the release in git and pushed signed tarball and rpms to the usual place: ftp://libvirt.org/libvirt I also pushed the associated python release for 1.3.0 though there was no actual code change except numbering: ftp://libvirt.org/libvirt/python The bump in version

Re: [libvirt] [PATCH 6/7] device: cleanup input device code

2015-12-09 Thread Daniel P. Berrange
On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote: > On 12/07/2015 06:49 PM, Pavel Hrdina wrote: > >On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: > >>On 12/04/2015 02:30 PM, Pavel Hrdina wrote: > >>>The current code was a little bit odd. > >>Understatement of the Week :-) (

Re: [libvirt] [PATCH 6/7] device: cleanup input device code

2015-12-09 Thread Pavel Hrdina
On Tue, Dec 08, 2015 at 03:02:13PM -0500, Laine Stump wrote: > On 12/07/2015 06:49 PM, Pavel Hrdina wrote: > > On Mon, Dec 07, 2015 at 12:36:46PM -0500, Laine Stump wrote: > >> On 12/04/2015 02:30 PM, Pavel Hrdina wrote: > >>> The current code was a little bit odd. > >> Understatement of the Week :

Re: [libvirt] Handling large amount of VF's with intelligent passthrough

2015-12-09 Thread Jan Gutter
On Wed, Dec 9, 2015 at 11:05 AM, Jan Gutter wrote: > On Tue, Dec 8, 2015 at 9:52 PM, Laine Stump wrote: >> What version of libvirt and libnl are you using? I thought that we had >> solved this problem, either in libvirt or in libnl at least a couple years >> ago. Did something not get pushed some

Re: [libvirt] Handling large amount of VF's with intelligent passthrough

2015-12-09 Thread Jan Gutter
On Tue, Dec 8, 2015 at 9:52 PM, Laine Stump wrote: > What version of libvirt and libnl are you using? I thought that we had > solved this problem, either in libvirt or in libnl at least a couple years > ago. Did something not get pushed somewhere? (now I need to go spelunking in > bugzilla again :

[libvirt] [PATCH 1/2] Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT event

2015-12-09 Thread Dmitry Andreev
This should be emitted whenever a domain is reverted to snapshot. --- examples/object-events/event-test.c | 2 ++ include/libvirt/libvirt-domain.h| 1 + tools/virsh-domain.c| 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/object-events/event-test.

[libvirt] [PATCH 2/2] qemu: emit 'defined' event after reverted to snapshot

2015-12-09 Thread Dmitry Andreev
Config file is changed. VIR_DOMAIN_EVENT_DEFINED should be emitted --- src/qemu/qemu_driver.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ae1d8e7..b32172a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15293,6

[libvirt] [PATCH 0/2] notify about reverting to snapshot

2015-12-09 Thread Dmitry Andreev
Reverting to snapshot may change domain configuration but there will be no events about that. Lack of the event become a problem for virt-manager https://bugzilla.redhat.com/show_bug.cgi?id=1081148 This patch-set introduces new event and emits it in qemuDomainRevertToSnapshot. Dmitry Andreev (2