[libvirt] persistence of pcihole64 over live migration
by Richard, Joseph
Hello all,
In order to reserve 64-bit address space for hotplugging, we are using the pcihole64 attribute on the root pci-controller.
When doing a live-migration using libvirt/qemu, the pci-root controller is dropped and re-added on the destination side[1], which results in the pci controller's pcihole64 attribute that we configured when launching the VM being lost.
Is there any reason to not keep this (by not dropping it in qemuDomainDefFormatBufInternal when pcihole64 is set on the controller) over a live migration in this case?
[1] https://github.com/libvirt/libvirt/commit/b33eb0dca1175bc0e3f796f18e31adc...
Thanks,
Joseph Richard
6 years, 9 months
[libvirt] [PATCH] build: Remove --with-xml-catalog-file option
by Rainer Müller
After validation against XHTML 1.0 was dropped in f802c9de0,
the XML_CATALOG_FILE is not in use anymore. Therefore the checks in
configure can be removed.
---
configure.ac | 3 ---
m4/virt-xml-catalog.m4 | 33 ---------------------------------
2 files changed, 36 deletions(-)
delete mode 100644 m4/virt-xml-catalog.m4
diff --git a/configure.ac b/configure.ac
index 56a7ad780..115eb6088 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,7 +459,6 @@ dnl
LIBVIRT_ARG_DEBUG
LIBVIRT_ARG_DTRACE
LIBVIRT_ARG_NUMAD
-LIBVIRT_ARG_XML_CATALOG
LIBVIRT_ARG_INIT_SCRIPT
LIBVIRT_ARG_CHRDEV_LOCK_FILES
LIBVIRT_ARG_DEFAULT_EDITOR
@@ -473,7 +472,6 @@ LIBVIRT_ARG_SYSCTL_CONFIG
LIBVIRT_CHECK_DEBUG
LIBVIRT_CHECK_DTRACE
LIBVIRT_CHECK_NUMAD
-LIBVIRT_CHECK_XML_CATALOG
LIBVIRT_CHECK_INIT_SCRIPT
LIBVIRT_CHECK_CHRDEV_LOCK_FILES
LIBVIRT_CHECK_DEFAULT_EDITOR
@@ -1032,7 +1030,6 @@ AC_MSG_NOTICE([ Use -Werror: $enable_werror])
AC_MSG_NOTICE([ Warning Flags: $WARN_CFLAGS])
LIBVIRT_RESULT_DTRACE
LIBVIRT_RESULT_NUMAD
-LIBVIRT_RESULT_XML_CATALOG
LIBVIRT_RESULT_INIT_SCRIPT
LIBVIRT_RESULT_CHRDEV_LOCK_FILES
LIBVIRT_RESULT_DEFAULT_EDITOR
diff --git a/m4/virt-xml-catalog.m4 b/m4/virt-xml-catalog.m4
deleted file mode 100644
index a25ae89f6..000000000
--- a/m4/virt-xml-catalog.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl The XML catalog file check
-dnl
-dnl Copyright (C) 2016 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_ARG_XML_CATALOG], [
- LIBVIRT_ARG_WITH([XML_CATALOG_FILE],
- [path to XML catalog file for validating generated html],
- ['/etc/xml/catalog'])
-])
-
-AC_DEFUN([LIBVIRT_CHECK_XML_CATALOG], [
- dnl Specific XML catalog file for validation of generated html
- AC_SUBST([XML_CATALOG_FILE], [$with_xml_catalog_file])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_XML_CATALOG], [
- AC_MSG_NOTICE([ XML Catalog: $with_xml_catalog_file])
-])
--
2.16.2
6 years, 9 months
[libvirt] [PATCH] polkit: reintroduce check for pkcheck
by Ján Tomko
Commit 2499d1a0 was too eager and possibly enabled polkit
on all platforms with D-Bus, regardless of whether they use polkit.
Reintroduce the usage of pkcheck as a witness for --with-polkit=check,
but do not require it for --with-polkit=yes.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Reported-by: Jiří Denemark <jdenemar(a)redhat.com>
---
m4/virt-polkit.m4 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/m4/virt-polkit.m4 b/m4/virt-polkit.m4
index fd729dc98..16889e163 100644
--- a/m4/virt-polkit.m4
+++ b/m4/virt-polkit.m4
@@ -25,8 +25,17 @@ AC_DEFUN([LIBVIRT_ARG_POLKIT], [
AC_DEFUN([LIBVIRT_CHECK_POLKIT], [
AC_REQUIRE([LIBVIRT_CHECK_DBUS])
+ if test "x$with_polkit" = "xcheck"; then
+ dnl For --with-polkit=check, also require the pkcheck binary, even
+ dnl though we talk to polkit directly over D-Bus.
+ AC_PATH_PROG([PKCHECK_PATH], [pkcheck], [], [$LIBVIRT_SBIN_PATH])
+ if test "x$PKCHECK_PATH" = "x" ; then
+ with_polkit="no"
+ fi
+ fi
+
if test "x$with_polkit" = "xyes" || test "x$with_polkit" = "xcheck"; then
- dnl All we need to talk to polkit is D-Bus.
+ dnl For --with-polkit=yes, all we need is D-Bus.
if test "x$with_dbus" = "xyes" ; then
AC_DEFINE_UNQUOTED([WITH_POLKIT], 1,
[use PolicyKit for UNIX socket access checks])
--
2.16.1
6 years, 9 months
[libvirt] [PATCH v3 0/6] Add support for video and input devices on S390
by Farhan Ali
Hi,
This patch series adds Libvirt support for video and input devices
for QEMU guests on S390. QEMU v2.11.0 added support for the
virtio-gpu-ccw device [1] and virtio-{keyboard, mouse, tablet}-ccw devices [2],
which can be used as video and input devices respectively.
Thanks
Farhan
[1] https://git.qemu.org/?p=qemu.git;a=commit;h=1f8ad88935f5cb5a2968909e392db...
[2] https://git.qemu.org/?p=qemu.git;a=commit;h=3382cf1fabbf722dce931846853da...
ChangeLog
---------
v2 -> v3
- Update 2.12 capabilities files (patch 1 and 4).
- Move video model change to it's own separate patch (patch 3).
- Separate virtio-gpu-ccw tests into appropriate patches as per
Jan's suggestions (patch 1, 2 and 3).
- Squash virtio input ccw tests with functionality patch (patch 5).
v1 -> v2
- Split virtio-gpu-ccw capability (patch 1) and functionality (patch 2)
into 2 patches.
- Code changes per John's comments (patch 2).
- Split capability for input devices (patch 4) and functionality (patch 5)
into 2 patches.
- Modify news update as per John's suggestion (patch 7).
Farhan Ali (6):
qemu: Introduce a new capability for virtio-gpu-ccw
qemu: Add support for virtio-gpu-ccw video device on S390
qemu: Change default video model type to virtio for S390
qemu: Introduce capabilities for virtio input ccw devices
qemu: Add support for virtio input ccw devices
news: Update for virtio-gpu-ccw and virtio input ccw devices
docs/formatdomain.html.in | 5 ++
docs/news.xml | 10 +++
src/qemu/qemu_capabilities.c | 13 ++++
src/qemu/qemu_capabilities.h | 6 ++
src/qemu/qemu_command.c | 27 +++++--
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain_address.c | 12 +++-
src/qemu/qemu_process.c | 5 +-
.../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 83 +++++++++++++++++++---
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 6 +-
.../qemucapabilitiesdata/caps_2.12.0.s390x.replies | 81 ++++++++++++++++++---
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 4 ++
tests/qemuxml2argvdata/input-virtio-ccw.args | 26 +++++++
tests/qemuxml2argvdata/input-virtio-ccw.xml | 29 ++++++++
.../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 +++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 +++++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 +++++++++
tests/qemuxml2argvtest.c | 15 ++++
tests/qemuxml2xmloutdata/input-virtio-ccw.xml | 37 ++++++++++
.../video-virtio-gpu-ccw-auto.xml | 35 +++++++++
tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 39 ++++++++++
tests/qemuxml2xmltest.c | 22 ++++++
22 files changed, 508 insertions(+), 27 deletions(-)
create mode 100644 tests/qemuxml2argvdata/input-virtio-ccw.args
create mode 100644 tests/qemuxml2argvdata/input-virtio-ccw.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/input-virtio-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml
--
2.7.4
6 years, 9 months
[libvirt] [PATCH 0/3] tests: Improvements and cleanups to capabilities testing
by Andrea Bolognani
*** BLURB NOW OR FOREVER HOLD YOUR PEACE ***
Andrea Bolognani (3):
tests: domaincaps: Order by architecture
tests: domaincaps: Add QEMU 2.12
tests: qemucapabilities: Drop mostly duplicated data
...rt.aarch64.xml => qemu_2.12.0-virt.aarch64.xml} | 5 +-
...icv2-virt.aarch64.xml => qemu_2.12.0.ppc64.xml} | 51 +-
...icv2-virt.aarch64.xml => qemu_2.12.0.s390x.xml} | 50 +-
tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml | 143 +
...irt.aarch64.xml => qemu_2.6.0-virt.aarch64.xml} | 0
tests/domaincapstest.c | 44 +-
.../caps_2.10.0-gicv3.aarch64.replies | 16495 -----------------
.../caps_2.10.0-gicv3.aarch64.xml | 310 -
...aarch64.replies => caps_2.10.0.aarch64.replies} | 0
...0-gicv2.aarch64.xml => caps_2.10.0.aarch64.xml} | 0
.../caps_2.12.0-gicv2.aarch64.replies | 18551 -------------------
.../caps_2.12.0-gicv2.aarch64.xml | 322 -
...aarch64.replies => caps_2.12.0.aarch64.replies} | 0
...0-gicv3.aarch64.xml => caps_2.12.0.aarch64.xml} | 0
.../caps_2.6.0-gicv3.aarch64.replies | 13035 -------------
.../caps_2.6.0-gicv3.aarch64.xml | 287 -
....aarch64.replies => caps_2.6.0.aarch64.replies} | 0
....0-gicv2.aarch64.xml => caps_2.6.0.aarch64.xml} | 0
tests/qemucapabilitiestest.c | 9 +-
19 files changed, 192 insertions(+), 49110 deletions(-)
rename tests/domaincapsschemadata/{qemu_2.6.0-gicv3-virt.aarch64.xml => qemu_2.12.0-virt.aarch64.xml} (95%)
copy tests/domaincapsschemadata/{qemu_2.6.0-gicv2-virt.aarch64.xml => qemu_2.12.0.ppc64.xml} (50%)
copy tests/domaincapsschemadata/{qemu_2.6.0-gicv2-virt.aarch64.xml => qemu_2.12.0.s390x.xml} (50%)
create mode 100644 tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
rename tests/domaincapsschemadata/{qemu_2.6.0-gicv2-virt.aarch64.xml => qemu_2.6.0-virt.aarch64.xml} (100%)
delete mode 100644 tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.replies
delete mode 100644 tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml
rename tests/qemucapabilitiesdata/{caps_2.10.0-gicv2.aarch64.replies => caps_2.10.0.aarch64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.10.0-gicv2.aarch64.xml => caps_2.10.0.aarch64.xml} (100%)
delete mode 100644 tests/qemucapabilitiesdata/caps_2.12.0-gicv2.aarch64.replies
delete mode 100644 tests/qemucapabilitiesdata/caps_2.12.0-gicv2.aarch64.xml
rename tests/qemucapabilitiesdata/{caps_2.12.0-gicv3.aarch64.replies => caps_2.12.0.aarch64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.12.0-gicv3.aarch64.xml => caps_2.12.0.aarch64.xml} (100%)
delete mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.replies
delete mode 100644 tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
rename tests/qemucapabilitiesdata/{caps_2.6.0-gicv2.aarch64.replies => caps_2.6.0.aarch64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-gicv2.aarch64.xml => caps_2.6.0.aarch64.xml} (100%)
--
2.14.3
6 years, 9 months
[libvirt] [PATCH] conf: avoid reporting errors when network driver is disabled
by Daniel P. Berrangé
In previous releases all these methods were a no-op if the network
driver is disabled. These helper methods are called unconditionally for
all types of network interface, so must be no-ops if missing. Other code
will already generate an error if the network driver is disabled and a
NIC with type=network is used.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/conf/domain_conf.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c8d051fa9f..79d6bd378e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -28979,10 +28979,13 @@ int
virDomainNetAllocateActualDevice(virDomainDefPtr dom,
virDomainNetDefPtr iface)
{
+ /* Just silently ignore if network driver isn't present. If something
+ * has tried to use a NIC with type=network, other code will already
+ * cause an error. This ensures type=bridge doesn't break when
+ * network driver is compiled out.
+ */
if (!netAllocate) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
- _("Network device allocation not available"));
- return -1;
+ return 0;
}
return netAllocate(dom, iface);
@@ -28993,8 +28996,6 @@ virDomainNetNotifyActualDevice(virDomainDefPtr dom,
virDomainNetDefPtr iface)
{
if (!netNotify) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
- _("Network device notification not available"));
return;
}
@@ -29007,9 +29008,7 @@ virDomainNetReleaseActualDevice(virDomainDefPtr dom,
virDomainNetDefPtr iface)
{
if (!netRelease) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
- _("Network device release not available"));
- return -1;
+ return 0;
}
return netRelease(dom, iface);
@@ -29020,9 +29019,7 @@ virDomainNetBandwidthChangeAllowed(virDomainNetDefPtr iface,
virNetDevBandwidthPtr newBandwidth)
{
if (!netBandwidthChangeAllowed) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
- _("Network device bandwidth change query not available"));
- return -1;
+ return 0;
}
return netBandwidthChangeAllowed(iface, newBandwidth);
@@ -29033,9 +29030,7 @@ virDomainNetBandwidthUpdate(virDomainNetDefPtr iface,
virNetDevBandwidthPtr newBandwidth)
{
if (!netBandwidthUpdate) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
- _("Network device bandwidth update not available"));
- return -1;
+ return 0;
}
return netBandwidthUpdate(iface, newBandwidth);
--
2.14.3
6 years, 9 months
[libvirt] [PATCH python] Disable Python 2 on future RHEL and Fedora > 29
by Daniel P. Berrangé
The end of Python 2 is nearing, so declare when it will be removed
from libvirt Python binding RPMs.
NB, this doesn't imply we'll be removing py2 support from upstream
libvirt-python on the same timeframe - we'll consider what todo
wrt that when upstream Python 2 finally goes EOL.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt-python.spec.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in
index 7953c82..9697ea8 100644
--- a/libvirt-python.spec.in
+++ b/libvirt-python.spec.in
@@ -13,6 +13,10 @@
%endif
%define _with_python2 1
+%if 0%{?fedora} > 29 || 0%{?rhel} > 7
+%define _with_python2 0
+%endif
+
%define _with_python3 0
%if 0%{?fedora} || 0%{?rhel} > 7
%define _with_python3 1
--
2.14.3
6 years, 9 months
[libvirt] [dbus PATCH 00/10] *** Use API calls supporting flags ***
by Katerina Koukiou
* Replace all API calls to support flags where possible.
* Replace libvirt-dbus API method names to follow naming of libvirt API.
* Change type of virtDBusDomainGetVcpus from property to method.
Katerina Koukiou (10):
virtDBusDomainGetVcpus: Should be implemented as method and not as
property
GetVcpus API method: Renamed to GetVcpusFlags
virtDBusDomainShutdown: Use virDomainShutdownFlags instead of
virDomainShutdown
Shutdown API method: Renamed to ShutdownFlags
virtDBusDomainCreate: Use virDomainCreateWithFlags instead of
virDomainCreate
Create API method: Renamed to CreateWithFlags
virtDBusDomainUndefine: Use virDomainUndefineFlags instead of
virDomainUndefine
Undefine API method: Renamed to UndefineFlags
virtDBusDomainDestroy: Use virDomainDestroyFlags instead of
virDomainDestroy
Destroy API method: Renamed to DestroyFlags
data/org.libvirt.Domain.xml | 21 +++++--
src/domain.c | 134 +++++++++++++++++++++++++-------------------
test/test_domain.py | 22 +++++---
3 files changed, 106 insertions(+), 71 deletions(-)
--
2.15.0
6 years, 9 months
[libvirt] [PATCH] qemu: Build smartcard command line more wisely
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1558317
Similarly to b133fac356324c3 we need to look up alias of CCID
controller when constructing smartcard command line instead of
relying on broken assumption it will always be 'ccid0'. After
user aliases it can be anything.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_command.c | 38 +++++++++++++++++++++++++++++++-
tests/qemuxml2argvdata/user-aliases.args | 3 +++
tests/qemuxml2argvdata/user-aliases.xml | 11 +++++++++
tests/qemuxml2argvtest.c | 3 ++-
4 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a8afbd14fa..937a7d1b7b 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8701,6 +8701,32 @@ qemuBuildNetCommandLine(virQEMUDriverPtr driver,
}
+static const char *
+qemuBuildSmartcardFindCCIDController(const virDomainDef *def,
+ const virDomainSmartcardDef *smartcard)
+{
+ size_t i;
+
+ /* Should never happen. But doesn't hurt to check. */
+ if (smartcard->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCID)
+ return NULL;
+
+ for (i = 0; i < def->ncontrollers; i++) {
+ const virDomainControllerDef *tmp = def->controllers[i];
+
+ if (tmp->type != VIR_DOMAIN_CONTROLLER_TYPE_CCID)
+ continue;
+
+ if (tmp->idx != smartcard->info.addr.ccid.controller)
+ continue;
+
+ return tmp->info.alias;
+ }
+
+ return NULL;
+}
+
+
static int
qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
virCommandPtr cmd,
@@ -8714,6 +8740,7 @@ qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
char *devstr;
virBuffer opt = VIR_BUFFER_INITIALIZER;
const char *database;
+ const char *contAlias = NULL;
if (!def->nsmartcards)
return 0;
@@ -8811,8 +8838,17 @@ qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
virBufferFreeAndReset(&opt);
return -1;
}
+
+ if (!(contAlias = qemuBuildSmartcardFindCCIDController(def,
+ smartcard))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to find controller for %s"),
+ smartcard->info.alias);
+ return -1;
+ }
+
virCommandAddArg(cmd, "-device");
- virBufferAsprintf(&opt, ",id=%s,bus=ccid0.0", smartcard->info.alias);
+ virBufferAsprintf(&opt, ",id=%s,bus=%s.0", smartcard->info.alias, contAlias);
virCommandAddArgBuffer(cmd, &opt);
return 0;
diff --git a/tests/qemuxml2argvdata/user-aliases.args b/tests/qemuxml2argvdata/user-aliases.args
index 4c9c951cef..ad93947104 100644
--- a/tests/qemuxml2argvdata/user-aliases.args
+++ b/tests/qemuxml2argvdata/user-aliases.args
@@ -31,6 +31,8 @@ server,nowait \
-global PIIX4_PM.disable_s4=0 \
-boot cd \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x8 \
+-device usb-ccid,id=ua-myCCID,bus=ua-SomeWeirdController.0,port=1 \
+-device usb-ccid,id=ua-myCCID2,bus=ua-SomeWeirdController.0,port=2 \
-usb \
-drive file=/var/lib/libvirt/images/fd.img,format=raw,if=none,\
id=drive-ua-myDisk1,cache=none \
@@ -55,6 +57,7 @@ bus=pci.0,addr=0x9 \
-device rtl8139,vlan=2,id=ua-AndAlsoClientMode,mac=52:54:00:8c:b1:f8,bus=pci.0,\
addr=0xa \
-net socket,connect=127.0.0.1:1234,vlan=2,name=hostua-AndAlsoClientMode \
+-device ccid-card-emulated,backend=nss-emulated,id=smartcard0,bus=ua-myCCID.0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev pty,id=charserial1 \
diff --git a/tests/qemuxml2argvdata/user-aliases.xml b/tests/qemuxml2argvdata/user-aliases.xml
index 52132a82d7..9ce123b477 100644
--- a/tests/qemuxml2argvdata/user-aliases.xml
+++ b/tests/qemuxml2argvdata/user-aliases.xml
@@ -85,6 +85,14 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</controller>
<controller type='fdc' index='0'/>
+ <controller type='ccid' index='0'>
+ <alias name='ua-myCCID'/>
+ <address type='usb' bus='0' port='1'/>
+ </controller>
+ <controller type='ccid' index='1'>
+ <alias name='ua-myCCID2'/>
+ <address type='usb' bus='0' port='2'/>
+ </controller>
<interface type='ethernet'>
<mac address='52:54:00:d6:c0:0b'/>
<model type='virtio'/>
@@ -109,6 +117,9 @@
<alias name='ua-AndAlsoClientMode'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</interface>
+ <smartcard mode='host'>
+ <address type='ccid' controller='0' slot='0'/>
+ </smartcard>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 5ece3f0cc6..064fd3b767 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2995,7 +2995,8 @@ mymain(void)
QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_PIIX_DISABLE_S3,
QEMU_CAPS_PIIX_DISABLE_S4, QEMU_CAPS_VNC,
QEMU_CAPS_DEVICE_ISA_SERIAL,
- QEMU_CAPS_HDA_DUPLEX);
+ QEMU_CAPS_HDA_DUPLEX,
+ QEMU_CAPS_CCID_EMULATED);
DO_TEST("user-aliases2", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI);
DO_TEST("user-aliases-usb", QEMU_CAPS_KVM,
QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4,
--
2.16.1
6 years, 9 months