[libvirt] [PATCH 00/13] qemu: Refactor how we handle 'object's on the monitor
by Peter Krempa
This applies on top of the tls/secret alias refactoring series I've
posted earlier today:
https://www.redhat.com/archives/libvir-list/2018-May/msg02174.html
The main idea is to clarify the lifecycle of the objects used on the
monitor and clean up the code using it.
Peter Krempa (13):
qemu: command: Fix name of qemuBuildMemoryBackendStr
qemu: monitor: Rename qemuMonitorAddObject to qemuMonitorAddObjectType
qemu: Rename virQEMUBuildObjectCommandlineFromJSON
qemu: monitor: Add better APIs for adding of objects to qemu
util: qemu: Introduce helper for formatting command line from new
object props
qemu: hotplug: Refactor PR props formatting to use
qemuMonitorCreateObjectProps
qemu: hotplug: Refactor RNG props formatting to use
qemuMonitorCreateObjectProps
qemu: hotplug: Refactor memory props formatting to
qemuMonitorCreateObjectProps
qemu: hotplug: Refactor shmem props formatting to
qemuMonitorCreateObjectProps
qemu: hotplug: Refactor tls-credential props formatting to
qemuMonitorCreateObjectProps
qemu: hotplug: Refactor 'secret' props formatting to
qemuMonitorCreateObjectProps
qemu: Convert iothread hotplug to qemuMonitorCreateObjectProps
qemu: Delete old unused code for adding objects to qemu
src/qemu/qemu_command.c | 300 +++++++++++++++++----------------------
src/qemu/qemu_command.h | 18 +--
src/qemu/qemu_driver.c | 14 +-
src/qemu/qemu_hotplug.c | 148 +++++++------------
src/qemu/qemu_hotplug.h | 3 +-
src/qemu/qemu_migration_params.c | 5 +-
src/qemu/qemu_monitor.c | 98 +++++++++++--
src/qemu/qemu_monitor.h | 14 +-
src/qemu/qemu_monitor_json.c | 15 +-
src/qemu/qemu_monitor_json.h | 2 -
src/util/virqemu.c | 40 ++++--
src/util/virqemu.h | 5 +-
12 files changed, 336 insertions(+), 326 deletions(-)
--
2.16.2
6 years, 5 months
[libvirt] [PATCH v3 0/4] capabilities: Provide info about host IOMMU
by Filip Alac
Filip Alac (4):
virutil: Introduce virHostHasIOMMU
qemu: hostdev: Refactor code
capabilities: Extend capabilities with iommu_support
docs: news: Explain iommu_support improvement
docs/news.xml | 8 +++++
docs/schemas/capability.rng | 13 +++++++++
src/conf/capabilities.c | 9 ++++++
src/conf/capabilities.h | 3 ++
src/libvirt_private.syms | 2 ++
src/qemu/qemu_capabilities.c | 3 ++
src/qemu/qemu_hostdev.c | 29 +++----------------
src/test/test_driver.c | 2 ++
src/util/virutil.c | 28 ++++++++++++++++++
src/util/virutil.h | 2 ++
tests/qemucaps2xmldata/all_1.6.0-1.xml | 1 +
.../nodisksnapshot_1.6.0-1.xml | 1 +
.../vircaps2xmldata/vircaps-aarch64-basic.xml | 1 +
.../vircaps2xmldata/vircaps-x86_64-basic.xml | 1 +
.../vircaps2xmldata/vircaps-x86_64-caches.xml | 1 +
.../vircaps-x86_64-resctrl-cdp.xml | 1 +
.../vircaps-x86_64-resctrl-skx-twocaches.xml | 1 +
.../vircaps-x86_64-resctrl-skx.xml | 1 +
.../vircaps-x86_64-resctrl.xml | 1 +
19 files changed, 83 insertions(+), 25 deletions(-)
--
2.17.0
6 years, 5 months
[libvirt] [PATCH] qemu: hotplug: Fix detach of disk with managed persistent reservations
by Peter Krempa
In commit 8bebb2b735d I've refactored how the detach of disk with a
managed persistent reservations object is handled. After the commit if
any disk with a managed PR object would be removed libvirt would also
attempt to remove the shared 'pr-manager-helper' object potentially used
by other disks.
Thankfully this should not have practical impact as qemu should reject
deletion of the object if it was still used and the rest of the code is
correct.
Fix this by removing the disk from the definition earlier and checking
if the shared/managed pr-manager-helper object is still needed.
This basically splits the detach code for the managed PR object from the
unmanaged ones. The same separation will follow for the attachment code
as well as it greatly simplifies -blockdev support for this.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index b4bbe62c75..a14281203a 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3839,6 +3839,8 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
char *drivestr;
char *objAlias = NULL;
char *encAlias = NULL;
+ bool prManaged = priv->prDaemonRunning;
+ bool prUsed = false;
VIR_DEBUG("Removing disk %s from domain %p %s",
disk->info.alias, vm, vm->def->name);
@@ -3876,6 +3878,16 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
}
}
+ for (i = 0; i < vm->def->ndisks; i++) {
+ if (vm->def->disks[i] == disk) {
+ virDomainDiskRemove(vm->def, i);
+ break;
+ }
+ }
+
+ /* check if the last disk with managed PR was just removed */
+ prUsed = virDomainDefHasManagedPR(vm->def);
+
qemuDomainObjEnterMonitor(driver, vm);
qemuMonitorDriveDel(priv->mon, drivestr);
@@ -3892,12 +3904,16 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
VIR_FREE(encAlias);
/* If it fails, then so be it - it was a best shot */
- if (disk->src->pr)
+ if (disk->src->pr &&
+ !virStoragePRDefIsManaged(disk->src->pr))
ignore_value(qemuMonitorDelObject(priv->mon, disk->src->pr->mgralias));
if (disk->src->haveTLS)
ignore_value(qemuMonitorDelObject(priv->mon, disk->src->tlsAlias));
+ if (prManaged && !prUsed)
+ ignore_value(qemuMonitorDelObject(priv->mon, qemuDomainGetManagedPRAlias()));
+
if (qemuDomainObjExitMonitor(driver, vm) < 0)
return -1;
@@ -3906,16 +3922,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
event = virDomainEventDeviceRemovedNewFromObj(vm, disk->info.alias);
qemuDomainEventQueue(driver, event);
- for (i = 0; i < vm->def->ndisks; i++) {
- if (vm->def->disks[i] == disk) {
- virDomainDiskRemove(vm->def, i);
- break;
- }
- }
-
- /* check if the last disk with managed PR was just removed */
- if (priv->prDaemonRunning &&
- !virDomainDefHasManagedPR(vm->def))
+ if (prManaged && !prUsed)
qemuProcessKillManagedPRDaemon(vm);
qemuDomainReleaseDeviceAddress(vm, &disk->info, src);
--
2.16.2
6 years, 5 months
[libvirt] [RFC 0/4] add automatic cleanup functionality in some files
by Sukrit Bhatnagar
This series of patches aim at augmenting our discussion about the
design for implementing the cleanup attribute.
A set of macros have been added at the end of viralloc.h
A few files have been modified to use the newly created macros.
Sukrit Bhatnagar (4):
add macros for implementing automatic cleanup functionality
add automatic cleanup support in src/util/virarptable.c
add automatic cleanup support in src/util/virauthconfig.c
add automatic cleanup support in src/util/virauth.c
src/util/viralloc.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
src/util/virarptable.c | 9 ++-----
src/util/virauth.c | 66 +++++++++++++++++----------------------------
src/util/virauthconfig.c | 34 +++++++++---------------
src/util/virauthconfig.h | 3 +++
5 files changed, 110 insertions(+), 71 deletions(-)
--
1.8.3.1
6 years, 5 months
[libvirt] ANNOUNCE: virt-bootstrap 1.1.0 released
by Cedric Bosdonnat
I'm happy to announce the release of virt-bootstrap 1.1.0!
virt-bootstrap is a tool providing an easy way to setup the root file
system for libvirt-based containers.
The release can be downloaded from:
http://virt-manager.org/download/
This release includes:
- safe_untar: check for permissions to set attribs (Radostin Stoyanov)
- docker source, support blobs without .tar extension (Radostin Stoyanov)
- docker-source, preserve extended file attributes (Radostin Stoyanov)
- docker-source, get list of layers without `--raw` (Radostin Stoyanov)
- docker-source, void skopeo copy in cache (Radostin Stoyanov)
- Show error when guestfs-python or skopeo is not installed (Radostin Stoyanov)
- pylint cleanups (Radostin Stoyanov)
Thanks to everyone who has contributed to this release through testing,
bug reporting, submitting patches, and otherwise sending in feedback!
Thanks,
--
Cédric
6 years, 5 months
[libvirt] [PATCH] testUpdateQEMUCaps: Don't leak host cpuData
by Michal Privoznik
When preparing qemuCaps for test cases the following is
happening:
qemuTestParseCapabilitiesArch() is called, which calls
virQEMUCapsLoadCache() which in turn calls
virQEMUCapsInitHostCPUModel() which sets qemuCaps->kvmCPU and
qemuCaps->tcgCPU.
But then the code tries to update the capabilities:
testCompareXMLToArgv() calls testUpdateQEMUCaps() which calls
virQEMUCapsInitHostCPUModel() again overwriting previously
allocated memory. The solution is to free host cpuData in
testUpdateQEMUCaps().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Technically this is v2 of [1] but since it implements completely
different approach I'm sending it as v1.
1: https://www.redhat.com/archives/libvir-list/2018-May/msg02260.html
src/qemu/qemu_capabilities.c | 21 +++++++++++++++++++--
src/qemu/qemu_capspriv.h | 4 ++++
tests/qemuxml2argvtest.c | 3 +++
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index e2e76e4dd8..ea1ff520d8 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1516,12 +1516,19 @@ virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUDataPtr dst,
static void
-virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData)
+virQEMUCapsHostCPUDataClearHostCPU(virQEMUCapsHostCPUDataPtr cpuData)
{
- qemuMonitorCPUModelInfoFree(cpuData->info);
virCPUDefFree(cpuData->reported);
virCPUDefFree(cpuData->migratable);
virCPUDefFree(cpuData->full);
+}
+
+
+static void
+virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData)
+{
+ qemuMonitorCPUModelInfoFree(cpuData->info);
+ virQEMUCapsHostCPUDataClearHostCPU(cpuData);
memset(cpuData, 0, sizeof(*cpuData));
}
@@ -2834,6 +2841,16 @@ virQEMUCapsNewHostCPUModel(void)
}
+void
+virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps,
+ virDomainVirtType type)
+{
+ virQEMUCapsHostCPUDataPtr cpuData = virQEMUCapsGetHostCPUData(qemuCaps, type);
+
+ virQEMUCapsHostCPUDataClearHostCPU(cpuData);
+}
+
+
void
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h
index 0199501c93..fea039ef3a 100644
--- a/src/qemu/qemu_capspriv.h
+++ b/src/qemu/qemu_capspriv.h
@@ -56,6 +56,10 @@ void
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
virArch arch);
+void
+virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps,
+ virDomainVirtType type);
+
void
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
virArch hostArch,
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a6a40e273e..61c7ae59aa 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -388,6 +388,9 @@ testUpdateQEMUCaps(const struct testInfo *info,
if (testAddCPUModels(info->qemuCaps, info->skipLegacyCPUs) < 0)
goto cleanup;
+ virQEMUCapsFreeHostCPUModel(info->qemuCaps, VIR_DOMAIN_VIRT_KVM);
+ virQEMUCapsFreeHostCPUModel(info->qemuCaps, VIR_DOMAIN_VIRT_QEMU);
+
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch,
VIR_DOMAIN_VIRT_KVM);
virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch,
--
2.16.4
6 years, 5 months
[libvirt] [PATCH v2 0/5] qemu: Forbid old qcow/qcow2 encryption
by Peter Krempa
The old qcow/qcow2 encryption format is so broken that qemu decided to
drop it completely. This series forbids the use of such images even with
qemus prior to this and removes all the cruft necessary to support it.
v2:
- fixed check to include the qcow format too
- reworded the error message slightly
- split second patch into two with proper justification for the
user-alias test since checking LUKS there actually makes sense
Peter Krempa (5):
tests: qemuxml2argv: Drop disk encryption from 'interface-server' test
tests: qemuxml2argv: Verify that disk secret alias is correct with
user-aliases
tests: qemublock: Switch to qcow2+luks in test files
qemu: domain: Forbid storage with old QCOW2 encryption
qemu: Remove code for setting up disk passphrases
src/qemu/qemu_domain.c | 10 ++
src/qemu/qemu_monitor.c | 13 ---
src/qemu/qemu_monitor.h | 4 -
src/qemu/qemu_monitor_json.c | 28 ------
src/qemu/qemu_monitor_json.h | 4 -
src/qemu/qemu_process.c | 103 ---------------------
.../file-qcow2-backing-chain-encryption.json | 2 +-
.../file-qcow2-backing-chain-encryption.xml | 2 +-
...etwork-qcow2-backing-chain-encryption_auth.json | 2 +-
...network-qcow2-backing-chain-encryption_auth.xml | 2 +-
tests/qemumonitorjsontest.c | 2 -
tests/qemuxml2argvdata/encrypted-disk-usage.args | 8 +-
tests/qemuxml2argvdata/encrypted-disk-usage.xml | 2 +-
tests/qemuxml2argvdata/encrypted-disk.args | 8 +-
tests/qemuxml2argvdata/encrypted-disk.xml | 2 +-
tests/qemuxml2argvdata/interface-server.xml | 3 -
tests/qemuxml2argvdata/user-aliases.args | 8 +-
tests/qemuxml2argvdata/user-aliases.xml | 2 +-
tests/qemuxml2argvtest.c | 7 +-
tests/qemuxml2xmloutdata/encrypted-disk.xml | 2 +-
tests/qemuxml2xmloutdata/interface-server.xml | 3 -
tests/qemuxml2xmltest.c | 6 +-
22 files changed, 46 insertions(+), 177 deletions(-)
--
2.16.2
6 years, 5 months
[libvirt] [PATCH 00/38] qemu: Refactor secret/TLS setup and add TLS for nbd
by Peter Krempa
This series consists of the following changes:
1) refactors to handling of the TLS object and secret alias
2) storage of 'secret' object aliases in the status XML
3) fix of disk-unplug with TLS after libvirtd restart
4) Adding support for TLS for NBD disks (originally used to reproduce
problem with detach of TLS
object after libvirtd restart)
Few parts could be considered separate but since the end of the series
builds up on the various pieces it would be very unpleasant to post
separately.
Peter Krempa (38):
qemu: domain: Add helper to check if encrypted secrets can be used
with a VM
qemu: domain: Reuse code when preparing hostdev auth secrets
qemu: domain: Rename qemuDomainSecretDiskCapable
qemu: domain: Rename and fix docs for qemuDomainSecretInfoNew
qemu: domain: Add new function to set up encrypted secrets only
qemu: domain: Setup disk encryption password secret via new helper
qemu: domain: Use qemuDomainSecretInfoNewPlain only for unencrypted
secrets
qemu: domain: Add helpers for partially clearing
qemuDomainSecretInfoPtr
qemu: domain: Don't delete aliases of secret objects associated with
disks
qemu: Store and parse disk authentication and encryption secret alias
tests: qemustatusxml2xml: Add test data for re-generating LUKS/auth
aliases
qemu: domain: Regenerate auth/enc secret aliases when restoring status
XML
qemu: hotplug: Don't try to infer secret object alias/presence
qemu: hotplug: Use 'tlsAlias' to see whether to detach the disk
qemu: domain: Store and restore TLS object alias of a disk
qemu: domain: Regenerate alias for the TLS x509 credential object
qemu: domain: Properly setup data relevant for top disk image
qemu: domain: don't loop through images in
qemuDomainPrepareDiskSourceChain
qemu: domain: Split validation and setup of the virStorageSource
qemu: domain: aggregate setup of disk drive options for -drive
qemu: domain: Separate setup of TLS for VXHS disks from
qemuDomainPrepareDiskSourceTLS
qemu: domain: Use switch statement in qemuDomainPrepareDiskSourceTLS
qemu: domain: Process only one object in
qemuDomainPrepareDiskSourceTLS
qemu: domain: Forbid TLS setup for disk protocols not supporting it
conf: Don't encode matrix of storage protocols supporting TLS in the
parser
qemu: hotplug: Don't mandate passing of 'secAlias' in
qemuDomainGetTLSObjects
qemu: hotplug: Allow passing in NULL 'tlsAlias' to
qemuDomainGetTLSObjects
qemu: domain: Set up disk TLS alias when preparing TLS setup
qemu: command: Don't generate alias for TLS private key password
secret
qemu: command: Pass in alias for TLS object to
qemuBuildTLSx509CommandLine
qemu: command: Always setup TLS environment if src->haveTLS is on
qemu: migration: Don't pass around secAlias
qemu: hotplug: Pass around existing secret object alias from
qemuDomainAddChardevTLSObjects
qemu: hotplug: Remove misleading comment in qemuDomainGetTLSObjects
qemu: hotplug: Drop 'secAlias' output parameter from
qemuDomainGetTLSObjects
qemu: hotplug: Remove TLS alias generation from
qemuDomainGetTLSObjects
tests: qemu: Rename disk-drive-network-tlsx509-vxhs test
qemu: domain: Add support for TLS for NBD with default TLS env
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 14 +-
src/qemu/qemu_command.c | 75 ++-
src/qemu/qemu_domain.c | 658 +++++++++++++++------
src/qemu/qemu_domain.h | 20 +-
src/qemu/qemu_hotplug.c | 95 ++-
src/qemu/qemu_hotplug.h | 5 +-
src/qemu/qemu_migration.c | 8 +-
src/qemu/qemu_migration_params.c | 23 +-
src/qemu/qemu_migration_params.h | 1 -
tests/qemublocktest.c | 9 +-
.../disk-secinfo-upgrade-in.xml | 517 ++++++++++++++++
.../disk-secinfo-upgrade-out.xml | 538 +++++++++++++++++
tests/qemustatusxml2xmldata/modern-in.xml | 5 +
...9-vxhs.args => disk-drive-network-tlsx509.args} | 9 +-
...509-vxhs.xml => disk-drive-network-tlsx509.xml} | 8 +
tests/qemuxml2argvtest.c | 4 +-
...509-vxhs.xml => disk-drive-network-tlsx509.xml} | 8 +
tests/qemuxml2xmltest.c | 3 +-
19 files changed, 1663 insertions(+), 342 deletions(-)
create mode 100644 tests/qemustatusxml2xmldata/disk-secinfo-upgrade-in.xml
create mode 100644 tests/qemustatusxml2xmldata/disk-secinfo-upgrade-out.xml
rename tests/qemuxml2argvdata/{disk-drive-network-tlsx509-vxhs.args => disk-drive-network-tlsx509.args} (82%)
rename tests/qemuxml2argvdata/{disk-drive-network-tlsx509-vxhs.xml => disk-drive-network-tlsx509.xml} (85%)
rename tests/qemuxml2xmloutdata/{disk-drive-network-tlsx509-vxhs.xml => disk-drive-network-tlsx509.xml} (86%)
--
2.16.2
6 years, 5 months
[libvirt] [PATCH] audit: Enforce enum switch type cast in virDomainAuditHostdev
by Erik Skultety
There was a missing enum for mdev causing a strange 'unknown device type'
warning when hot-plugging mdev.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1583927
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/conf/domain_audit.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index 82868bca76..14138d93af 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -361,6 +361,7 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
virDomainHostdevSubsysPCIPtr pcisrc = &hostdev->source.subsys.u.pci;
virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
virDomainHostdevSubsysSCSIVHostPtr hostsrc = &hostdev->source.subsys.u.scsi_host;
+ virDomainHostdevSubsysMediatedDevPtr mdevsrc = &hostdev->source.subsys.u.mdev;
virUUIDFormat(vm->def->uuid, uuidstr);
if (!(vmname = virAuditEncode("vm", vm->def->name))) {
@@ -373,9 +374,9 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
virt = "?";
}
- switch (hostdev->mode) {
+ switch ((virDomainHostdevMode) hostdev->mode) {
case VIR_DOMAIN_HOSTDEV_MODE_SUBSYS:
- switch (hostdev->source.subsys.type) {
+ switch ((virDomainHostdevSubsysType) hostdev->source.subsys.type) {
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI:
if (virAsprintfQuiet(&address, "%.4x:%.2x:%.2x.%.1x",
pcisrc->addr.domain,
@@ -419,6 +420,13 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
goto cleanup;
}
break;
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV:
+ if (VIR_STRDUP_QUIET(address, mdevsrc->uuidstr) < 0) {
+ VIR_WARN("OOM while enconding audit message");
+ goto cleanup;
+ }
+ break;
+ case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST:
default:
VIR_WARN("Unexpected hostdev type while encoding audit message: %d",
hostdev->source.subsys.type);
@@ -470,6 +478,7 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
}
break;
+ case VIR_DOMAIN_HOSTDEV_MODE_LAST:
default:
VIR_WARN("Unexpected hostdev mode while encoding audit message: %d",
hostdev->mode);
--
2.14.3
6 years, 5 months
[libvirt] [PATCH 1/1] conf: fixup USB input bus check
by Xiao Feng Ren
This patch fixes the USB input bus check, the bug was introduced by commit 317badb
Signed-off-by: Xiao Feng Ren <renxiaof(a)linux.vnet.ibm.com>
---
src/conf/domain_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 27e2bd50eb..e4d39c06e8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -27878,7 +27878,7 @@ virDomainDeviceIsUSB(virDomainDeviceDefPtr dev)
if ((t == VIR_DOMAIN_DEVICE_DISK &&
dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) ||
(t == VIR_DOMAIN_DEVICE_INPUT &&
- dev->data.input->type == VIR_DOMAIN_INPUT_BUS_USB) ||
+ dev->data.input->bus == VIR_DOMAIN_INPUT_BUS_USB) ||
(t == VIR_DOMAIN_DEVICE_HOSTDEV &&
dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->data.hostdev->source.subsys.type ==
--
2.16.3
6 years, 5 months