Re: [libvirt] [PATCH v2] qemu: Remove explicit values from virQEMUCapsFlags

2015-10-07 Thread Andrea Bolognani
gt; > */ > > +QEMU_CAPS_KVM, /* Whether KVM is enabled by default */ > > +QEMU_CAPS_DRIVE_FORMAT, /* Is -drive format= avail */ > > ... > > That is, group them by 5 and separate the groups with empty lines so > that > the list looks like the corresponding definition in > qemu_c

[libvirt] [PATCH v2] qemu: Remove explicit values from virQEMUCapsFlags

2015-10-07 Thread Andrea Bolognani
This gets rid of the partially enforced alignment and makes it less likely for a bogus value to be introduced in the enumeration. Use #define for QEMU_CAPS_NET_NAME and QEMU_CAPS_HOST_NET_ADD, both of which are aliases for QEMU_CAPS_0_10. --- First attempt was [libvirt] [PATCH] qemu: Align

[libvirt] [PATCH] AUTHORS: Add myself to the list of committers

2015-10-08 Thread Andrea Bolognani
The primary maintainers and people with commit access rights: Alex Jia <a...@redhat.com> +Andrea Bolognani <abolo...@redhat.com> Cédric Bosdonnat <cbosdon...@suse.com> Christophe Fergeau <cferg...@redhat.com> Claudio Bley <claudio.b...@gmail.com> -- 2.4.3 -- libvir-list

Re: [libvirt] [PATCH] src: Generate virkeymaps.h into the correct directory

2015-10-08 Thread Andrea Bolognani
? Definitely. I've just sent a patch that tries to fix the same issue with a different approach, please check it out. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] src: Include $(builddir)/util in the header search path

2015-10-08 Thread Andrea Bolognani
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file. make[2]: Entering directory

Re: [libvirt] [PATCH 0/3] NEWS: Split releases by year

2015-10-16 Thread Andrea Bolognani
On Fri, 2015-10-16 at 09:47 +0200, Martin Kletzander wrote: > On Thu, Oct 15, 2015 at 04:12:07PM +0200, Andrea Bolognani wrote: > > As agreed, I've followed up with the cleanups by splitting > > the huge news.html.in file into separate, smaller files, > > one per

[libvirt] [PATCH 2/4] qemu: hostdev: Unify naming for qemuDomainReAttachHost*Devices()

2015-10-20 Thread Andrea Bolognani
No functional changes. --- src/qemu/qemu_hostdev.c | 4 ++-- src/qemu/qemu_hostdev.h | 2 +- src/qemu/qemu_hotplug.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index a4409d6..ec708c8 100644 ---

[libvirt] [PATCH 0/4] qemu: hostdev: Unify naming

2015-10-20 Thread Andrea Bolognani
I was working on the QEMU hostdev code and the inconsistent naming used kept making things just that little harder for me to follow, so I unified it. Cheers. Andrea Bolognani (4): qemu: hostdev: Unify naming for qemuPrepareHost*Devices() qemu: hostdev: Unify naming

[libvirt] [PATCH 4/4] qemu: hostdev: Introduce qemuUpdateActiveHostDevices()

2015-10-20 Thread Andrea Bolognani
This calls the PCI-, USB- and SCSI-specific functions just like qemuPrepareHostDevices() and qemuDomainReAttachHostDevices() already do. Update qemuProcessReconnect() to use the new function. --- src/qemu/qemu_hostdev.c | 18 ++ src/qemu/qemu_hostdev.h | 2 ++

[libvirt] [PATCH 1/4] qemu: hostdev: Unify naming for qemuPrepareHost*Devices()

2015-10-20 Thread Andrea Bolognani
No functional changes. --- src/qemu/qemu_hostdev.c | 40 src/qemu/qemu_hostdev.h | 22 +++--- src/qemu/qemu_hotplug.c | 9 - 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH 3/4] qemu: hostdev: Unify naming for qemuUpdateActiveHost*Devices()

2015-10-20 Thread Andrea Bolognani
No functional changes. --- src/qemu/qemu_hostdev.c | 12 ++-- src/qemu/qemu_hostdev.h | 12 ++-- src/qemu/qemu_process.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index ec708c8..d395271 100644

Re: [libvirt] [PATCH 0/3] NEWS: Split releases by year

2015-10-20 Thread Andrea Bolognani
le missing them. > > > > Thanks for spotting that, I will include your fix. > > > > Then ACK with that fix then. Pushed, thanks :) -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] virsh: fix no error when pass a count <= 0 to setvcpus

2015-10-21 Thread Andrea Bolognani
ing of negative values, but make the error message when count == 0 more specific as Peter suggested. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Align virQEMUCapsFlags members

2015-10-07 Thread Andrea Bolognani
e symbolic names leading to it. I think > the simplest solution of this mess is just > > #define QEMU_CAPS_NET_NAME QEMU_CAPS_0_10 > #define QEMU_CAPS_HOST_NET_ADD QEMU_CAPS_0_10 > > and only keep QEMU_CAPS_0_10 in the enum. I did just that and sent a v2 to the list

Re: [libvirt] [PATCH v2] qemu: Remove explicit values from virQEMUCapsFlags

2015-10-07 Thread Andrea Bolognani
e minutes too late, that the #define statements were incorrectly indented and were breaking syntax-check. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] qemu: Fix indentation issue

2015-10-07 Thread Andrea Bolognani
Two #define lines introduced by b527aa0 did not respect the indentation rules, thus breaking syntax-check. --- Pushed as trivial. src/qemu/qemu_capabilities.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index

Re: [libvirt] [PATCH 2/2] tests: Add script to copy nodeinfo test data from host

2015-10-07 Thread Andrea Bolognani
ood point. I've changed the script to just copy the data we're interested in instead of copying everything and cleaning it up afterwards, and would you believe it? It's not only easier to understand and more robust, but also quite a bit shorter :) I'll send a v2 right away. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 2/2] tests: Add script to copy nodeinfo test data from host

2015-10-07 Thread Andrea Bolognani
should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see +# <http://www.gnu.org/licenses/>. +# +# Author: Andrea Bolognani <abolo...@redhat.com> + +SYSFS_PATH="/sys/devices/system" +NODE_TOPLEVEL_COPY="online possible&quo

[libvirt] [PATCH v2 1/2] tests: Add script to display nodeinfo test data

2015-10-07 Thread Andrea Bolognani
. If not, see +# <http://www.gnu.org/licenses/>. +# +# Author: Andrea Bolognani <abolo...@redhat.com> + +die() { +local message=$1 + +echo "$message" >&2 + +exit 1 +} + +list_cpus() { +local datadir=$1 + +local index + +ls -d "$datadi

[libvirt] [PATCH] tests: Remove unused nodeinfo test data

2015-10-07 Thread Andrea Bolognani
A bunch of files that we don't currently parse, and are very unlikely to ever start parsing, made their way into the nodeinfo test data. Get rid of them. --- tests/nodeinfodata/linux-f21-mustang/cpu/modalias| 1 - tests/nodeinfodata/linux-raspberrypi/cpu/cpuidle/current_driver

[libvirt] [PATCH v2 0/2] tests: Add nodeinfo test data utility scripts

2015-10-07 Thread Andrea Bolognani
Changes from v1: * use a better approach to copy host data (thanks Martin) * acknowledge the fact that the scripts require bash * other small cleanups and improvements Andrea Bolognani (2): tests: Add script to display nodeinfo test data tests: Add script to copy nodeinfo test data

Re: [libvirt] [PATCH] src: Include $(builddir)/util in the header search path

2015-10-09 Thread Andrea Bolognani
On Thu, 2015-10-08 at 18:12 +0100, Daniel P. Berrange wrote: > On Thu, Oct 08, 2015 at 06:55:23PM +0200, Andrea Bolognani wrote: > > Since a9fe620372144db, we are generating virkeymaps.h at build > > time; however, we are not including $(builddir)/util in the > > header searc

Re: [libvirt] [PATCH] src: Include $(builddir)/util in the header search path

2015-10-09 Thread Andrea Bolognani
ah, using $(builddir) is not good enough as older version of autoconf don't define it. I've just sent the patch after testing it on CentOS 5, please check it out. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] src: Remove $(builddir) usage

2015-10-09 Thread Andrea Bolognani
way ;) Pushed, thanks! -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] src: Remove $(builddir) usage

2015-10-09 Thread Andrea Bolognani
Commit 4e8032272f1704f7 used $(builddir) in the header search path to fix a build issue; however, $(builddir) is not defined by old autoconf versions such as the one available in CentOS 5, resulting in the following error: cc1: error: /util: No such file or directory make[3]: ***

Re: [libvirt] [PATCH] src: Include $(builddir)/util in the header search path

2015-10-09 Thread Andrea Bolognani
On Fri, 2015-10-09 at 09:55 +0200, Martin Kletzander wrote: > With this we could stop generating whole bunch of other stuff in > $(srcdir) See output of `git grep -F '> $(srcdir)'` for details =) That would be very nice indeed! I'll look into it. Cheers. -- Andrea Bolognani Software

Re: [libvirt] [PATCH v3 1/2] Fix nodeinfo output on PPC64 KVM hosts

2015-07-08 Thread Andrea Bolognani
with the former option (because it requires less changes to the code) and add a paragraph about it to the documentation, but I'd love to hear your opinion on the subject. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH v4 0/2] Fix nodeinfo output on PPC64 KVM hosts

2015-07-10 Thread Andrea Bolognani
On Thu, 2015-07-09 at 11:46 -0400, John Ferlan wrote: On 07/07/2015 03:25 AM, Andrea Bolognani wrote: Changes from v3 to v4: * removed a printf() statement; * fixed typo in a commit message. Shivaprasad G Bhat (2): Fix nodeinfo output on PPC64 KVM hosts Add testcase

Re: [libvirt] shall libvirtd validate guest's name ?

2015-07-09 Thread Andrea Bolognani
names, and eg. the Nautilus file manager happily allows me to use foo;reboot as name when creating or renaming files... Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 0/9] Add sysfs_prefix to nodeinfo.c API's

2015-07-10 Thread Andrea Bolognani
. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 7/9] nodeinfo: Add sysfs_prefix to nodeCapsInitNUMA

2015-07-10 Thread Andrea Bolognani
, +virNodeCapsFillCPUInfo(const char *cpupath, + int cpu_id ATTRIBUTE_UNUSED, virCapsHostNUMACellCPUPtr cpu ATTRIBUTE_UNUSED) cpupath should be marked ATTRIBUTE_UNUSED as well. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list

Re: [libvirt] [PATCH 6/6] qemu: Add ppc64-specific math to qemuDomainGetMlockLimitBytes()

2015-11-18 Thread Andrea Bolognani
e bits of memory that need to be locked. So there's no comprehensive documentation that I know of, except for the code itself :) Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

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

2015-11-18 Thread Andrea Bolognani
atus quo. Would you prefer it if I pulled this patch from the series for now and posted it again once it supports restoring the limit back to the default once the last VFIO device has been removed from the guest? I'd be okay with that. Cheers. -- Andrea Bolognani Software Engineer - Virtualization

Re: [libvirt] [PATCH 5/6] qemu: Always set locked memory limit for ppc64 domains

2015-11-18 Thread Andrea Bolognani
On Wed, 2015-11-18 at 16:11 +0100, Peter Krempa wrote: > On Wed, Nov 18, 2015 at 15:13:19 +0100, Andrea Bolognani wrote: > > Unlike other architectures, ppc64 domains need to lock memory > > even when VFIO is not used. > > > > Change qemuDomainRequiresM

[libvirt] [PATCH] qemu: Default to virtio network devices on ppc64

2015-08-31 Thread Andrea Bolognani
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1254044 --- src/qemu/qemu_domain.c | 3 ++- .../qemuxml2argvdata/qemuxml2argv-pseries-net-default.args | 6 ++ .../qemuxml2argvdata/qemuxml2argv-pseries-net-default.xml | 14 ++

[libvirt] [PATCH v2 1/2] qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET capability

2015-09-02 Thread Andrea Bolognani
As the name suggests, this capability can be used to check whether a QEMU binary supports the virtio-net-* devices. --- src/qemu/qemu_capabilities.c | 7 ++- src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 +

[libvirt] [PATCH v2 2/2] qemu: Default to virtio-net where available

2015-09-02 Thread Andrea Bolognani
This applies to all architectures except for ARM, which already has its own logic to pick the best default. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1254044 --- Changes from v1: * make sure virtio-net is available using capabilities instead of blindly using it (thanks Martin)

[libvirt] [PATCH v2 0/2] qemu: Default to virtio-net where available

2015-09-02 Thread Andrea Bolognani
This new version of the patch addresses Martin's comments by using capabilities to detect whether virtio-net can be used, and if that is the case, does so on all architectures. Plus, the commit messages are slightly less terse this time around :) Cheers. Andrea Bolognani (2): qemu: Introduce

Re: [libvirt] [PATCH v2] lxc: fuse mount for /proc/cpuinfo

2015-09-07 Thread Andrea Bolognani
s robust on non-x86 > > arches. > > Hum... I didn't even know that file would change with arch'es. Take a look at linuxNodeInfoCPUPopulate() in src/nodeinfo.c for inspiration. Sharing the parsing code would also be nice. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Tea

Re: [libvirt] [PATCH v2 2/2] qemu: Default to virtio-net where available

2015-09-03 Thread Andrea Bolognani
er maintained in qemu than the rtl8139, and 3) > performs > better than rtl8139 (although obviously not as good as virtio). Good point. We could switch the default to virtio just for ppc64 then, leaving the capability check in place of course, and change the global default from rtl8139

Re: [libvirt] [PATCH v2 2/2] qemu: Default to virtio-net where available

2015-09-03 Thread Andrea Bolognani
the case eg. on RHEL ppc64. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 2/2] qemu: Default to virtio-net where available

2015-09-03 Thread Andrea Bolognani
d the RHEL QEMU PPC64 changes. Yeah, Martin suggested doing something similar to the first option as well. Let's just probe for a bunch of network devices and use the first one that's available, okay? 1. rtl8139 2. e1000 3. virtio-net Any other we should try? Any drawbacks to this appr

Re: [libvirt] [PATCH] qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW

2015-09-02 Thread Andrea Bolognani
we need a 'qemuDomainMachineIsS390CCW' helper? I'd also use STRPREFIX() instead of STREQLEN(). Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 0/4] Try several possible default network devices

2015-09-10 Thread Andrea Bolognani
On Wed, 2015-09-09 at 21:43 +0200, Martin Kletzander wrote: > > Andrea Bolognani (4): > > qemu: Introduce QEMU_CAPS_DEVICE_RTL8139 > > qemu: Introduce QEMU_CAPS_DEVICE_E1000 > > qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET > > qemu: Try several network devi

[libvirt] [PATCH v3 1/4] qemu: Introduce QEMU_CAPS_DEVICE_RTL8139

2015-09-09 Thread Andrea Bolognani
This capability can be used to detect whether or not the QEMU binary supports the rtl8139 network device. --- src/qemu/qemu_capabilities.c | 5 - src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 +

[libvirt] [PATCH v3 4/4] qemu: Try several network devices when looking for a default

2015-09-09 Thread Andrea Bolognani
Up until now, the default has been rtl8139, but no check was in place to make sure that device was actually available. Now we try rtl8139, e1000 and virtio-net in turn, checking for availability before using any of them: this means we have a much better chance for the guest to be able to boot.

[libvirt] [PATCH v3 2/4] qemu: Introduce QEMU_CAPS_DEVICE_E1000

2015-09-09 Thread Andrea Bolognani
This capability can be used to detect whether or not the QEMU binary supports the e1000 network device. --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 +

[libvirt] [PATCH v3 3/4] qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET

2015-09-09 Thread Andrea Bolognani
This capability can be used to detect whether or not the QEMU binary supports the virtio-net-* network device. --- src/qemu/qemu_capabilities.c | 5 + src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 1 +

[libvirt] [PATCH v3 0/4] Try several possible default network devices

2015-09-09 Thread Andrea Bolognani
in the test suite Changes in v2[1]: * detect virtio-net availability * try to user it if available Cheers. [1] https://www.redhat.com/archives/libvir-list/2015-September/msg00058.html Andrea Bolognani (4): qemu: Introduce QEMU_CAPS_DEVICE_RTL8139 qemu: Introduce QEMU_CAPS_DEVICE_E1000

[libvirt] [PATCH v3] qemu: Fix using guest architecture as lookup key

2015-09-16 Thread Andrea Bolognani
When looking for a QEMU binary suitable for running ppc64le guests we have to take into account the fact that we use the QEMU target as key for the hash, so direct comparison is not good enough. Factor out the logic from virQEMUCapsFindBinaryForArch() to a new virQEMUCapsFindTarget() function and

Re: [libvirt] [PATCH v2] qemu: Fix using guest architecture as lookup key

2015-09-16 Thread Andrea Bolognani
a.arch == data.arch from before. Good idea! After all, the definition of insanity is looking up using the same key twice and expecting a result the second time around :) I've just posted a new version[1] that implements your suggestion. Cheers. [1] https://www.redhat.com/archives/libvir-list

Re: [libvirt] [PATCH v3] qemu: Fix using guest architecture as lookup key

2015-09-16 Thread Andrea Bolognani
On Wed, 2015-09-16 at 09:22 +0100, Daniel P. Berrange wrote: > On Wed, Sep 16, 2015 at 09:13:09AM +0200, Andrea Bolognani wrote: > > When looking for a QEMU binary suitable for running ppc64le guests > > we have to take into account the fact that we use the QEMU target > > as

[libvirt] [PATCH] qemu: The ppc64 target can run both ppc64 and ppc64le guests

2015-09-15 Thread Andrea Bolognani
When looking for a QEMU binary suitable for running ppc64le guests we have to take into account the fact that we use the QEMU target as key for the hash, so direct comparison is not good enough: normalize everything that can run on the ppc64 target to VIR_ARCH_PPC64 instead. This approach was

[libvirt] [PATCH v2] qemu: Fix using guest architecture as lookup key

2015-09-15 Thread Andrea Bolognani
When looking for a QEMU binary suitable for running ppc64le guests we have to take into account the fact that we use the QEMU target as key for the hash, so direct comparison is not good enough. Factor out the logic from virQEMUCapsFindBinaryForArch() to a new virQEMUCapsFindTarget() function and

Re: [libvirt] [PATCH] qemu: The ppc64 target can run both ppc64 and ppc64le guests

2015-09-15 Thread Andrea Bolognani
separate function which is then reused when looking up capabilities. Of course it's a slightly larger patch this time around :) Cheers. [1] https://www.redhat.com/archives/libvir-list/2015-September/msg00475 .html -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list

[libvirt] [PATCH] util: Add space before comment end marker

2015-09-14 Thread Andrea Bolognani
This allows the Wikipedia link to be recognized correctly by eg. gnome-terminal's Open Link and Copy Link Address features. --- Pushed as trivial src/util/virarch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virarch.h b/src/util/virarch.h index 3206ce2..af5ff83

[libvirt] [PATCH] qemu: Add conditions for qemu-kvm use on ppc64

2015-10-01 Thread Andrea Bolognani
qemu-kvm can be used to run ppc64 guests on ppc64le hosts and vice versa, since the hardware is actually the same and the endianness is chosen by the guest kernel. Up until now, however, libvirt didn't allow the use of qemu-kvm to run guests if their endianness didn't match the host's. Resolves:

Re: [libvirt] [PATCH] docs: Add Cuckoo Sandbox into apps.html

2015-10-01 Thread Andrea Bolognani
solated environment that libvirt, amongsth > +other backends, can be used. > + > + > + > > s/amongsth/amongst/ Or even s/amongsth/among/ [1] Plus the whole last sentence looks like some words went missing... Maybe take another look at it. Cheers. [1] http://grammarist.co

Re: [libvirt] [PATCH] docs: Add Cuckoo Sandbox into apps.html

2015-10-01 Thread Andrea Bolognani
ment." ? Much better :) ACK -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] qemu: Add conditions for qemu-kvm use on ppc64

2015-10-01 Thread Andrea Bolognani
UCapsFindTarget() can be considered a first step in that direction. A lot more work is still needed, though. > In other words, ACK :-) Thanks :) -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] Remove unused variables.

2015-09-24 Thread Andrea Bolognani
aightforward wrapper, eg. the return statement is the only one in the body. That's of course just my personal taste :) Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] maint: Remove control characters from LGPL license file

2015-09-25 Thread Andrea Bolognani
On Thu, 2015-09-24 at 19:03 +0200, Pavel Hrdina wrote: > On Thu, Jun 11, 2015 at 03:15:19PM +0200, Andrea Bolognani wrote: > > --- > > COPYING.LESSER | 18 +- > > 1 file changed, 9 insertions(+), 9 deletions(-) > > > > ACK :) Oh, I had co

[libvirt] [PATCH] qemu: Align virQEMUCapsFlags members

2015-10-05 Thread Andrea Bolognani
--- This pushes a lot of lines well beyond 80 columns, but then again some of the entries were already as long as 92 columns... src/qemu/qemu_capabilities.h | 412 +-- 1 file changed, 205 insertions(+), 207 deletions(-) diff --git

Re: [libvirt] [PATCH] qemu: Align virQEMUCapsFlags members

2015-10-05 Thread Andrea Bolognani
On Mon, 2015-10-05 at 15:24 +0200, Jiri Denemark wrote: > On Mon, Oct 05, 2015 at 14:13:05 +0200, Andrea Bolognani wrote: > > --- > > This pushes a lot of lines well beyond 80 columns, but then again > > some > > of the entries were already as long as 92 co

[libvirt] [PATCH 02/10] pci: Remove 'reprobe' parameter from virPCIDeviceUnbind()

2015-12-02 Thread Andrea Bolognani
The value is not inspected inside the function, so it makes more sense for the caller to change the device's setting explicitly. --- src/util/virpci.c | 10 ++ src/util/virpci.h | 2 +- tests/virpcitest.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH 07/10] hostdev: Delay reattach of VFIO devices

2015-12-02 Thread Andrea Bolognani
When reattaching VFIO devices to the host, we have to be careful not to end up in a situation where ownership of the IOMMU group is shared between the hosts and a domain, as doing so will result in host crashes. If a PCI device is not safe for reattach, as detected by

[libvirt] [PATCH 03/10] pci: Introduce virPCIStubDriver enumeration

2015-12-02 Thread Andrea Bolognani
This replaces the virPCIKnownStubs string array that was used internally for stub driver validation. Advantages: * possible values are well-defined * typos in driver names will be detected at compile time * avoids having several copies of the same string around * no error checking

[libvirt] [PATCH 08/10] hostdev: Clean up delayed VFIO devices

2015-12-02 Thread Andrea Bolognani
When we determine that a VFIO device can be safely reattached to the host, we have to also reattach all devices we might have delayed earlier in order to clean up properly. The new function virHostdevExpandPCIDeviceListIOMMUGroups() helps by adding inactive devices that are part of the same IOMMU

[libvirt] [PATCH 09/10] hostdev: Devices have already been marked as inactive

2015-12-02 Thread Andrea Bolognani
We mark all VFIO devices as inactive after we've detached them from the domain, so that step doesn't need to be performed afterwards. --- src/util/virhostdev.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index

[libvirt] [PATCH 05/10] hostdev: Simplify virHostdevIsPCIDeviceUsed()

2015-12-02 Thread Andrea Bolognani
This function, previously called virHostdevIsPCINodeDeviceUsed(), was written to work both when used on its own and when used with virPCIDeviceAddressIOMMUGroupIterate(); as a consequence, it was slightly more convoluted than it needed to be. Rework it to perform a single task (checking that a

[libvirt] [PATCH 06/10] hostdev: Check for safety before detaching VFIO devices

2015-12-02 Thread Andrea Bolognani
The newly-introduced virHostdevIsPCIDeviceSafeForDetach() function checks against all problematic situations that can arise when detaching a PCI device from the host for VFIO device assignment. Some of the checks are simply reintroduced after being removed when reworking

[libvirt] [PATCH 04/10] pci: Introduce virPCIDeviceIOMMUGroupIterate()

2015-12-02 Thread Andrea Bolognani
This is a straightforward wrapper around virPCIDeviceAddressIOMMUGroupIterate() that will make some code less awkward to write later on. --- src/libvirt_private.syms | 1 + src/util/virpci.c| 26 ++ src/util/virpci.h| 8 ++-- 3 files changed, 33

[libvirt] [PATCH 10/10] hostdev: Tidy up after changes to VFIO device handling

2015-12-02 Thread Andrea Bolognani
Add a couple of useful debug messages, update comments to reflect recent changes, use the proper case for VFIO in variable names and fix parameter alignment in a function definition. --- src/util/virhostdev.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-)

[libvirt] [PATCH 00/10] VFIO fixes for PCI devices

2015-12-02 Thread Andrea Bolognani
, thus preventing the crash and fixing the bug 10: Spit and polish Cheers. [1] Luckily, it doesn't break the existing tests either [2] If you call 'virsh nodedev-reattach' on a device that's assigned to a guest, libvirt won't stop you and you will end up crashing your system Andrea

Re: [libvirt] [PATCH 04/10] pci: Introduce virPCIDeviceIOMMUGroupIterate()

2015-12-04 Thread Andrea Bolognani
On Thu, 2015-12-03 at 14:06 -0500, Laine Stump wrote: > On 12/02/2015 12:39 PM, Andrea Bolognani wrote: > > This is a straightforward wrapper around > > virPCIDeviceAddressIOMMUGroupIterate() that will make some code less > > awkward to write later on. > > --- > >

Re: [libvirt] [PATCH 0/7] tests: Always fake root directory

2015-12-04 Thread Andrea Bolognani
On Fri, 2015-12-04 at 16:31 +0100, Michal Privoznik wrote: > ACK, although I'd rather wait until after release. If you (or somebody > else) feels otherwise, do push it any time you want. No need to rush, I'll push after release. Thanks for the review! -- Andrea Bolognani Software En

[libvirt] [PATCH 5/7] tests: Rename LIBVIRT_FAKE_SYSFS_DIR to LIBVIRT_FAKE_ROOT_DIR

2015-12-04 Thread Andrea Bolognani
The old name is no longer accurate, since now we're using its value as the root of the fake filesystem. No functional changes. --- tests/vircgroupmock.c | 10 +- tests/vircgrouptest.c | 16 tests/virhostdevtest.c | 16 tests/virpcimock.c | 6

[libvirt] [PATCH 4/7] tests: cgroupmock: Use the temporary directory as fake root

2015-12-04 Thread Andrea Bolognani
We might need to mock files living outside SYSFS_PREFIX later on, so it's better to treat the temporary directory we are passed via the environment as the root of the fake filesystem and create SYSFS_PREFIX inside it. The environment variable name will be changed to reflect the new use we're

[libvirt] [PATCH 3/7] tests: pcimock: Use the temporary directory as fake root

2015-12-04 Thread Andrea Bolognani
We might need to mock files living outside PCI_SYSFS_PREFIX later on, so it's better to treat the temporary directory we are passed via the environment as the root of the fake filesystem and create PCI_SYSFS_PREFIX inside it. The environment variable name will be changed to reflect the new use

[libvirt] [PATCH 0/7] tests: Always fake root directory

2015-12-04 Thread Andrea Bolognani
://www.redhat.com/archives/libvir-list/2015-November/msg00532.html is an example of why we would need to do that Andrea Bolognani (7): tests: scsihost: Don't set LIBVIRT_FAKE_SYSFS_DIR tests: pcimock: Remove check for fakesysfsdir tests: pcimock: Use the temporary directory as fake root

[libvirt] [PATCH 6/7] tests: Use more specific names for variables

2015-12-04 Thread Andrea Bolognani
Instead of fakesysfsdir, which is very generic, use fakesysfspcidir and fakesysfscgroupdir. This makes it explicit what part of the fake sysfs filesystem they're referring to, and also leaves open the possibility of handling files in two unrelated parts of the fake sysfs filesystem. No functional

[libvirt] [PATCH 7/7] tests: scsihost: Use fakerootdir instead of fakesysfsdir

2015-12-04 Thread Andrea Bolognani
This updates the test program to make it consistent with recent changes to the mock libraries, and also opens up the possibility of mocking more than just /sys in the future. --- tests/scsihosttest.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH 1/7] tests: scsihost: Don't set LIBVIRT_FAKE_SYSFS_DIR

2015-12-04 Thread Andrea Bolognani
The test program is not preloading any of the mock libraries that read that environment variable, so setting it is pointless. --- tests/scsihosttest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/scsihosttest.c b/tests/scsihosttest.c index eecb1c3..eb5f522 100644 ---

[libvirt] [PATCH 2/7] tests: pcimock: Remove check for fakesysfsdir

2015-12-04 Thread Andrea Bolognani
init_env() will return right away if fakesysfsdir is already initialized, so this check is redundant. --- tests/virpcimock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 0b49290..6d00a4f 100644 --- a/tests/virpcimock.c +++

[libvirt] [PATCH v2 3/7] qemu: Add qemuDomainAdjustMaxMemLock()

2015-12-11 Thread Andrea Bolognani
This function detects whether a domain needs RLIMIT_MEMLOCK to be set, and if so, uses an appropriate value. --- src/qemu/qemu_domain.c | 30 ++ src/qemu/qemu_domain.h | 1 + 2 files changed, 31 insertions(+) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH v2 5/7] qemu: Reduce memlock limit after detaching PCI hostdev

2015-12-11 Thread Andrea Bolognani
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 modules, but not for PCI hostdevs. ---

[libvirt] [PATCH v2 0/7] Memory locking limit improvements

2015-12-11 Thread Andrea Bolognani
* small changes here and there as pointed out during review Cheers. [1] https://www.redhat.com/archives/libvir-list/2015-November/msg01021.html Andrea Bolognani (7): process: Allow virProcessPrLimit() to get current limit process: Add virProcessGetMaxMemLock() qemu: Add

[libvirt] [PATCH v2 4/7] qemu: Use qemuDomainAdjustMaxMemLock()

2015-12-11 Thread Andrea Bolognani
Replace all uses of the qemuDomainRequiresMlock/virProcessSetMaxMemLock combination with the equivalent qemuDomainAdjustMaxMemLock() call. --- src/qemu/qemu_hotplug.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git

Re: [libvirt] [PATCH 00/10] VFIO fixes for PCI devices

2015-12-10 Thread Andrea Bolognani
passthrough - are legacy KVM assignment and Xen assignment really not affected at all? Is the IOMMU not involved in the process? Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

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

2015-12-11 Thread Andrea Bolognani
inRemovePCIHostDevice code. I have now posted v2:   https://www.redhat.com/archives/libvir-list/2015-December/msg00454.html Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 04/10] pci: Introduce virPCIDeviceIOMMUGroupIterate()

2015-12-11 Thread Andrea Bolognani
On Fri, 2015-12-04 at 09:46 +0100, Andrea Bolognani wrote: > On Thu, 2015-12-03 at 14:06 -0500, Laine Stump wrote: > > Instead of creating this new function, how about if we change > > virPCIDevice to contain a virPCIDeviceAddress rather than individual > > domain, bus, slot,

Re: [libvirt] ARM KVM GICv3 Support

2015-12-15 Thread Andrea Bolognani
, but extending it so that 'host' is accepted as well should be easy to do in a backwards-compatible way. The behaviour of the value '2' has been defined as "don't specify any GIC version" though, and I'm afraid we'll be unable to change that because it would affect existing guests. Marti

Re: [libvirt] [PATCH v2] pci: Use virPCIDeviceAddress in virPCIDevice

2015-12-15 Thread Andrea Bolognani
On Tue, 2015-12-15 at 12:27 -0500, Laine Stump wrote: > On 12/15/2015 05:48 AM, Andrea Bolognani wrote: > > On Tue, 2015-12-15 at 10:05 +0100, Andrea Bolognani wrote: > > > @@ -1661,25 +1661,14 @@ virPCIDeviceFree(virPCIDevicePtr dev) > > > * @dev:

[libvirt] [PATCH v3] pci: Use virPCIDeviceAddress in virPCIDevice

2015-12-15 Thread Andrea Bolognani
Instead of replicating the information (domain, bus, slot, function) inside the virPCIDevice structure, use the already-existing virPCIDeviceAddress structure. For users of the module, this means that the object returned by virPCIDeviceGetAddress() can no longer be NULL and must no longer be

Re: [libvirt] [PATCH v2 0/7] Memory locking limit improvements

2015-12-17 Thread Andrea Bolognani
On Wed, 2015-12-16 at 14:32 -0500, John Ferlan wrote: > > On 12/11/2015 09:45 AM, Andrea Bolognani wrote: > > During my testing, I've realized that even with the series applied > > there's still one case in which we're unable to restore the previous > > memory lock

Re: [libvirt] [PATCH 0/7] tests: Always fake root directory

2015-12-13 Thread Andrea Bolognani
On Fri, 2015-12-04 at 17:07 +0100, Andrea Bolognani wrote: > On Fri, 2015-12-04 at 16:31 +0100, Michal Privoznik wrote: > > ACK, although I'd rather wait until after release. If you (or somebody > > else) feels otherwise, do push it any time you want. > > No need to rush, I'

Re: [libvirt] [PATCH 00/10] VFIO fixes for PCI devices

2015-12-13 Thread Andrea Bolognani
On Wed, 2015-12-02 at 18:17 +0100, Andrea Bolognani wrote: > This series is my attempt at fixing > >   https://bugzilla.redhat.com/show_bug.cgi?id=1272300 > [...] > > The problem being solved is that, when using VFIO, IOMMU group > ownership can't be sh

[libvirt] [PATCH v2 7/7] qemu: Replace Mlock with MemLock in function names

2015-12-13 Thread Andrea Bolognani
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 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c

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

2015-12-13 Thread Andrea Bolognani
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(). --- src/util/virprocess.c | 16 ++-- 1 file changed, 10 insertions(+), 6

[libvirt] [PATCH v2 6/7] qemu: Allow qemuDomainAdjustMaxMemLock() to restore previous value

2015-12-13 Thread Andrea Bolognani
When the function changes the memory lock limit for the first time, it will retrieve the current value and store it inside the virDomainObj for the domain. When the function is called again, if memory locking is no longer needed, it will be able to restore the memory locking limit to its original

<    1   2   3   4   5   6   7   8   9   10   >