https://bugzilla.redhat.com/show_bug.cgi?id=1225339
---
src/conf/domain_conf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 33470ffcb..478feb92d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5287,6 +5287,13 @@ virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev)
}
break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB:
+ if (hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE
&&
+ hostdev->info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_USB) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("USB host device must use 'usb' address
type"));
+ return -1;
+ }
+ break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV:
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST:
break;
--
2.13.0