[libvirt] [PATCH v2] maint: Switch to xz compressed PAX release archives
by Andrea Bolognani
This allows us to produce releases that are roughly a third in
size, have no limitation on path length, and are still readable
by all supported platforms.
---
Changes from [v1]:
* Update all references to .tar.gz, including spec files,
scripts and documentation (thanks Dan)
* Fix typo lenght -> length (thanks Ján)
[v1] https://www.redhat.com/archives/libvir-list/2016-June/msg00974.html
.gitignore | 2 +-
Makefile.am | 2 +-
autobuild.sh | 2 +-
configure.ac | 2 +-
docs/compiling.html.in | 2 +-
docs/downloads.html.in | 4 ++--
libvirt.spec.in | 2 +-
mingw-libvirt.spec.in | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7fd9963..39c0423 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,7 +88,7 @@
/gnulib/tests/*
/include/libvirt/libvirt-common.h
/libtool
-/libvirt-*.tar.gz
+/libvirt-*.tar.xz
/libvirt-[0-9]*
/libvirt*.pc
/libvirt.spec
diff --git a/Makefile.am b/Makefile.am
index da07e6c..4b4aad3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,7 +63,7 @@ $(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
> $@-t && mv $@-t $@ ; fi;
rpm: clean
- @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
+ @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
check-local: all tests
diff --git a/autobuild.sh b/autobuild.sh
index 4d9f616..2143479 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -56,7 +56,7 @@ exec 3>&-
test "$st" = 0
test -x /usr/bin/lcov && make cov
-rm -f *.tar.gz
+rm -f *.tar.xz
make dist
if test -n "$AUTOBUILD_COUNTER" ; then
diff --git a/configure.ac b/configure.ac
index 0114149..7d16e5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ AH_BOTTOM([#include <config-post.h>])
AC_CONFIG_MACRO_DIR([m4])
dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep
dnl quiet about the fact that we intentionally cater to automake 1.9
-AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-pax no-dist-gzip dist-xz subdir-objects])
dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
dnl we don't really need the 'u' even in older toolchains. Then there is
dnl older libtool, which spelled it AR_FLAGS
diff --git a/docs/compiling.html.in b/docs/compiling.html.in
index aff5487..d2a3f15 100644
--- a/docs/compiling.html.in
+++ b/docs/compiling.html.in
@@ -13,7 +13,7 @@
</p>
<pre>
- $ gunzip -c libvirt-x.x.x.tar.gz | tar xvf -
+ $ xz -c libvirt-x.x.x.tar.xz | tar xvf -
$ cd libvirt-x.x.x
$ ./configure</pre>
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index f213b29..1a3400a 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -28,8 +28,8 @@
</p>
<ul>
- <li><a href="ftp://libvirt.org/libvirt/libvirt-git-snapshot.tar.gz">libvirt.org FTP server</a></li>
- <li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.gz">libvirt.org HTTP server</a></li>
+ <li><a href="ftp://libvirt.org/libvirt/libvirt-git-snapshot.tar.xz">libvirt.org FTP server</a></li>
+ <li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.xz">libvirt.org HTTP server</a></li>
</ul>
<h2><a name="schedule">Primary release schedule</a></h2>
diff --git a/libvirt.spec.in b/libvirt.spec.in
index ee6162e..6b3e888 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -225,7 +225,7 @@ URL: http://libvirt.org/
%if %(echo %{version} | grep -o \\. | wc -l) == 3
%define mainturl stable_updates/
%endif
-Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
+Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index 6f95832..e808839 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -30,7 +30,7 @@ Summary: MinGW Windows libvirt virtualization library
License: LGPLv2+
Group: Development/Libraries
URL: http://libvirt.org/
-Source0: ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
+Source0: ftp://libvirt.org/libvirt/libvirt-%{version}.tar.xz
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw64-filesystem >= 95
--
2.5.5
8 years, 6 months
[libvirt] [PATCH] qemu: Don't use legacy USB for aarch64 mach-virt guests
by Andrea Bolognani
The '-usb' option doesn't have any effect for aarch64 mach-virt
guests, so the fact that it's currently enabled by default is not
really causing any issue.
However, that might change in the future (although unlikely), and
having it as part of the QEMU command line can cause confusion to
someone looking through the process list.
Avoid it completely, like it's already happening for q35.
---
This requires
https://www.redhat.com/archives/libvir-list/2016-June/msg01157.html
to apply cleanly, but it's not really related. Applying it
on top of master instead should just be a matter of fixing
a few trivial merge conflicts in the test suite.
CC:ing Drew for extra assurance that doing this is indeed
completely safe :)
src/qemu/qemu_command.c | 1 +
tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args | 3 +--
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args | 3 +--
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args | 3 +--
tests/qemuxml2argvdata/qemuxml2argv-aarch64-kvm-32-on-64.args | 1 -
.../qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args | 1 -
.../qemuxml2argv-aarch64-virtio-pci-manual-addresses.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-arm-virt-virtio.args | 1 -
tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args | 1 -
14 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4a8def1..6944129 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2875,6 +2875,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
if (usbcontroller == 0 &&
!qemuDomainMachineIsQ35(def) &&
+ !qemuDomainMachineIsVirt(def) &&
!ARCH_IS_S390(def->os.arch))
virCommandAddArg(cmd, "-usb");
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args
index 3f05dfb..1de2ecf 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args
@@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
-device virtio-serial-device,id=virtio-serial0 \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args
index 4ae3923..b394066 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-cpu-passthrough.args
@@ -17,6 +17,5 @@ QEMU_AUDIO_DRV=none \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \
-boot c \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args
index 61ee5af..a16b8b6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args
@@ -16,5 +16,4 @@ QEMU_AUDIO_DRV=none \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \
-no-acpi \
--boot c \
--usb
+-boot c
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
index d3ac955..031a31e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
@@ -16,5 +16,4 @@ QEMU_AUDIO_DRV=none \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \
-no-acpi \
--boot c \
--usb
+-boot c
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
index 27fa1f5..f078fd8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
@@ -16,5 +16,4 @@ QEMU_AUDIO_DRV=none \
-nodefaults \
-monitor unix:/tmp/lib/domain--1-aarch64test/monitor.sock,server,nowait \
-no-acpi \
--boot c \
--usb
+-boot c
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-kvm-32-on-64.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-kvm-32-on-64.args
index 23bb517..284aacf 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-kvm-32-on-64.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-kvm-32-on-64.args
@@ -20,7 +20,6 @@ QEMU_AUDIO_DRV=none \
-kernel /arm.kernel \
-initrd /arm.initrd \
-append 'console=ttyAMA0,115200n8 rw root=/dev/vda rootwait physmap.enabled=0' \
--usb \
-drive file=/arm.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args
index 3e6bee9..6c2a908 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-2.6-virtio-pci-default.args
@@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
-device virtio-serial-device,id=virtio-serial0 \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args
index 06a4733..ab45209 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args
@@ -20,6 +20,5 @@ QEMU_AUDIO_DRV=none \
-kernel /aarch64.kernel \
-initrd /aarch64.initrd \
-append console=ttyAMA0 \
--usb \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
-net user,vlan=0,name=hostnet0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args
index 566bee2..1ed5462 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args
@@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
-device virtio-serial-device,id=virtio-serial0 \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args
index 566bee2..1ed5462 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args
@@ -22,7 +22,6 @@ QEMU_AUDIO_DRV=none \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
-device virtio-serial-device,id=virtio-serial0 \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args
index 4e5dbdb..8245854 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-manual-addresses.args
@@ -25,7 +25,6 @@ QEMU_AUDIO_DRV=none \
-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
-device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.1,addr=0x1 \
-device virtio-scsi-pci,id=scsi0,bus=pci.3,addr=0x1 \
--usb \
-drive file=/aarch64.raw,format=raw,if=none,id=drive-scsi0-0-0-0 \
-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,\
id=scsi0-0-0-0 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-arm-virt-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-arm-virt-virtio.args
index c736f60..d3e8efc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-arm-virt-virtio.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-arm-virt-virtio.args
@@ -21,7 +21,6 @@ QEMU_AUDIO_DRV=none \
-append 'console=ttyAMA0,115200n8 rw root=/dev/vda rootwait physmap.enabled=0' \
-dtb /arm.dtb \
-device virtio-serial-device,id=virtio-serial0 \
--usb \
-drive file=/arm.raw,format=raw,if=none,id=drive-virtio-disk0 \
-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \
-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args
index 0fd9107..42709c5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-mmio-deflate.args
@@ -21,5 +21,4 @@ QEMU_AUDIO_DRV=none \
-initrd /aarch64.initrd \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
--usb \
-device virtio-balloon-device,id=balloon0,deflate-on-oom=on
--
2.5.5
8 years, 6 months
Re: [libvirt] [PATCH v2 3/3] KVM: VMX: enable guest access to LMCE related MSRs
by Eduardo Habkost
On Thu, Jun 16, 2016 at 12:04:50PM +0200, Paolo Bonzini wrote:
> On 16/06/2016 08:05, Haozhong Zhang wrote:
> > From: Ashok Raj <ashok.raj(a)intel.com>
> >
> > On Intel platforms, this patch adds LMCE to KVM MCE supported
> > capabilities and handles guest access to LMCE related MSRs.
> >
> > Signed-off-by: Ashok Raj <ashok.raj(a)intel.com>
> > [Haozhong: macro KVM_MCE_CAP_SUPPORTED => variable kvm_mce_cap_supported
> > Only enable LMCE on Intel platform
> > Check MSR_IA32_FEATURE_CONTROL when handling guest
> > access to MSR_IA32_MCG_EXT_CTL]
> > Signed-off-by: Haozhong Zhang <haozhong.zhang(a)intel.com>
[...]
> > @@ -6433,6 +6455,8 @@ static __init int hardware_setup(void)
> >
> > kvm_set_posted_intr_wakeup_handler(wakeup_handler);
> >
> > + kvm_mce_cap_supported |= MCG_LMCE_P;
>
> Ah, so virtual LMCE is available on all processors! This is
> interesting, but it also makes it more complicated to handle in QEMU; a
> new QEMU generally doesn't require a new kernel.
>
> Eduardo, any ideas?
(CCing libvirt list)
As we shouldn't make machine-type changes introduce new host
requirements, it looks like we need to either add a new set of
CPU models (unreasonable), or expect management software to
explicitly enable LMCE after ensuring the host supports it.
Or we could wait for a reasonable time after the feature is
available in the kernel, and declare that QEMU as a whole
requires a newer kernel. But how much time would be reasonable
for that?
Long term, I believe we should think of a better solution. I
don't think it is reasonable to require new libvirt code to be
written for every single low-level feature that requires a newer
kernel or newer host hardware. Maybe new introspection interfaces
that would allow us to drop the "no new requirements on
machine-type changes" rule?
--
Eduardo
8 years, 6 months
[libvirt] [PATCH] qemu_hotplug: Use a helper variable consistently
by Tomasz Flendrich
---
src/qemu/qemu_hotplug.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 9aca853..f695903 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1305,7 +1305,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
char *charAlias = NULL;
char *devstr = NULL;
- if (qemuAssignDeviceRedirdevAlias(vm->def, redirdev, -1) < 0)
+ if (qemuAssignDeviceRedirdevAlias(def, redirdev, -1) < 0)
goto cleanup;
if (virAsprintf(&charAlias, "char%s", redirdev->info.alias) < 0)
@@ -1314,7 +1314,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
if (!(devstr = qemuBuildRedirdevDevStr(def, redirdev, priv->qemuCaps)))
goto cleanup;
- if (VIR_REALLOC_N(vm->def->redirdevs, vm->def->nredirdevs+1) < 0)
+ if (VIR_REALLOC_N(def->redirdevs, def->nredirdevs+1) < 0)
goto cleanup;
qemuDomainObjEnterMonitor(driver, vm);
@@ -1335,7 +1335,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
if (qemuDomainObjExitMonitor(driver, vm) < 0)
goto audit;
- vm->def->redirdevs[vm->def->nredirdevs++] = redirdev;
+ def->redirdevs[def->nredirdevs++] = redirdev;
ret = 0;
audit:
virDomainAuditRedirdev(vm, redirdev, "attach", ret == 0);
@@ -1514,7 +1514,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
if (rc == 1)
need_release = true;
- if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0)
+ if (qemuBuildChrDeviceStr(&devstr, vmdef, chr, priv->qemuCaps) < 0)
goto cleanup;
if (virAsprintf(&charAlias, "char%s", chr->info.alias) < 0)
@@ -1533,13 +1533,13 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
if (qemuDomainObjExitMonitor(driver, vm) < 0)
goto audit;
- qemuDomainChrInsertPreAlloced(vm->def, chr);
+ qemuDomainChrInsertPreAlloced(vmdef, chr);
ret = 0;
audit:
virDomainAuditChardev(vm, NULL, chr, "attach", ret == 0);
cleanup:
if (ret < 0 && virDomainObjIsActive(vm))
- qemuDomainChrInsertPreAllocCleanup(vm->def, chr);
+ qemuDomainChrInsertPreAllocCleanup(vmdef, chr);
if (ret < 0 && need_release)
qemuDomainReleaseDeviceAddress(vm, &chr->info, NULL);
VIR_FREE(charAlias);
@@ -4066,7 +4066,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
sa_assert(tmpChr->info.alias);
- if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0)
+ if (qemuBuildChrDeviceStr(&devstr, vmdef, chr, priv->qemuCaps) < 0)
return ret;
qemuDomainMarkDeviceForRemoval(vm, &tmpChr->info);
--
2.7.4 (Apple Git-66)
8 years, 6 months
[libvirt] Question: forbid dnsmasq to install IPv6 default route
by Maxim Perevedentsev
Hello guys!
I got into problem with installing IPv6 default gateway on centos7 guest
while running dhcpv6.
=== Scheme ===
Guest has two network interfaces.
*eth0* is connected to Host-Only network over virbr0. This network has
dhcpv6 set up.
[root@s143 ~]# virsh net-dumpxml Host-Only
<network connections='1'>
<name>Host-Only</name>
<uuid>11aa4e6a-9014-4dae-86b9-b13159896efe</uuid>
<bridge name='virbr0' stp='off' delay='0'/>
<mac address='52:54:00:1e:17:49'/>
<ip family='ipv4' address='10.37.130.2' prefix='24'>
<dhcp>
<range start='10.37.130.1' end='10.37.130.254'/>
</dhcp>
</ip>
<ip family='ipv6' address='fdb2:2c26:f4e4::1' prefix='64'>
<dhcp>
<range start='fdb2:2c26:f4e4::' end='fdb2:2c26:f4e4::ffff'/>
</dhcp>
</ip>
</network>
*eth1* is connected to Bridged network over br0 bridge on host enp4s0
interface.
[root@s143 ~]# virsh net-dumpxml Bridged
<network connections='1'>
<name>Bridged</name>
<uuid>1ffa16f9-6a52-4710-9b58-52b8463cdece</uuid>
<forward mode='bridge'/>
<bridge name='br0'/>
</network>
[root@s143 ~]# virsh iface-dumpxml br0
<interface type='bridge' name='br0'>
<protocol family='ipv4'>
<ip address='10.94.1.161' prefix='16'/>
</protocol>
<protocol family='ipv6'>
<ip address='2001:aaad::a5e:a28E' prefix='64'/>
<ip address='fe80::be5f:f4ff:fe44:2cbb' prefix='64'/>
</protocol>
<bridge>
<interface type='ethernet' name='vme42460d71'>
<link state='unknown'/>
<mac address='fe:1c:42:46:0d:71'/>
</interface>
<interface type='ethernet' name='enp4s0'>
<link speed='1000' state='up'/>
<mac address='bc:5f:f4:44:2c:bb'/>
</interface>
</bridge>
</interface>
=== Problem ===
Now I want to set ipv6 address 2001:aaad::a5e:a28F to guest eth1
(bridged to host)
and install a default route
ip -6 route add default via 2001:aaad::a5e:a290 dev eth1 // metric 1024
So I want all the IPv6 traffic w/o route to go into eth1, then through
host bridge to gateway (same for host and guest).
The problem is that I see following in my guest:
// the metric changes somehow, but this does not matter.
default via fe80::5054:ff:fe1e:1749 dev eth0 proto static metric 100
pref medium
default via 2001:aaad::a5e:a290 dev eth1 metric 1024 pref medium
And the first (via link-local) route is preferred on routing.
[root@s143 ~]# ip -6 address show dev virbr0
6: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
inet6 fdb2:2c26:f4e4::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe1e:1749/64 scope link
valid_lft forever preferred_lft forever
The problem is:
guest:/ # radvdump
#
# radvd configuration generated by radvdump 2.11
# based on Router Advertisement from fe80::5054:ff:fe1e:1749
# received by interface eth0
#
interface eth0
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag on;
AdvOtherConfigFlag on;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800; <----------------
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvLinkMTU 1500;
AdvSourceLLAddress on;
prefix fdb2:2c26:f4e4::/64
{
AdvValidLifetime 3600;
AdvPreferredLifetime 3600;
AdvOnLink on;
AdvAutonomous off;
AdvRouterAddr off;
}; # End of prefix definition
RDNSS fe80::5054:ff:fe1e:1749
{
AdvRDNSSLifetime 3600;
}; # End of RDNSS definition
}; # End of interface definition
So, dnsmasq includes its link-local address into RA and
announces itself as default gateway valid for 30min.
Guest sees this RA and installs a route in accordance.
As a result, the default gateway requested by user is overridden and
thus not used.
We cannot just disable RA since we still need IPv6 address on guest eth0
(dhcp6 part of functionality).
=== Possible solutions ===
I see two possible solutions.
1) Tinker with routes.
As I said, the metric of installed RA routes may change and it's
difficult to override them for sure (maybe with metric 0 or 1?)
Moreover, this may confuse user and requires specific knowledge (IPv6,
RA, etc.).
2) Forbid guest to learn default route from RA
sysctl -w net.ipv6.conf.eth0.accept_ra_defrtr=0
- This should be made for all virbr-based networks.
- This may confuse user as well.
3) Forbid dnsmasq to announce virbr0 link-local address as default gateway.
This can be made with
adding 'ra-param=*,0,0' to /var/lib/libvirt/dnsmasq/Host-Only.conf
// interface=* (any), interval=0 (default), router_lifetime=0 (I am NOT
you gateway, Luke).
// tested on dnsmasq-2.75-3.fc22 but should work from 2.67
now the RA looks as following:
linux-bnqo:/ # radvdump
#
# radvd configuration generated by radvdump 2.11
# based on Router Advertisement from fe80::5054:ff:fe1e:1749
# received by interface eth0
#
interface eth0
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag on;
AdvOtherConfigFlag on;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 0;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvLinkMTU 1500;
AdvSourceLLAddress on;
prefix fdb2:2c26:f4e4::/64
{
AdvValidLifetime 3600;
AdvPreferredLifetime 3600;
AdvOnLink on;
AdvAutonomous off;
AdvRouterAddr off;
}; # End of prefix definition
RDNSS fe80::5054:ff:fe1e:1749
{
AdvRDNSSLifetime 3600;
}; # End of RDNSS definition
}; # End of interface definition
=== Conclusion ====
Please correct me if my setup itself is wrong and causes problems.
Maybe there are another solutions possible, w/o modifying libvirt/guest?
Would you accept patches related to 3rd solution?
Looking forward to your replies.
Thanks in advance!
--
Your sincerely,
Maxim Perevedentsev
8 years, 6 months
[libvirt] [PATCH v5] virsh: Introduce virsh-pool command
by Jovanka Gulicoska
---
tools/virsh-pool.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 18 ++++++
2 files changed, 202 insertions(+)
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index f9299e2..18e218c 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -32,6 +32,7 @@
#include "virfile.h"
#include "conf/storage_conf.h"
#include "virstring.h"
+#include "virtime.h"
#define VIRSH_COMMON_OPT_POOL_FULL \
VIRSH_COMMON_OPT_POOL(N_("pool name or uuid")) \
@@ -1889,6 +1890,183 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd)
return ret;
}
+/*
+ * "pool-event" command
+ */
+VIR_ENUM_DECL(virshPoolEvent)
+VIR_ENUM_IMPL(virshPoolEvent,
+ VIR_STORAGE_POOL_EVENT_LAST,
+ N_("Defined"),
+ N_("Undefined"),
+ N_("Started"),
+ N_("Stopped"),
+ N_("Refreshed"))
+
+static const char *
+virshPoolEventToString(int event)
+{
+ const char *str = virshPoolEventTypeToString(event);
+ return str ? _(str) : _("unknown");
+}
+
+struct virshPoolEventData {
+ vshControl *ctl;
+ bool loop;
+ bool timestamp;
+ int count;
+};
+typedef struct virshPoolEventData virshPoolEventData;
+
+VIR_ENUM_DECL(virshPoolEventId)
+VIR_ENUM_IMPL(virshPoolEventId,
+ VIR_STORAGE_POOL_EVENT_ID_LAST,
+ "lifecycle")
+
+static void
+vshEventLifecyclePrint(virConnectPtr conn ATTRIBUTE_UNUSED,
+ virStoragePoolPtr pool,
+ int event,
+ int detail ATTRIBUTE_UNUSED,
+ void *opaque)
+{
+ virshPoolEventData *data = opaque;
+
+ if (!data->loop && data->count)
+ return;
+
+ if (data->timestamp) {
+ char timestamp[VIR_TIME_STRING_BUFLEN];
+
+ if (virTimeStringNowRaw(timestamp) < 0)
+ timestamp[0] = '\0';
+
+ vshPrint(data->ctl, _("%s: event 'lifecycle' for storage pool %s: %s\n"),
+ timestamp,
+ virStoragePoolGetName(pool),
+ virshPoolEventToString(event));
+ } else {
+ vshPrint(data->ctl, _("event 'lifecycle' for storage pool %s: %s\n"),
+ virStoragePoolGetName(pool),
+ virshPoolEventToString(event));
+ }
+
+ data->count++;
+ if (!data->loop)
+ vshEventDone(data->ctl);
+}
+
+static const vshCmdInfo info_pool_event[] = {
+ {.name = "help",
+ .data = N_("Storage Pool Events")
+ },
+ {.name = "desc",
+ .data = N_("List event types, or wait for storage pool events to occur")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_pool_event[] = {
+ {.name = "pool",
+ .type = VSH_OT_STRING,
+ .help = N_("filter by storage pool name or uuid")
+ },
+ {.name = "event",
+ .type = VSH_OT_STRING,
+ .help = N_("which event type to wait for")
+ },
+ {.name = "loop",
+ .type = VSH_OT_BOOL,
+ .help = N_("loop until timeout or interrupt, rather than one-shot")
+ },
+ {.name = "timeout",
+ .type = VSH_OT_INT,
+ .help = N_("timeout seconds")
+ },
+ {.name = "list",
+ .type = VSH_OT_BOOL,
+ .help = N_("list valid event types")
+ },
+ {.name = "timestamp",
+ .type = VSH_OT_BOOL,
+ .help = N_("show timestamp for each printed event")
+ },
+ {.name = NULL}
+};
+
+static bool
+cmdPoolEvent(vshControl *ctl, const vshCmd *cmd)
+{
+ virStoragePoolPtr pool = NULL;
+ bool ret = false;
+ int eventId = -1;
+ int timeout = 0;
+ virshPoolEventData data;
+ const char *eventName = NULL;
+ int event;
+ virshControlPtr priv = ctl->privData;
+
+ if (vshCommandOptBool(cmd, "list")) {
+ size_t i;
+
+ for (i = 0; i < VIR_STORAGE_POOL_EVENT_ID_LAST; i++)
+ vshPrint(ctl, "%s\n", virshPoolEventIdTypeToString(i));
+ return true;
+ }
+
+ if (vshCommandOptStringReq(ctl, cmd, "event", &eventName) < 0)
+ return false;
+ if (!eventName) {
+ vshError(ctl, "%s", _("either --list or event type is required"));
+ return false;
+ }
+ if ((event = virshPoolEventIdTypeFromString(eventName)) < 0) {
+ vshError(ctl, _("unknown event type %s"), eventName);
+ return false;
+ }
+
+ data.ctl = ctl;
+ data.loop = vshCommandOptBool(cmd, "loop");
+ data.timestamp = vshCommandOptBool(cmd, "timestamp");
+ data.count = 0;
+ if (vshCommandOptTimeoutToMs(ctl, cmd, &timeout) < 0)
+ return false;
+
+ if (vshCommandOptBool(cmd, "pool"))
+ pool = virshCommandOptPool(ctl, cmd, "pool", NULL);
+ if (vshEventStart(ctl, timeout) < 0)
+ goto cleanup;
+
+ if ((eventId = virConnectStoragePoolEventRegisterAny(priv->conn, pool, event,
+ VIR_STORAGE_POOL_EVENT_CALLBACK(vshEventLifecyclePrint),
+ &data, NULL)) < 0)
+ goto cleanup;
+ switch (vshEventWait(ctl)) {
+ case VSH_EVENT_INTERRUPT:
+ vshPrint(ctl, "%s", _("event loop interrupted\n"));
+ break;
+ case VSH_EVENT_TIMEOUT:
+ vshPrint(ctl, "%s", _("event loop timed out\n"));
+ break;
+ case VSH_EVENT_DONE:
+ break;
+ default:
+ goto cleanup;
+ }
+ vshPrint(ctl, _("events received: %d\n"), data.count);
+ if (data.count)
+ ret = true;
+
+ cleanup:
+ vshEventCleanup(ctl);
+ if (eventId >= 0 &&
+ virConnectStoragePoolEventDeregisterAny(priv->conn, eventId) < 0)
+ ret = false;
+ if (pool)
+ virStoragePoolFree(pool);
+ return ret;
+}
+
+
const vshCmdDef storagePoolCmds[] = {
{.name = "find-storage-pool-sources-as",
.handler = cmdPoolDiscoverSourcesAs,
@@ -2004,5 +2182,11 @@ const vshCmdDef storagePoolCmds[] = {
.info = info_pool_uuid,
.flags = 0
},
+ {.name = "pool-event",
+ .handler = cmdPoolEvent,
+ .opts = opts_pool_event,
+ .info = info_pool_event,
+ .flags = 0
+ },
{.name = NULL}
};
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 1e56660..e530160 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -3457,6 +3457,24 @@ Undefine the configuration for an inactive I<pool>.
Returns the UUID of the named I<pool>.
+=item B<pool-event> {[I<pool>] I<event> [I<--loop>] [I<--timeout>
+I<seconds>] [I<--timestamp>] | I<--list>}
+
+Wait for a class of storage pool events to occur, and print appropriate
+details of events as they happen. The events can optionally be filtered
+by I<pool>. Using I<--list> as the only argument will provide a list
+of possible I<event> values known by this client, although the connection
+might not allow registering for all these events.
+
+By default, this command is one-shot, and returns success once an event
+occurs; you can send SIGINT (usually via C<Ctrl-C>) to quit immediately.
+If I<--timeout> is specified, the command gives up waiting for events
+after I<seconds> have elapsed. With I<--loop>, the command prints all
+events until a timeout or interrupt key.
+
+When I<--timestamp> is used, a human-readable timestamp will be printed
+before the event.
+
=back
=head1 VOLUME COMMANDS
--
2.5.5
8 years, 6 months
[libvirt] ANNOUNCE: virt-manager 1.4.0 released
by Cole Robinson
I'm happy to announce the release of virt-manager 1.4.0!
virt-manager is a desktop application for managing KVM, Xen, and LXC
virtualization via libvirt.
The release can be downloaded from:
http://virt-manager.org/download/
This release includes:
- virt-manager: spice GL console support (Marc-André Lureau, Cole Robinson)
- Note, this isn't enabled by default, and there isn't any GUI bits to
enable this, but if it _is_ enabled the virt-manager SPICE viewer will
do the right thing. More details:
http://blog.wikichoon.com/2016/05/spice-openglvirgl-acceleration-on.html
- Bump gtk and pygobject deps to 3.14
- virt-manager: add checkbox to forget keyring password (Pavel Hrdina)
- cli: add --graphics gl= (Marc-André Lureau)
- cli: add --video accel3d= (Marc-André Lureau)
- cli: add --graphics listen=none (Marc-André Lureau)
- cli: add --transient flag (Richard W.M. Jones)
- cli: --features gic= support, and set a default for it (Pavel Hrdina)
- cli: Expose --video heads, ram, vram, vgamem
- cli: add --graphics listen=socket
- cli: add device address.type/address.bus/...
- cli: add --disk seclabelX.model (and .label, .relabel)
- cli: add -cpu cellX.id (and .cpus, and .memory)
- cli: add --network rom_bar= and rom_file=
- cli: add --disk backing_format=
- Many bug fixes and improvements
Thanks to everyone who has contributed to this release through testing,
bug reporting, submitting patches, and otherwise sending in feedback!
Thanks,
Cole
8 years, 6 months
[libvirt] [PATCH v2] libxl: add USB to hostdev domcapabilities
by Joao Martins
From: Jim Fehlig <jfehlig(a)suse.com>
Commit 2a58ed0b added support for creating guests with USB
hostdevs. Commit fc21d10 later added support for hotplut of
USB hostdevs. Advertise support for USB hostdevs in the
domcapabilities.
In addition add the appropriate caps for USB support on
domaincapstest when libvirt is built on a Xen with
LIBXL_HAVE_PVUSB. Otherwise domaincapstest would fail i.e.
testing the wrong domain capabilities.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
---
Changes since v2:
- Change domaincapstest to target (non-)PVUSB caps.
---
src/libxl/libxl_capabilities.c | 5 ++
tests/domaincapsschemadata/libxl-xenfv-usb.xml | 69 ++++++++++++++++++++++++++
tests/domaincapsschemadata/libxl-xenpv-usb.xml | 59 ++++++++++++++++++++++
tests/domaincapstest.c | 12 ++++-
4 files changed, 143 insertions(+), 2 deletions(-)
create mode 100644 tests/domaincapsschemadata/libxl-xenfv-usb.xml
create mode 100644 tests/domaincapsschemadata/libxl-xenpv-usb.xml
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 45f0988..0145116 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -492,6 +492,11 @@ libxlMakeDomainDeviceHostdevCaps(virDomainCapsDeviceHostdevPtr dev)
VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI);
+#ifdef LIBXL_HAVE_PVUSB
+ VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB);
+#endif
+
/* No virDomainHostdevCapsType for libxl */
virDomainCapsEnumClear(&dev->capsType);
diff --git a/tests/domaincapsschemadata/libxl-xenfv-usb.xml b/tests/domaincapsschemadata/libxl-xenfv-usb.xml
new file mode 100644
index 0000000..c071d12
--- /dev/null
+++ b/tests/domaincapsschemadata/libxl-xenfv-usb.xml
@@ -0,0 +1,69 @@
+<domainCapabilities>
+ <path>/usr/bin/qemu-system-x86_64</path>
+ <domain>xen</domain>
+ <machine>xenfv</machine>
+ <arch>x86_64</arch>
+ <vcpu max='128'/>
+ <os supported='yes'>
+ <loader supported='yes'>
+ <value>/usr/lib/xen/boot/hvmloader</value>
+ <value>/usr/lib/xen/boot/ovmf.bin</value>
+ <enum name='type'>
+ <value>rom</value>
+ <value>pflash</value>
+ </enum>
+ <enum name='readonly'>
+ <value>yes</value>
+ </enum>
+ </loader>
+ </os>
+ <devices>
+ <disk supported='yes'>
+ <enum name='diskDevice'>
+ <value>disk</value>
+ <value>cdrom</value>
+ </enum>
+ <enum name='bus'>
+ <value>ide</value>
+ <value>scsi</value>
+ <value>xen</value>
+ </enum>
+ </disk>
+ <graphics supported='yes'>
+ <enum name='type'>
+ <value>sdl</value>
+ <value>vnc</value>
+ <value>spice</value>
+ </enum>
+ </graphics>
+ <video supported='yes'>
+ <enum name='modelType'>
+ <value>vga</value>
+ <value>cirrus</value>
+ <value>xen</value>
+ </enum>
+ </video>
+ <hostdev supported='yes'>
+ <enum name='mode'>
+ <value>subsystem</value>
+ </enum>
+ <enum name='startupPolicy'>
+ <value>default</value>
+ <value>mandatory</value>
+ <value>requisite</value>
+ <value>optional</value>
+ </enum>
+ <enum name='subsysType'>
+ <value>usb</value>
+ <value>pci</value>
+ </enum>
+ <enum name='capsType'/>
+ <enum name='pciBackend'>
+ <value>xen</value>
+ </enum>
+ </hostdev>
+ </devices>
+ <features>
+ <gic supported='no'/>
+ </features>
+</domainCapabilities>
diff --git a/tests/domaincapsschemadata/libxl-xenpv-usb.xml b/tests/domaincapsschemadata/libxl-xenpv-usb.xml
new file mode 100644
index 0000000..4dd07bd
--- /dev/null
+++ b/tests/domaincapsschemadata/libxl-xenpv-usb.xml
@@ -0,0 +1,59 @@
+<domainCapabilities>
+ <path>/usr/bin/qemu-system-x86_64</path>
+ <domain>xen</domain>
+ <machine>xenpv</machine>
+ <arch>x86_64</arch>
+ <vcpu max='512'/>
+ <os supported='yes'>
+ <loader supported='no'/>
+ </os>
+ <devices>
+ <disk supported='yes'>
+ <enum name='diskDevice'>
+ <value>disk</value>
+ <value>cdrom</value>
+ </enum>
+ <enum name='bus'>
+ <value>ide</value>
+ <value>scsi</value>
+ <value>xen</value>
+ </enum>
+ </disk>
+ <graphics supported='yes'>
+ <enum name='type'>
+ <value>sdl</value>
+ <value>vnc</value>
+ <value>spice</value>
+ </enum>
+ </graphics>
+ <video supported='yes'>
+ <enum name='modelType'>
+ <value>vga</value>
+ <value>cirrus</value>
+ <value>xen</value>
+ </enum>
+ </video>
+ <hostdev supported='yes'>
+ <enum name='mode'>
+ <value>subsystem</value>
+ </enum>
+ <enum name='startupPolicy'>
+ <value>default</value>
+ <value>mandatory</value>
+ <value>requisite</value>
+ <value>optional</value>
+ </enum>
+ <enum name='subsysType'>
+ <value>usb</value>
+ <value>pci</value>
+ </enum>
+ <enum name='capsType'/>
+ <enum name='pciBackend'>
+ <value>xen</value>
+ </enum>
+ </hostdev>
+ </devices>
+ <features>
+ <gic supported='no'/>
+ </features>
+</domainCapabilities>
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 9fb2c97..ae31146 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -367,9 +367,17 @@ mymain(void)
#if WITH_LIBXL
- DO_TEST_LIBXL("libxl-xenpv", "/usr/bin/qemu-system-x86_64",
+# ifdef LIBXL_HAVE_PVUSB
+# define LIBXL_XENPV_CAPS "libxl-xenpv-usb"
+# define LIBXL_XENFV_CAPS "libxl-xenfv-usb"
+# else
+# define LIBXL_XENPV_CAPS "libxl-xenpv"
+# define LIBXL_XENFV_CAPS "libxl-xenfv"
+# endif
+
+ DO_TEST_LIBXL(LIBXL_XENPV_CAPS, "/usr/bin/qemu-system-x86_64",
"xenpv", "x86_64", VIR_DOMAIN_VIRT_XEN);
- DO_TEST_LIBXL("libxl-xenfv", "/usr/bin/qemu-system-x86_64",
+ DO_TEST_LIBXL(LIBXL_XENFV_CAPS, "/usr/bin/qemu-system-x86_64",
"xenfv", "x86_64", VIR_DOMAIN_VIRT_XEN);
#endif /* WITH_LIBXL */
--
2.1.4
8 years, 6 months
[libvirt] [PATCH] Remove stray space in cmdHelp
by Ján Tomko
---
tools/vsh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Pushed as trivial.
diff --git a/tools/vsh.c b/tools/vsh.c
index 605c574..8649305 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2858,7 +2858,7 @@ const vshCmdInfo info_help[] = {
bool
cmdHelp(vshControl *ctl, const vshCmd *cmd)
- {
+{
const char *name = NULL;
if (vshCommandOptStringQuiet(ctl, cmd, "command", &name) <= 0) {
--
2.7.3
8 years, 6 months
[libvirt] [PATCH] libxl: add USB to hostdev domcapabilities
by Jim Fehlig
Commit 2a58ed0b added support for creating guests with USB
hostdevs. Commit fc21d10 later added support for hotplut of
USB hostdevs. Advertise support for USB hostdevs in the
domcapabilities.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_capabilities.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 45f0988..0145116 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -492,6 +492,11 @@ libxlMakeDomainDeviceHostdevCaps(virDomainCapsDeviceHostdevPtr dev)
VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI);
+#ifdef LIBXL_HAVE_PVUSB
+ VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB);
+#endif
+
/* No virDomainHostdevCapsType for libxl */
virDomainCapsEnumClear(&dev->capsType);
--
2.1.4
8 years, 6 months