[libvirt] [PATCH 4/4] bhyve: Test cases for UEFI bhyvexml2argvtest

2016-06-29 Thread Fabian Freyer
--- tests/bhyvexml2argvdata/bhyvexml2argv-nouefi.args | 9 + .../bhyvexml2argvdata/bhyvexml2argv-nouefi.ldargs | 1 + tests/bhyvexml2argvdata/bhyvexml2argv-nouefi.xml | 23 ++ tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args| 10 ++

[libvirt] [PATCH 0/4] bhyve: UEFI bootrom support

2016-06-29 Thread Fabian Freyer
this series of patches adds support for specifying UEFI boot images for bhyve virtual machines. The old behaviour is kept; only when a loader pflash is specified the loader command is omitted and adds a bootrom parameter to the bhyverun command. Fabian Freyer (4): bhyve: Separate out checks

[libvirt] [PATCH 3/4] bhyve: add support for booting from UEFI

2016-06-29 Thread Fabian Freyer
--- src/bhyve/bhyve_command.c | 6 ++ src/bhyve/bhyve_driver.c | 27 +++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 9ad3f9b..a504788 100644 --- a/src/bhyve/bhyve_command.c +++

[libvirt] [PATCH 1/4] bhyve: Separate out checks from virBhyveProbeCaps

2016-06-29 Thread Fabian Freyer
At the moment this is just one check, but separating this out into a separate function makes checks more modular, allowing for more readable code once more checks are added. This also makes checks more easily testable. --- src/bhyve/bhyve_capabilities.c | 31 ++- 1

[libvirt] [PATCH 2/4] bhyve: virBhyveProbeCaps: BHYVE_CAP_LPC_BOOTROM

2016-06-29 Thread Fabian Freyer
Implement the BHACE_CAP_LPC_BOOTROM capability by checking the stderr output of 'bhyve -l bootrom'. If the bootrom option is unsupported, this will contain the following output: bhyve: invalid lpc device configuration 'bootrom' On newer bhyve versions that do support specifying a bootrom

[libvirt] [PATCH 1/1] perf: add more perf events support

2016-06-29 Thread Qiaowei Ren
With current perf framework, this patch adds support to more perf events, including cache missing, cache peference, cpu cycles, instrction, etc.. Signed-off-by: Qiaowei Ren --- docs/formatdomain.html.in | 24 +++ docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH] Introduce Smack security driver for Libvirt

2016-06-29 Thread Randy Aybar (raybar)
Hi Laine, My apologies for having submitted the patch all butchered :( . I’ll be sure to start a new thread using the git send-email command from our local repo to provide a cleaner output. Thanks, Randy On 6/29/16, 12:32, "sendmail on behalf of Laine Stump"

[libvirt] [PATCH] nodedev: Add retry logic to read fibre channel files

2016-06-29 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1319544 During processing of a vport_create event, udevEventHandleCallback will call udevProcessSCSIHost to read the fibre channel configuration files for wwpn, wwpn, and fabric_wwn; however, as it turns out those files may not have valid data. Rather

[libvirt] [PATCH 4/5] qemu: Make QEMU_DRIVE_HOST_PREFIX more private

2016-06-29 Thread John Ferlan
Move QEMU_DRIVE_HOST_PREFIX into the qemu_alias.c to disuade future callers from using it. Create qemuAliasDeviceDiskDriveSkipPrefix in order to handle the current consumers that desire to check if an alias has the drive- prefix and "get beyond it" in order to get the disk alias. Signed-off-by:

[libvirt] [PATCH 5/5] qemu: Add attempt to call qemuMonitorDriveDel for USB failure path

2016-06-29 Thread John Ferlan
Similar to the other disk types, add the qemuMonitorDriveDel in the failure to add/hotplug a USB. Added a couple of other formatting changes just to have a less cluttered look Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 21 + 1 file changed,

[libvirt] [PATCH 2/5] qemu: Move drive alias processing to qemu_alias

2016-06-29 Thread John Ferlan
Move qemuDeviceDriveHostAlias from qemu_command and rename to qemuAssignDeviceDiskDriveAlias in qemu_alias. Also change the parameter to just be the disk->info.alias (e.g. srcalias) Includes some innocent bystanders that seem to need QEMU_DRIVE_HOST_PREFIX which requires include qemu_alias.h

[libvirt] [PATCH 3/5] qemu: Use qemuAssignDeviceDiskDriveAlias

2016-06-29 Thread John Ferlan
Rather than open code build the drive alias command in multiple places, use the helper to ensure consistency. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 12 ++-- src/qemu/qemu_driver.c | 3 +-- src/qemu/qemu_hotplug.c | 3 +--

[libvirt] [PATCH 0/5] Some USB hotplug and alias cleanups

2016-06-29 Thread John Ferlan
A post 2.0.0 type adjustment... While answering a question for bz 1289391 regarding the USB path - I figured that making the code be more the virtio and scsi code paths would at least have a better look'n'feel. Then I tripped in to the alias morass and cleaned that up a bit too. John Ferlan

[libvirt] [PATCH 1/5] qemu: Reorder qemuDomainAttachUSBMassStorageDevice failure path

2016-06-29 Thread John Ferlan
Modify the error/exit path to match what was done for Virtio and SCSI. If nothing else it'll have a consistent look'n'feel Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 39 ++- 1 file changed, 22 insertions(+), 17 deletions(-)

[libvirt] [PATCH] docs: remove outdated suggestion to make patches with "diff -urp" or "git diff"

2016-06-29 Thread Laine Stump
I can't think of any good reason to do either of those, and having the examples there will just lead to unusable patch emails from people who can't be bothered to read the entire page. --- I'm sure there are other problems with this file, but this one really jupmed out at me when I was suggesting

Re: [libvirt] [PATCH] Introduce Smack security driver for Libvirt

2016-06-29 Thread Laine Stump
On 06/29/2016 02:44 PM, Randy Aybar (raybar) wrote: Hi Daniel, Just a gentle reminder that we’ve replied to your comments and awaiting further feedback. The patch that was attached to that email wasn't complete and couldn't be applied - it had no header, simply beginning with the letter "I"

Re: [libvirt] [PATCH 0/2] option to disable default gateway in IPv6 RA

2016-06-29 Thread Laine Stump
On 06/29/2016 10:17 AM, Maxim Perevedentsev wrote: In case of DHCPv6 in isolated network, we start dnsmasq which sends Router Advertisements (RA). If RA containts no gateway then the link-local address of the source of RA is considered a gateway (and guest installs a corresponding default

Re: [libvirt] [PATCH 0/8] Fix build with clang

2016-06-29 Thread Andrea Bolognani
On Wed, 2016-06-29 at 15:53 +0200, Ján Tomko wrote: > I am not proud of the first patch. >  > I wrote the temporary bump for -Wframe-larger-than thinking > splitting it out would be too intrusive for the freeze, but > it did not turn out so bad. >  > Patch 7/8 does not fix anything. >  > Ján Tomko

[libvirt] [PATCH] vz: fixed null-pointer dereference in applying graphic params

2016-06-29 Thread Olga Krishtal
Signed-off-by: Olga Krishtal --- src/vz/vz_sdk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f4c2b3b..848bfb9 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2790,6 +2790,7 @@ static int

[libvirt] [PATCH] vz: fix

2016-06-29 Thread Olga Krishtal
Please, ignore previous patch. Olga Krishtal (1): vz: fixed null-pointer dereference in applying graphic params src/vz/vz_sdk.c | 1 + 1 file changed, 1 insertion(+) -- 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] vz: fixed null-pointer dereference in applying graphic params

2016-06-29 Thread Olga Krishtal
Signed-off-by: Olga Krishtal --- src/vz/vz_sdk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f4c2b3b..903440b 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2790,6 +2790,7 @@ static int

Re: [libvirt] Availability of libvirt-2.0.0-rc2

2016-06-29 Thread Daniel P. Berrange
On Wed, Jun 29, 2016 at 06:16:02PM +0200, Jean-Marc Liger wrote: > Hi, > > Again EL6 won't build if you don't update the specfile as below : > > %if 0%{?rhel} && 0%{?rhel} < 7 > BuildRequires: libnl-devel > %else > BuildRequires: libnl3-devel > %endif Thanks for pointing this out. I've pushed

[libvirt] [libvirt-php PATCH 3/4] implement libvirt_domain_send_key_api

2016-06-29 Thread Dawid Zamirski
This patch adds libvirt_domain_send_key_api which calls to virDomainSendKey libvirt API function to send key press events to a domain. The PHP bindings already have libvirt_domain_send_keys function which uses VNC to provide similar functionality but that has limited use cases and depends on a

[libvirt] [libvirt-php PATCH 0/4] Add more API bindings.

2016-06-29 Thread Dawid Zamirski
This patch series adds more libvirt API bindings to libvirt-php. The first patch in the series is a repost of: https://www.redhat.com/archives/libvir-list/2014-May/msg00021.html Dawid Zamirski (4): implement libvirt_node_get_free_memory implement xml_to_native and xml_from_native implement

[libvirt] [libvirt-php PATCH 4/4] implement bindings for attaching/detaching devices

2016-06-29 Thread Dawid Zamirski
Provides PHP bindings to libvirt's virDomainAttachDeviceFlags and virDomainDetachDeviceFlags APIs. --- src/libvirt-php.c | 70 --- src/libvirt-php.h | 2 ++ 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/src/libvirt-php.c

[libvirt] [libvirt-php PATCH 2/4] implement xml_to_native and xml_from_native

2016-06-29 Thread Dawid Zamirski
From: Dawid Zamirski This patch implements virConnectDomainXMLFromNative and virConnectDomainXMLToNative in libvirt PHP bindings. The PHP functions are called libvirt_domain_xml_from_native and libvirt_domain_xml_to_native respectively. --- src/libvirt-php.c | 80

[libvirt] [libvirt-php PATCH 1/4] implement libvirt_node_get_free_memory

2016-06-29 Thread Dawid Zamirski
From: Dawid Zamirski This patch adds support for virNodeGetFreeMemory which is available in libvirt since v0.3.3. While the php bindings alredy provide libvirt_node_get_mem_stats from which such info could be obtained, not all hypervisors support it, e.g. vbox and esx

Re: [libvirt] Availability of libvirt-2.0.0-rc2

2016-06-29 Thread Jean-Marc Liger
Hi, Again EL6 won't build if you don't update the specfile as below : %if 0%{?rhel} && 0%{?rhel} < 7 BuildRequires: libnl-devel %else BuildRequires: libnl3-devel %endif Jean-Marc Le 29/06/2016 17:31, Daniel Veillard a écrit : So as planned I just pushed signed tarball and rpms and

Re: [libvirt] question about PCI new_id sysfs interface

2016-06-29 Thread Daniel P. Berrange
On Wed, Jun 29, 2016 at 08:00:22AM -0600, Alex Williamson wrote: > On Wed, 29 Jun 2016 09:47:55 +0100 > "Daniel P. Berrange" wrote: > > > On Tue, Jun 28, 2016 at 02:30:47PM -0400, Bandan Das wrote: > > > "Daniel P. Berrange" writes: > > > > > > >

[libvirt] Availability of libvirt-2.0.0-rc2

2016-06-29 Thread Daniel Veillard
So as planned I just pushed signed tarball and rpms and tagged the Release Candidate 2 in git, it's available from the usual place: ftp://libvirt.org/libvirt/ The rc2 seems to work for me with my limited testing, no problem, but please continue to test the candidate code. I will try to

[libvirt] Creating external snapshots with logical volumes.

2016-06-29 Thread Dominique Ramaekers
Hi, I've already asked this question on the libvirt-users mailing list but got no answer. I think because the answer to my question is not obvious. I hope I get some help here... Currently, for making backups of my guests, I use external snapshots like this: A) virsh snapshot-create-as

[libvirt] [PATCH 1/2] dnsmasq: add option to disable IPv6 default gateway in RA

2016-06-29 Thread Maxim Perevedentsev
If no gateway is specified in RA the a guest will install a default route to link-local address of the source of RA (in this case, virbr*), which may disturb guest's networking e.g. if the 'expected' default route is through another interface. This patch adds an attribute 'ipv6noDefRoute=yes|no'

[libvirt] [PATCH 0/2] option to disable default gateway in IPv6 RA

2016-06-29 Thread Maxim Perevedentsev
In case of DHCPv6 in isolated network, we start dnsmasq which sends Router Advertisements (RA). If RA containts no gateway then the link-local address of the source of RA is considered a gateway (and guest installs a corresponding default route). If a guest has two network interfaces (public and

[libvirt] [PATCH 2/2] docs: add ipv6noDefRoute to schema and html.

2016-06-29 Thread Maxim Perevedentsev
--- docs/formatnetwork.html.in | 15 ++- docs/schemas/network.rng | 5 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index 1cea931..e710f25 100644 --- a/docs/formatnetwork.html.in +++

Re: [libvirt] [PATCH] virt-admin: Call virInitialize to fix startup crash

2016-06-29 Thread Erik Skultety
On 29/06/16 14:22, Cole Robinson wrote: > On 06/29/2016 03:34 AM, Erik Skultety wrote: >> On 27/06/16 20:28, Cole Robinson wrote: >>> Similar to what virsh and virt-login-shell do >>> >>> https://bugzilla.redhat.com/show_bug.cgi?id=1350315 >>> --- >>> I can't actually reproduce the bug, the

Re: [libvirt] [PATCH] qemu: Let empty default VNC password work as documented

2016-06-29 Thread Daniel P. Berrange
On Wed, Jun 29, 2016 at 04:18:03PM +0200, Jiri Denemark wrote: > On Wed, Jun 29, 2016 at 14:47:23 +0100, Daniel P. Berrange wrote: > > On Tue, Jun 28, 2016 at 02:45:15PM +0200, Jiri Denemark wrote: > > > Setting an empty vnc_password in qemu.conf is documented as a way to > > > disable VNC access,

Re: [libvirt] [PATCH] qemu: Let empty default VNC password work as documented

2016-06-29 Thread Jiri Denemark
On Wed, Jun 29, 2016 at 14:47:23 +0100, Daniel P. Berrange wrote: > On Tue, Jun 28, 2016 at 02:45:15PM +0200, Jiri Denemark wrote: > > Setting an empty vnc_password in qemu.conf is documented as a way to > > disable VNC access, but QEMU does not seem to behave like that. Let's > > enforce the

Re: [libvirt] question about PCI new_id sysfs interface

2016-06-29 Thread Alex Williamson
On Wed, 29 Jun 2016 09:47:55 +0100 "Daniel P. Berrange" wrote: > On Tue, Jun 28, 2016 at 02:30:47PM -0400, Bandan Das wrote: > > "Daniel P. Berrange" writes: > > > > > Adding Alex & Bandan, since they signed off the kernel patch which > > > I'm

Re: [libvirt] [PATCH] qemu: Use proper async job to refresh virtio channels

2016-06-29 Thread Ján Tomko
On Wed, Jun 29, 2016 at 03:53:46PM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 9 ++--- src/qemu/qemu_process.h | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) ACK Jan --

[libvirt] [PATCH 7/8] test/Makefile.am: drop WARN_CFLAGS from LDFLAGS

2016-06-29 Thread Ján Tomko
Introduced by commit 0832c58, with the intention to link with the stack protector library. Not needed because per commit 71b54636, automake should pass all the CFLAGS to the linker. --- tests/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am

[libvirt] [PATCH 6/8] Temporarily bump maximum stack size

2016-06-29 Thread Ján Tomko
It seems clang computes this differently because over 23000 is needed to build cputest. --- m4/virt-compile-warnings.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 661d60b..b72dfb3 100644 ---

[libvirt] [PATCH 3/8] build: disable -Wdouble-promotion

2016-06-29 Thread Ján Tomko
This causes problem with clang 3.8 and the isnan macro: util/virxml.c:153:166: error: implicit conversion increases floating-point precision: 'double' to 'long double' [-Werror,-Wdouble-promotion] ((sizeof (obj->floatval) == sizeof (float) ? __isnanf (obj->floatval) : sizeof (obj->floatval) ==

[libvirt] [PATCH 1/8] virFirewallAddRule: exchange first two parameters

2016-06-29 Thread Ján Tomko
clang 3.8 complains: util/virfirewall.c:425:30: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] __builtin_va_start(args, layer); Exchange the parameters to have a pointer as the last argument. --- Alternatives: *

[libvirt] [PATCH 2/8] virTypedParamsValidate: do not use STREQ_NULLABLE

2016-06-29 Thread Ján Tomko
The field cannot be non-NULL. Only check last_name for NULL to make clang happy: util/virtypedparam.c:109:104: error: address of array 'sorted[i].field' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if (((last_name) ? (sorted[i].field) && (strcmp((last_name)

[libvirt] [PATCH 8/8] Split out -Wframe-larger-than warning from WARN_CLFAGS

2016-06-29 Thread Ján Tomko
Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code and the test code. --- daemon/Makefile.am | 3 +++ m4/virt-compile-warnings.m4 | 4 ++-- src/Makefile.am | 1 + tests/Makefile.am | 2 ++ 4

[libvirt] [PATCH 5/8] Introudce VIR_WARNINGS_NO_UNUSED_VALUE

2016-06-29 Thread Ján Tomko
Use it around virAtomicIntDecAndTest and virAtomicIntAdd which give a warning when building with clang 3.8. --- src/internal.h | 5 + src/util/viratomic.h | 7 +++ 2 files changed, 12 insertions(+) diff --git a/src/internal.h b/src/internal.h index 0dc34c7..e4c20de 100644 ---

[libvirt] [PATCH 4/8] build: ignore some clang-specific warnings

2016-06-29 Thread Ján Tomko
These cause build errors with clang 3.8. Disable: -Wunevaluated-expression, * problems with VIR_TYPEMATCH -Wparentheses-equality, * we don't want to delete parentheses from macros -Waddress-of-packed-member * virNWFilterSnoopDHCP violates -Wtautological-pointer-compare *

[libvirt] [PATCH] qemu: Use proper async job to refresh virtio channels

2016-06-29 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 ++- src/qemu/qemu_process.c | 9 ++--- src/qemu/qemu_process.h | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt] [PATCH 0/8] Fix build with clang

2016-06-29 Thread Ján Tomko
I am not proud of the first patch. I wrote the temporary bump for -Wframe-larger-than thinking splitting it out would be too intrusive for the freeze, but it did not turn out so bad. Patch 7/8 does not fix anything. Ján Tomko (8): virFirewallAddRule: exchange first two parameters

Re: [libvirt] [PATCH 2/2] vz: support filesystem type volume

2016-06-29 Thread Olga Krishtal
On 23/06/16 16:56, Nikolay Shirokovskiy wrote: On 08.04.2016 19:39, Olga Krishtal wrote: Vz containers are able to use ploop volumes from storage pools to work upon. To use filesystem type volume, pool name and volume name should be specifaed in Signed-off-by: Olga Krishtal

Re: [libvirt] [PATCH] qemu: Let empty default VNC password work as documented

2016-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2016 at 02:45:15PM +0200, Jiri Denemark wrote: > Setting an empty vnc_password in qemu.conf is documented as a way to > disable VNC access, but QEMU does not seem to behave like that. Let's > enforce the behavior by setting password expiration to "now". > > Note, this has no

[libvirt] [PATCH] qemu: bugfix: don't fail if disk media removed on second attempt

2016-06-29 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_hotplug.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index e0b8230..5bbfb5e 100644 --- a/src/qemu/qemu_hotplug.c +++

Re: [libvirt] [PATCH] virt-admin: Call virInitialize to fix startup crash

2016-06-29 Thread Cole Robinson
On 06/29/2016 03:34 AM, Erik Skultety wrote: > On 27/06/16 20:28, Cole Robinson wrote: >> Similar to what virsh and virt-login-shell do >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1350315 >> --- >> I can't actually reproduce the bug, the backtrace is similar to >> 97973ebb7 which added the

[libvirt] RFC: disk tray opened event and changing media API cooperation

2016-06-29 Thread Nikolay Shirokovskiy
Hi, all. I want to remove media if disk is ejected from guest. I can leverage tray opened event for it but this event generated if i change media thru API call too. Thus I can't just remove media on any such event. However it would be possible if libvirt do not propagate tray opened event that

Re: [libvirt] [PATCH] util: swap After/Before clauses in virSystemdCreateMachine

2016-06-29 Thread Daniel P. Berrange
On Wed, Jun 29, 2016 at 03:15:44AM -0700, Quentin Machu wrote: > An unexpected behavior in systemd has been introduced between the versions > 225 and 229: when non-existing units are specified in After/Before clauses, > systemd fails if the After clause is listed first. What is expected is that >

[libvirt] [PATCH] util: swap After/Before clauses in virSystemdCreateMachine

2016-06-29 Thread Quentin Machu
An unexpected behavior in systemd has been introduced between the versions 225 and 229: when non-existing units are specified in After/Before clauses, systemd fails if the After clause is listed first. What is expected is that systemd simply ignores these clauses. Because the After clause is

Re: [libvirt] [libvirt-test-API][PATCH] Modify makefile to add check option.

2016-06-29 Thread Liping Cheng
ACK Liping - Original Message - From: "Ruifeng Bian" To: libvir-list@redhat.com Cc: "Ruifeng Bian" Sent: Wednesday, June 29, 2016 5:01:26 PM Subject: [libvirt] [libvirt-test-API][PATCH] Modify makefile to add check option. Use inspektor to

Re: [libvirt] [PATCH] virt-admin: Call virInitialize to fix startup crash

2016-06-29 Thread Martin Kletzander
On Wed, Jun 29, 2016 at 09:34:21AM +0200, Erik Skultety wrote: On 27/06/16 20:28, Cole Robinson wrote: Similar to what virsh and virt-login-shell do https://bugzilla.redhat.com/show_bug.cgi?id=1350315 --- I can't actually reproduce the bug, the backtrace is similar to 97973ebb7 which added the

[libvirt] [libvirt-test-API][PATCH] Modify makefile to add check option.

2016-06-29 Thread Ruifeng Bian
Use inspektor to check code style. Change-Id: I8c238c785f8e5dbd585379cad0d4687d0d5b5ce2 Signed-off-by: Ruifeng Bian --- Makefile| 3 +++ selftests/check | 15 +++ 2 files changed, 18 insertions(+) create mode 100755 selftests/check diff --git a/Makefile

Re: [libvirt] question about PCI new_id sysfs interface

2016-06-29 Thread Daniel P. Berrange
On Tue, Jun 28, 2016 at 02:30:47PM -0400, Bandan Das wrote: > "Daniel P. Berrange" writes: > > > Adding Alex & Bandan, since they signed off the kernel patch which > > I'm thinking either pci-back should be made to work more like > > vfio, or the kernel patch should be

Re: [libvirt] [PATCH] Fix possible invalid read in adminClientGetInfo

2016-06-29 Thread Erik Skultety
On 29/06/16 07:10, Ján Tomko wrote: > virNetServerClientGetInfo returns the client's remote address > as a string, which is a part of the client object. > > Use VIR_STRDUP to make a copy which can be freely accessed > even after the virNetServerClient object is unlocked. Although you're right,

Re: [libvirt] [PATCH 0/2] qemu: Use bootindex whenever possible

2016-06-29 Thread Ján Tomko
On Tue, Jun 28, 2016 at 11:17:33PM +0200, Jiri Denemark wrote: Jiri Denemark (2): qemu: Use bootindex whenever possible qemu: Drop emitBootindex parameter src/qemu/qemu_command.c| 89 ++ .../qemuxml2argv-boot-menu-enable-bootindex.args | 23

Re: [libvirt] [PATCH 2/2] qemu: Drop emitBootindex parameter

2016-06-29 Thread Ján Tomko
On Wed, Jun 29, 2016 at 09:20:05AM +0200, Jiri Denemark wrote: On Wed, Jun 29, 2016 at 08:32:50 +0200, Ján Tomko wrote: On Tue, Jun 28, 2016 at 11:17:35PM +0200, Jiri Denemark wrote: >Signed-off-by: Jiri Denemark >--- > src/qemu/qemu_command.c | 75

Re: [libvirt] [PATCH] virt-admin: Call virInitialize to fix startup crash

2016-06-29 Thread Erik Skultety
On 27/06/16 20:28, Cole Robinson wrote: > Similar to what virsh and virt-login-shell do > > https://bugzilla.redhat.com/show_bug.cgi?id=1350315 > --- > I can't actually reproduce the bug, the backtrace is similar to > 97973ebb7 which added the same fix for virt-login-shell, and > that commit also

Re: [libvirt] [PATCH 2/2] qemu: Drop emitBootindex parameter

2016-06-29 Thread Jiri Denemark
On Wed, Jun 29, 2016 at 08:32:50 +0200, Ján Tomko wrote: > On Tue, Jun 28, 2016 at 11:17:35PM +0200, Jiri Denemark wrote: > >Signed-off-by: Jiri Denemark > >--- > > src/qemu/qemu_command.c | 75 > > ++--- > > 1 file changed, 34

[libvirt] [PATCH 2/4] hvsupport: drop XML::XPath

2016-06-29 Thread Ján Tomko
Doing an XPath query for every single 'function' element in the file is inefficient. Since the XML file is generated by another of our build scripts (apibuild.py, using Python's standard 'output.write' XML library), just find the function name->file mapping by a regex upfront. --- bootstrap.conf

[libvirt] [PATCH 3/4] hvsupport: construct regex up front

2016-06-29 Thread Ján Tomko
This lets perl cache the regex. Even though there are only eight groups, the speedup is more than that. --- docs/hvsupport.pl | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl index 80a6f80..31821ad

[libvirt] [PATCH 4/4] hvsupport: skip non-matching lines early

2016-06-29 Thread Ján Tomko
This speeds up the whole script almost twice. --- docs/hvsupport.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl index 31821ad..8b2f8c6 100755 --- a/docs/hvsupport.pl +++ b/docs/hvsupport.pl @@ -209,6 +209,7 @@ foreach my $src (@srcs) { my $impl;

[libvirt] [PATCH 0/4] Speed up hvsupport.pl

2016-06-29 Thread Ján Tomko
This reduces the script execution time from 14.7s to 60 ms. Since this was by far the longest taking target from the docs/ directory and make does not parallelize across Makefiles, the savings are similar for a complete build from a fresh git checkout. The second patch shaves off 8.2s, the third

[libvirt] [PATCH 1/4] hvsupport: Introduce parseSymsFile

2016-06-29 Thread Ján Tomko
The code for parsing the different public syms files only differs in the filenames and version prefix. Unify it to a single subroutine. --- docs/hvsupport.pl | 168 -- 1 file changed, 50 insertions(+), 118 deletions(-) diff --git

Re: [libvirt] [PATCH 2/2] qemu: Drop emitBootindex parameter

2016-06-29 Thread Ján Tomko
On Tue, Jun 28, 2016 at 11:17:35PM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- src/qemu/qemu_command.c | 75 ++--- 1 file changed, 34 insertions(+), 41 deletions(-) @@ -8030,7 +8025,7 @@

Re: [libvirt] [PATCH] conf: Allocate structure for 'perf' events in virDomainDefNew

2016-06-29 Thread Peter Krempa
On Wed, Jun 29, 2016 at 08:07:29 +0200, Ján Tomko wrote: > On Tue, Jun 28, 2016 at 02:43:59PM +0200, Peter Krempa wrote: > >Some code paths already assume that it is allocated since it was always > >allocated by virDomainPerfDefParseXML. Move allocation to > > Shouldn't we rather fix those code

Re: [libvirt] [PATCH] conf: Allocate structure for 'perf' events in virDomainDefNew

2016-06-29 Thread Ján Tomko
On Tue, Jun 28, 2016 at 02:43:59PM +0200, Peter Krempa wrote: Some code paths already assume that it is allocated since it was always allocated by virDomainPerfDefParseXML. Move allocation to Shouldn't we rather fix those code paths? virDomainDefNew would get ridiculously long if we started