Re: [libvirt] Dropping RHEL-6/CentOS-6 support

2016-02-09 Thread Andrea Bolognani
pplies to QEMU as well - once we drop support for CentOS 6 we should also drop support for any QEMU version that doesn't support CentOS 6. 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] Dropping RHEL-6/CentOS-6 support

2016-02-09 Thread Andrea Bolognani
n :) I would definitely never have risked anything like that in my previous life as a system administrator. And of course we want to support way more than just RHEL and related distros: this is about making the support shallower, not narrower :) Cheers. --  Andrea Bolognani Software Engineer - Virtu

Re: [libvirt] Dropping RHEL-6/CentOS-6 support

2016-02-09 Thread Andrea Bolognani
on eg. Ubuntu 12.04 instead of 14.04... Thank you for taking the time to engage in this discussion, it's been quite informative :) 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] virStringListLength: Ensure const correctness

2016-02-09 Thread Andrea Bolognani
= NULL && virStringListLength(cells) > 2) { +if (cells != NULL && +virStringListLength((const char * const *) cells) > 2) {  if (virStorageBackendSheepdogAddVolume(conn, pool, cells[1]) < 0)  goto cleanup;  } --  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 1/6] tests: qemuxml2argv: remove some QEMU_CAPS_DEVICE problem cases

2016-02-10 Thread Andrea Bolognani
detected that device is not available in QEMU, what's the point of adding '-usb' at all? The only situation I can think of in which this approach actually helps is when QEMU changes the default controller model associated with '-usb', which I believe is going to happen on ppc64 to move from OHCI to XHCI. But then again that's not going to be very good for guest ABI stability, is it? I guess the idea is to make a last-ditch effort to provide some sort of USB controller, any sort of USB controller, to the guest even though to the best of libvirt's knowledge the support just isn't there. So this is the current situation AFAIK. Suggestions on how to improve it are very welcome :) 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] tests: Don't link mock libraries against libvirt and gnulib

2016-02-10 Thread Andrea Bolognani
Mock libraries are used with LD_PRELOAD from test binaries that are already linked against those libraries, so they will be able to resolve the symbols anyway. --- tests/Makefile.am | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index c5986f0..fb862c

Re: [libvirt] [PATCH] tests: Don't link mock libraries against libvirt and gnulib

2016-02-10 Thread Andrea Bolognani
On Wed, 2016-02-10 at 17:36 +0100, Michal Privoznik wrote: > On 10.02.2016 17:12, Andrea Bolognani wrote: > > Mock libraries are used with LD_PRELOAD from test binaries that > > are already linked against those libraries, so they will be able > > to resolve the symbols anywa

[libvirt] [PATCH] Revert "tests: Don't link mock libraries against libvirt and gnulib"

2016-02-10 Thread Andrea Bolognani
This reverts commit 6aa90452aa63cb1e1ffa84ff5f93f5873bf810a0. Turns out that not linking against libvirt and gnulib is okay for regular Linux (and FreeBSD) builds, but makes mingw very unhappy. .../virnetserverclientmock_la-virnetserverclientmock.o: In function `virNetSocketGetSELinuxContex

Re: [libvirt] [PATCH] Prohibit verbose strcat

2016-02-10 Thread Andrea Bolognani
at(a, b, strlen())' \ s/strlen()/strlen(b)/ ACK with at least the second fixed. 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] virhook: do not save the return value of virBuildPath

2016-02-10 Thread Andrea Bolognani
  Returns: 0 if the execution succeeded, 1 if the script was not found    or invalid parameters, and -1 if script returned an error so I wonder if it should be changed to 1 instead... The script can't have returned an error if we haven't been able to build its path :) 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] domsuspend: Fix warning on mingw build

2016-02-10 Thread Andrea Bolognani
Commit d82170d introduced a workaround for domtop: in that example program, we define a symbol called ERROR for our own use, but since a symbol with the same name is already defined in one of mingw's header files, we get a warning when using that compiler. domsuspend defines the same problematic s

Re: [libvirt] [PATCH] Revert "tests: Don't link mock libraries against libvirt and gnulib"

2016-02-11 Thread Andrea Bolognani
On Wed, 2016-02-10 at 18:09 +, Daniel P. Berrange wrote: > On Wed, Feb 10, 2016 at 06:33:21PM +0100, Andrea Bolognani wrote: > > This reverts commit 6aa90452aa63cb1e1ffa84ff5f93f5873bf810a0. > >  > > Turns out that not linking against libvirt and gnulib is okay for &

Re: [libvirt] [PATCH] Prohibit verbose strcat

2016-02-11 Thread Andrea Bolognani
; Which is a good idea anyway, I guess :) 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] Revert "tests: Don't link mock libraries against libvirt and gnulib"

2016-02-11 Thread Andrea Bolognani
On Thu, 2016-02-11 at 09:49 +, Daniel P. Berrange wrote: > On Thu, Feb 11, 2016 at 09:54:45AM +0100, Andrea Bolognani wrote: > > On Wed, 2016-02-10 at 18:09 +, Daniel P. Berrange wrote: > > > On Wed, Feb 10, 2016 at 06:33:21PM +0100, Andrea Bolognani wrote: > >

[libvirt] [PATCH 0/2] tests: Fix mock libraries linking

2016-02-11 Thread Andrea Bolognani
This patches make sure mock libraries do not link against either too many or too few libraries. Cheers. Andrea Bolognani (2): tests: Use plain close() in mock code tests: Link mock libraries against gnulib and gnulib only tests/Makefile.am| 21 +++-- tests

[libvirt] [PATCH 2/2] tests: Link mock libraries against gnulib and gnulib only

2016-02-11 Thread Andrea Bolognani
Mock libraries should not be linked against libvirt, but some of them did - fix that. On the other hand, not linking against gnulib can cause build failures on mingw, so define a new $(MOCKLIBS_LIBS) variable and use it everywhere. --- tests/Makefile.am | 21 +++-- 1 file changed,

[libvirt] [PATCH 1/2] tests: Use plain close() in mock code

2016-02-11 Thread Andrea Bolognani
The virportallocatortest.c file is compiled both as a test case and as a mock library; in the latter case, it can't use VIR_FORCE_CLOSE() because mock libraries are not linked against libvirt. Replace VIR_FORCE_CLOSE() with plain close() to solve the issue. --- tests/virportallocatortest.c | 2 +-

Re: [libvirt] [PATCH 0/2] tests: Fix mock libraries linking

2016-02-11 Thread Andrea Bolognani
On Thu, 2016-02-11 at 11:17 +, Daniel P. Berrange wrote: > On Thu, Feb 11, 2016 at 12:15:39PM +0100, Andrea Bolognani wrote: > > This patches make sure mock libraries do not link against either > > too many or too few libraries. > > > > Cheers. > > > >

Re: [libvirt] [PATCH] syntax-check: Allow plain close in virportallocatortest

2016-02-11 Thread Andrea Bolognani
.diff$$) Yup, my bad. I'll try to split off the mock part of virportallocatortest.c instead, so we can still enjoy this check for the non-mock part of the test case. Stay tuned. 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 3/4] tests: Don't use "lib" prefix for mock libraries

2016-02-11 Thread Andrea Bolognani
virportallocatormock was the only one using it, and has been changed accordingly. --- tests/Makefile.am| 10 +- tests/virportallocatortest.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 1fe7d6b..359610f 1006

[libvirt] [PATCH 4/4] tests: Rename virmockdbus -> virdbusmock for consistency

2016-02-11 Thread Andrea Bolognani
All mock libraries were called vir*mock except for this one; now the naming is consistent across the board. --- tests/Makefile.am | 14 +++--- tests/{virmockdbus.c => virdbusmock.c} | 2 +- tests/virfirewalltest.c| 2 +- tests/virpolkittest.c

[libvirt] [PATCH 1/4] tests: Split off the mock part of the port allocator test

2016-02-11 Thread Andrea Bolognani
Instead of compiling either the mock or the non-mock part of the file based on a compiler flag, split the mock part off to its own file. --- tests/Makefile.am| 4 +- tests/virportallocatormock.c | 108 ++ tests/virportallocatortest.c | 110 +++-

[libvirt] [PATCH 2/4] tests: Allow use of close() in mock libraries

2016-02-11 Thread Andrea Bolognani
As mock libraries are not to be linked against libvirt, the sc_prohibit_close syntax-check rule does not apply. This fixes a syntax-check failure introduced by commit a03cbfe0fb. --- cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 3f78842..5b864af

[libvirt] [PATCH 0/4] tests: Fix syntax-check failure, plus extras

2016-02-11 Thread Andrea Bolognani
Commit a03cbfe0fb introduced a syntax-check failure: patch 1/4 prepares for 2/4, where the failure is actually fixed. Patches 3/4 and 4/4 improve the naming consistency for mock libraries by shuffling files around a bit. Cheers. Andrea Bolognani (4): tests: Split off the mock part of the

Re: [libvirt] [PATCH 1/4] tests: Split off the mock part of the port allocator test

2016-02-11 Thread Andrea Bolognani
On Thu, 2016-02-11 at 15:45 +0100, Ján Tomko wrote: > On Thu, Feb 11, 2016 at 02:36:28PM +0100, Andrea Bolognani wrote: > > Instead of compiling either the mock or the non-mock part of the > > file based on a compiler flag, split the mock part off to its > > own fil

Re: [libvirt] [PATCH 0/2] tests: Fix mock libraries linking

2016-02-11 Thread Andrea Bolognani
On Thu, 2016-02-11 at 12:34 +0100, Andrea Bolognani wrote: > On Thu, 2016-02-11 at 11:17 +, Daniel P. Berrange wrote: > > On Thu, Feb 11, 2016 at 12:15:39PM +0100, Andrea Bolognani wrote: > > > This patches make sure mock libraries do not link against either > > > to

Re: [libvirt] [PATCH] virportallocatortest: Run on linux only

2016-02-12 Thread Andrea Bolognani
proper solution by any stretch of the imagination, but I'm afraid that we're currently limiting a bunch of other tests to Linux only while they would work on other platforms as well... Let's get the mingw build working again for now: going through the tests to decide which one shoul

Re: [libvirt] [PATCH] domsuspend: Fix warning on mingw build

2016-02-12 Thread Andrea Bolognani
On Fri, 2016-02-12 at 16:32 +0100, Michal Privoznik wrote: > On 10.02.2016 19:44, Andrea Bolognani wrote: > > Commit d82170d introduced a workaround for domtop: in that example > > program, we define a symbol called ERROR for our own use, but since > > a symbol with the

Re: [libvirt] [Qemu-devel] ARM KVM GICv3 Support

2016-02-15 Thread Andrea Bolognani
on, but I think that was mostly to keep things simple and not because the QMP command approach was wrong? IOW Dan, if we went ahead with the QMP command approach, would you oppose it? Peter Xu has posted some RFC QEMU patches yesterday... Cheers. --  Andrea Bolognani Software Engineer - Virtual

Re: [libvirt] [PATCH] Spell VMware with a lowercase w

2016-02-15 Thread Andrea Bolognani
c   | 2 +- >  src/util/virstoragefile.c | 2 +- >  tools/virsh.c | 2 +- >  7 files changed, 7 insertions(+), 7 deletions(-) I will never not love this kind of patch :) ACK -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing lis

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
irtualization type, architecture and machine type as inputs. Since GIC is only available for the virt machine type on ARM hosts, and the GIC versions might be limited by using TCG instead of KVM, it seems like it would fit nicely... Cheers. --  Andrea Bolognani Software Engineer - Virtualization T

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:09 +, Peter Maydell wrote: > On 16 February 2016 at 12:05, Andrea Bolognani wrote: > > The idea is to add this information to domain capabilities, which > > already have virtualization type, architecture and machine type as > > inputs. >

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:15 +, Daniel P. Berrange wrote: > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > > Back to GIV.  Recognized values of gic-version are fixed at compile >

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
an do in libvirt beside passing through whatever value the user has specified in the domain XML and report QEMU's error on failure? I had underestimated the performance implications of spawning more QEMU processes, thanks for highlighting them. 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/7] qemu: Always enable GIC on ARM virt machines

2016-02-16 Thread Andrea Bolognani
ments and pushed the series; the documentation update you recommended will be prepared and posted shortly. 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] conf: Use a temporary int variable to store GIC version

2016-02-16 Thread Andrea Bolognani
Since no value in the virGICVersion enumeration is negative, a clever enough compiler can report an error such as src/conf/domain_conf.c:15337:75: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] if ((def->gic_version = virGICVersionTypeFro

[libvirt] [PATCH] docs: List possible GIC versions

2016-02-18 Thread Andrea Bolognani
Recent changes to the handling of GIC version, specifically commit 2a7b11eafb67, have clearly defined what values are acceptable for the version attribute of the element. Update the documentation accordingly. --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

[libvirt] [PATCH] gic: Introduce VIR_GIC_VERSION_DEFAULT alias

2016-02-18 Thread Andrea Bolognani
GIC v2 is the default, but checking against that specific version when we want to know whether the default has been selected is potentially error prone; using an alias instead makes it safer. --- src/qemu/qemu_command.c | 7 +++ src/qemu/qemu_domain.c | 4 ++-- src/util/virgic.h | 3 +++

Re: [libvirt] [PATCH] gic: Introduce VIR_GIC_VERSION_DEFAULT alias

2016-02-18 Thread Andrea Bolognani
This was of course not meant to be a reply to the other patch, but to be a separate thread... Sigh. -- Andrea Bolognani Software Engineer - Virtualization Team -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-18 Thread Andrea Bolognani
here are a few cases where probing in advance would simply not be feasible. Any probing code added to libvirt would have to be kept around forever to ensure compatibility with current QEMU versions, so it should IMHO be seen as a last resort in case we can't live without GIC versio

Re: [libvirt] [PATCH] qemu: add spice opengl support

2016-02-19 Thread Andrea Bolognani
8,12 @@ mymain(void) >  QEMU_CAPS_DEVICE_VIRTIO_GPU, >  QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL, >  QEMU_CAPS_DEVICE_VIDEO_PRIMARY); > +DO_TEST("video-virtio-gpu-spice-gl", QEMU_CAPS_DEVICE, Drop QEMU_CAPS_DEVICE here, we no longer support QEMU versions that lack -device so that capability is always enabled[1]. Cheers. [1] Just realized I accidentaly introduced it again in this test program with one of my recent commits, better clean up :) --  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 spice opengl support

2016-02-19 Thread Andrea Bolognani
1,format=qcow2,\ -if=none,id=drive-ide0-0-0,cache=none \ +-drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\ +id=drive-ide0-0-0,cache=none \  -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \  -spice port=0,gl=on \  -device virtio-vga,id=video0,virgl=on,bus=pci.

[libvirt] [PATCH] test: qemuxml2argv: Drop QEMU_CAPS_DEVICE uses

2016-02-19 Thread Andrea Bolognani
Since commit 51045df01b3c, the QEMU_CAPS_DEVICE capability is enabled automatically and shouldn't be passed as an argument to DO_TEST(); however, commit 998a936c4c1a accidentally introduced few such uses. --- tests/qemuxml2argvtest.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-19 Thread Andrea Bolognani
orever. We already support lots and lots of similar cases in libvirt, the difference being that in this case we would add support for a new command *knowing in advance* that it will become obsolete as soon as a proper implementation is available. It might still be the right thing to do! I just w

Re: [libvirt] [PATCH] qemu: add spice opengl support

2016-02-19 Thread Andrea Bolognani
break; > >   default: > >   break; > >   } > >  > > but other people probably feel differently :) >  > I understand your concern, but having that switch seems worse to me. > Maybe we should make it statically explicit that VIR_TRISTATE_BOOL_YES > == VIR_TRISTATE_SWITCH_ON.. Well, it's certainly more verbose but also more explicit. I, for one, had to do a double take because I didn't notice right away that you were using virTristateSwitch* in that case, and was wondering how it could work at all. At the very least, I believe it deserves an explanatory comment. Let's wait for other people to weigh in on these three remaining issues... 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] test: qemuxml2argv: Drop QEMU_CAPS_DEVICE uses

2016-02-19 Thread Andrea Bolognani
On Fri, 2016-02-19 at 13:47 +0100, Peter Krempa wrote: > On Fri, Feb 19, 2016 at 13:25:38 +0100, Andrea Bolognani wrote: > > Since commit 51045df01b3c, the QEMU_CAPS_DEVICE capability is enabled > > automatically and shouldn't be passed as an argument to DO_TEST(); > > ho

Re: [libvirt] [RFC PATCH 0/2] nodeinfo: PPC64: Fix topology and siblings info on capabilities and nodeinfo

2016-02-19 Thread Andrea Bolognani
nking about it some more, I'm starting to think that we should report the same information as the kernel whenever possible, and enhance it with hints such as capacity for tools and admins, but carefully avoid being too clever for our own good. We can paper over most of the differences between x8

Re: [libvirt] [PATCH] docs: List possible GIC versions

2016-02-19 Thread Andrea Bolognani
On Fri, 2016-02-19 at 10:56 -0500, John Ferlan wrote: > > On 02/18/2016 10:28 AM, Andrea Bolognani wrote: > > Recent changes to the handling of GIC version, specifically commit > > 2a7b11eafb67, have clearly defined what values are acceptable for the > > version attribute

Re: [libvirt] [PATCH] gic: Introduce VIR_GIC_VERSION_DEFAULT alias

2016-02-19 Thread Andrea Bolognani
On Fri, 2016-02-19 at 11:05 -0500, John Ferlan wrote: > > On 02/18/2016 10:28 AM, Andrea Bolognani wrote: > > GIC v2 is the default, but checking against that specific version when > > we want to know whether the default has been selected is potentially > > error prone

Re: [libvirt] [PATCH v2 6/9] hostdev: Minor style adjustments

2016-02-22 Thread Andrea Bolognani
On Tue, 2016-01-26 at 18:59 -0500, John Ferlan wrote: > On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > > Mostly labels names and whitespace. > >  > > No functional changes. > > --- > >  src/util/virhostdev.c | 23 ++- > >  1 file

[libvirt] [PATCH] tests: Fix typo oaque -> opaque

2016-02-23 Thread Andrea Bolognani
No functional changes. --- Pushed under the trivial rule. tests/virhostdevtest.c | 16 tests/virpcitest.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 1b30681..cadb66a 100644 --- a/tests/virhostd

Re: [libvirt] [PATCH] build: work around gcc 6.0 warnings

2016-02-25 Thread Andrea Bolognani
0? That's probably not it, I have 2.5.0 and I get the same error when trying to apply it with 'git am'. 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] vircgroupmock: Mock access("/sys/devices/system/cpu/present")

2016-02-25 Thread Andrea Bolognani
, SYSFS_CPU_PRESENT)) { >  /* These files are readable for all. */ >  ret = (mode == F_OK || mode == R_OK) ? 0 : -1; >  } else if (STREQ(path, "/proc/mounts")) { ACK once the commit message has been polished up. 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 2/2] hostdev: Remove temporary variable when checking for VF

2016-02-25 Thread Andrea Bolognani
The virHostdevIsVirtualFunction() was called exactly twice, and in both cases the return value was saved to a temporary variable before being checked. This would be okay if it improved readability, but in this case is pretty pointless. Get rid of the temporary variable and check the return value d

[libvirt] [PATCH 1/2] netdev: Use virNetDevIsVirtualFunction() properly

2016-02-25 Thread Andrea Bolognani
virNetDevIsVirtualFunction() returns 1 if the interface is a virtual function, 0 if it isn't and -1 on error. This means that, despite the name suggesting otherwise, using it as a predicate is not correct. Fix two callers that were doing so adding an explicit check on the return value. --- src/ut

Re: [libvirt] [PATCH 2/2] hostdev: Remove temporary variable when checking for VF

2016-02-25 Thread Andrea Bolognani
On Thu, 2016-02-25 at 15:51 +0100, Michal Privoznik wrote: > On 25.02.2016 14:02, Andrea Bolognani wrote: > > > > The virHostdevIsVirtualFunction() was called exactly twice, and in > > both cases the return value was saved to a temporary variable before > > being checke

Re: [libvirt] [PATCH 1/2] netdev: Use virNetDevIsVirtualFunction() properly

2016-02-25 Thread Andrea Bolognani
On Thu, 2016-02-25 at 15:51 +0100, Michal Privoznik wrote: > On 25.02.2016 14:02, Andrea Bolognani wrote: > > > > virNetDevIsVirtualFunction() returns 1 if the interface is a > > virtual function, 0 if it isn't and -1 on error. This means that, > > despite the nam

Re: [libvirt] [PATCH 6/9] qemu_cgroup: use virCgroupAddTask instead of virCgroupMoveTask

2016-02-26 Thread Andrea Bolognani
he compiler will complain about unused functions. 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] docs: formatdomain: Document "spice" as a valid value for

2016-02-26 Thread Andrea Bolognani
ute which takes the value "sdl", "vnc", "rdp" or "desktop": > +attribute which takes the value "sdl", "vnc", "spice", "rdp" or > +"desktop": >   >    "s

Re: [libvirt] [PATCH] docs: formatdomain: Document "spice" as a valid value for

2016-02-26 Thread Andrea Bolognani
On Fri, 2016-02-26 at 11:52 +, Richard W.M. Jones wrote: > On Fri, Feb 26, 2016 at 12:43:42PM +0100, Andrea Bolognani wrote: > > > > On Fri, 2016-02-26 at 10:00 +, Richard W.M. Jones wrote: > > > > > > Trivial documentation fix. > > >

Re: [libvirt] [PATCH 1/2] qemu: aarch64: Don't add PCIe controller by default

2016-02-26 Thread Andrea Bolognani
reading of the output of 'info qtree' and poking around the guest is correct) and the domain XML should reflect this fact. Deviating from the actual (virtual) hardware is something that's bound to come back and bite us at some point, I'm afraid, and we should avoid it. Cheers. -

Re: [libvirt] [PATCH 2/2] HACK: qemu: aarch64: Use virtio-pci if user specifies PCI controller

2016-02-26 Thread Andrea Bolognani
;t be found. (the  > latter assumes that aarch64 supports those controllers). >  > Does that make any sense? I could try to code some of this up if you  > could test it (or help me get setup to test it myself). I'm not sure I fully understand all of the above, but I'll pitch in with my own proposal regardless :) First, we make sure that   is always added automatically to the domain XML when using the mach-virt machine type. Then, if     is present as well we default to virtio-pci, otherwise we use the current default of virtio-mmio. This should allow management applications, based on knowledge about the guest OS, to easily pick between the two address schemes. Does this sound like a good idea? 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] libvirt 1.2.9.3 - test for vircgrouptest fails

2016-02-26 Thread Andrea Bolognani
on top of the v1.2.9-maint branch. 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] libvirt 1.2.9.3 - test for vircgrouptest fails

2016-02-26 Thread Andrea Bolognani
On Fri, 2016-02-26 at 19:15 +0100, Andrea Bolognani wrote: > On Fri, 2016-02-26 at 18:54 +0100, Florian Hubold wrote: > > > > Thanks for the previous fix, can I apply this also on top of v1.2.9-maint > > branch > > or does it require some subsequent commits from HEAD?

Re: [libvirt] [Qemu-devel] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-29 Thread Andrea Bolognani
On Mon, 2016-02-22 at 09:35 +0800, Peter Xu wrote: > On Fri, Feb 19, 2016 at 01:33:09PM +0100, Andrea Bolognani wrote: > >  > > I didn't say it would be hard :) > >  > > I just said that such compatibility code would have to be kept > > around forever. We al

[libvirt] [PATCH 09/24] hostdev: Fix indentation

2016-03-07 Thread Andrea Bolognani
--- src/util/virhostdev.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 5be61cd..48a44bc 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -833,9 +833,10 @@ virHostdevReAttachPCIDevices(virHostdevManag

[libvirt] [PATCH 24/24] tests: hostdev: Add more tests

2016-03-07 Thread Andrea Bolognani
Ensure the code behaves properly even for situations that were not being considered before, such as simply detaching devices from the host without attaching them to a guest and attaching devices as managed even though they had already been manually detached from the host. --- tests/virhostdevtest.

[libvirt] [PATCH 18/24] hostdev: Use consistent variable names

2016-03-07 Thread Andrea Bolognani
This is not just a cosmetic change: the name of the variable now gives a hint about what it is supposed to be used for. --- src/util/virhostdev.c | 234 +- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/src/util/virhostdev.c b/src/

[libvirt] [PATCH 04/24] tests: hostdev: Use size_t for count variables

2016-03-07 Thread Andrea Bolognani
virPCIDeviceListCount()'s return type is size_t, so variables that store its return value should be of that type. --- tests/virhostdevtest.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 77b119b..

[libvirt] [PATCH 07/24] hostdev: Make comments easier to change later

2016-03-07 Thread Andrea Bolognani
Replace the term "loop" with the more generic "step". This allows us to be more flexible and eg. have a step that consists in a single function call. Don't include the number of steps in the first comment of the function, so that we can add or remove steps without having to worry about keeping tha

[libvirt] [PATCH 01/24] tests: hostdev: Remove magic numbers

2016-03-07 Thread Andrea Bolognani
When checking the number of devices added to a device list, use the nhostdevs variable instead of its value, so that the test can keep working even if more hostdevs are added. --- tests/virhostdevtest.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/virhos

[libvirt] [PATCH 19/24] hostdev: Add more comments

2016-03-07 Thread Andrea Bolognani
These comments explain the difference between a virPCIDevice instance used for lookups and an actual device instance; some information is also provided for specific uses. --- src/util/virhostdev.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/src/util/

[libvirt] [PATCH 03/24] tests: hostdev: Declare count inside CHECK_LIST_COUNT()

2016-03-07 Thread Andrea Bolognani
This variable is only used internally by the macro, so it's better to move its definition inside the macro as well. --- tests/virhostdevtest.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index

[libvirt] [PATCH 17/24] hostdev: Rename usesVfio -> usesVFIO

2016-03-07 Thread Andrea Bolognani
Acronyms should be written in all caps. --- src/util/virhostdev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 46a385c..a7fb8b1 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -57,7 +57,7 @@ s

[libvirt] [PATCH 12/24] hostdev: virHostdevIsPCINetDevice() should return a bool

2016-03-07 Thread Andrea Bolognani
The only possible return values are true and false, so the return type should be bool instead of int. --- src/util/virhostdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index f08502b..d3e15b7 100644 --- a/src/util/virhostdev.

[libvirt] [PATCH 13/24] hostdev: Change argument order for virHostdevReattachPCIDevice()

2016-03-07 Thread Andrea Bolognani
The new order aligns better with the virHostdev prefix. --- src/util/virhostdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index d3e15b7..e2accb4 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -750,7 +

[libvirt] [PATCH 15/24] hostdev: Remove virHostdevGetActivePCIHostDeviceList()

2016-03-07 Thread Andrea Bolognani
virHostdevGetPCIHostDeviceList() is similar but does not filter out devices that are not in the active list; that said, we are looking up the device in the active list just a few lines after anyway, so we might as well just keep a single function around. This also helps stress the fact the objects

[libvirt] [PATCH 00/24] hostdev: Cleanups and fixes

2016-03-07 Thread Andrea Bolognani
ikely that I might have gotten something wrong :) I haven't been able to figure out a way to split it into smaller chunks, sorry 23 Another bug fix 24 Test the changes made by the rest of the series Cheers. Andrea Bolognani (24): tests: hostdev: Remove mag

[libvirt] [PATCH 20/24] hostdev: Save netdev configuration of actual device

2016-03-07 Thread Andrea Bolognani
We might be just fine looking up the information in pcidevs, but it wouldn't save us any trouble and it's better to be consistent. --- src/util/virhostdev.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/util/virhostdev.c b/src/u

[libvirt] [PATCH 10/24] hostdev: Remove explicit NULL checks

2016-03-07 Thread Andrea Bolognani
NULL checks are performed implicitly in the rest of the module, including other allocations in the very same function. --- src/util/virhostdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 48a44bc..098207e 100644 -

[libvirt] [PATCH 06/24] tests: hostdev: Group test cases

2016-03-07 Thread Andrea Bolognani
Instead of considering each single step its own test case, create high level test cases that reproduce a certain scenario. --- tests/virhostdevtest.c | 119 - 1 file changed, 97 insertions(+), 22 deletions(-) diff --git a/tests/virhostdevtest.c b/te

[libvirt] [PATCH 08/24] hostdev: Remove false comment

2016-03-07 Thread Andrea Bolognani
--- src/util/virhostdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index adc4eec..5be61cd 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -727,9 +727,6 @@ virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,

[libvirt] [PATCH 23/24] hostdev: Use actual device when reattaching

2016-03-07 Thread Andrea Bolognani
Instead of forcing the values for the unbind_from_stub, remove_slot and reprobe properties, look up the actual device and use that when calling virPCIDeviceReattach(). This ensures the device is restored to its original state after reattach: for example, if it was not bound to any driver before de

[libvirt] [PATCH 11/24] hostdev: Remove redundant check

2016-03-07 Thread Andrea Bolognani
If 'last_processed_hostdev_vf != -1' is false then, since the loop counter 'i' starts at 0, 'i <= last_processed_hostdev_vf' can't possibly be true and the loop body will never be executed. Hence, the first check is completely redundant and can be safely removed. --- src/util/virhostdev.c | 3 +--

[libvirt] [PATCH 05/24] tests: hostdev: Add more checks on list size

2016-03-07 Thread Andrea Bolognani
Always call CHECK_LIST_COUNT() to check the size of both the active and inactive devices list. --- tests/virhostdevtest.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index c1321b1..8dc92f6 1

[libvirt] [PATCH 21/24] hostdev: Stop early if unmanaged devices have not been detached

2016-03-07 Thread Andrea Bolognani
Unmanaged devices, as the name suggests, are not detached automatically from the host by libvirt before being attached to a guest: it's the user's responsability to detach them manually beforehand. If that preliminary step has not been performed, the attach operation can't complete successfully. I

[libvirt] [PATCH 16/24] hostdev: Rename hostdev_mgr -> mgr

2016-03-07 Thread Andrea Bolognani
We're in the hostdev module, so mgr is not an ambiguous name, and in fact it's already used in some cases. Switch all the code over. Take the chance to shorten declaration of virHostdevIsPCINodeDeviceUsedData structures. --- src/util/virhostdev.c | 155 +---

[libvirt] [PATCH 22/24] hostdev: Streamline device ownership tracking

2016-03-07 Thread Andrea Bolognani
After this patch, ownership of virPCIDevice instances is very easy to keep track of: for each host PCI device, the only instance that actually matters is the one inside one of the bookkeeping list. Whenever some operation needs to be performed on a PCI device, the actual device is looked up first;

[libvirt] [PATCH 02/24] tests: hostdev: Use better variable names

2016-03-07 Thread Andrea Bolognani
Change the extremely generic count1 and count2 to the more descriptive active_count and inactive_count. --- tests/virhostdevtest.c | 82 +- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.

[libvirt] [PATCH 14/24] hostdev: Look up devices using IDs when possible

2016-03-07 Thread Andrea Bolognani
When we want to look up a device in a device list and we already have the IDs from another source, we can simply use virPCIDeviceListFindByIDs() instead of creating a temporary device object. --- src/util/virhostdev.c | 59 --- 1 file changed, 28 ins

Re: [libvirt] [PATCH] Fix minor typos in messages

2016-03-07 Thread Andrea Bolognani
r on   > Zanata. Are the translation moved into some new location? Unfortunately I don't have the answer to this question, but I'm sure someone else on the list will be able to explain what's going on... Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team -- lib

Re: [libvirt] [PATCH 10/24] hostdev: Remove explicit NULL checks

2016-03-08 Thread Andrea Bolognani
On Mon, 2016-03-07 at 22:03 -0500, Laine Stump wrote: > On 03/07/2016 12:24 PM, Andrea Bolognani wrote: > > > > NULL checks are performed implicitly in the rest of the module, > > including other allocations in the very same function. > > --- > >   src/util/virho

Re: [libvirt] [PATCH 03/24] tests: hostdev: Declare count inside CHECK_LIST_COUNT()

2016-03-08 Thread Andrea Bolognani
f someone adds a variable called "count" to a function that uses  > this macro. > > Otherwise ACK. I changed it to 'actualCount' before pushing, and explained the reason for the change in the commit message. 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 08/24] hostdev: Remove false comment

2016-03-08 Thread Andrea Bolognani
On Mon, 2016-03-07 at 22:02 -0500, Laine Stump wrote: > On 03/07/2016 12:24 PM, Andrea Bolognani wrote: > > > > --- > >   src/util/virhostdev.c | 3 --- > >   1 file changed, 3 deletions(-) > > > > diff --git a/src/util/virhostdev.c b/src/util/virhost

Re: [libvirt] [PATCH 06/24] tests: hostdev: Group test cases

2016-03-08 Thread Andrea Bolognani
On Mon, 2016-03-07 at 21:57 -0500, Laine Stump wrote: > On 03/07/2016 12:24 PM, Andrea Bolognani wrote: > >  > > Instead of considering each single step its own test case, create > > high level test cases that reproduce a certain scenario. > > --- > &g

Re: [libvirt] [PATCH 2/2] HACK: qemu: aarch64: Use virtio-pci if user specifies PCI controller

2016-03-09 Thread Andrea Bolognani
mber what a pcie-switch-downstream-port is. This still doesn't help when it comes to providing PCI or PCIe slots suitable for hotplugging: if you want to have three PCIe devices at startup and still be able to hotplug up to two PCIe devices later on, my understanding is that you would need t

Re: [libvirt] [PATCH 4/4] docs: generic.css: Indentation and spacing tweaks

2016-03-10 Thread Andrea Bolognani
On Wed, 2016-03-09 at 21:12 -0500, Cole Robinson wrote: > @@ -45,6 +49,8 @@ h1, h2, h3, h4, h5, h6 { >    margin: 0px; >    padding: 0px; >    margin-top: 0.5em; > +  margin-bottom: 0.5em; > +  border-bottom:1px solid #aaa;                    ^ Missing space here Cheers. --

[libvirt] [PATCH] docs: Don't use bold text in headers and menu items

2016-03-10 Thread Andrea Bolognani
Now that headers and menu items are using a bigger font and more generous spacing, they don't really need to be bold to stand out. --- This applies on top of Cole's series https://www.redhat.com/archives/libvir-list/2016-March/msg00323.html docs/apps.html.in | 2 +- docs/generic.css | 2 +-

Re: [libvirt] [PATCH 0/4] docs: website: improve readability

2016-03-10 Thread Andrea Bolognani
pdated as well to match the updated looks of the website. I've also posted a small follow-up patch to improve the style further:   https://www.redhat.com/archives/libvir-list/2016-March/msg00378.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 2/2] HACK: qemu: aarch64: Use virtio-pci if user specifies PCI controller

2016-03-10 Thread Andrea Bolognani
the world where aarch64 uses pci for > everything I think it's way too early to flip the switch and default to PCI addresses: my understanding is that guest OS support is expected to be spotty at best for at least a couple more years. Cheers. -- Andrea Bolognani Software Engineer

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