From: Ján Tomko Date: Tue, 25 Feb 2020 14:44:23 +0000 (+0100) Subject: conf: only allow virtio bus for input passthrough X-Git-Tag: v6.2.0-rc1~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33bc3ffe545cb04b7f48cc3354c37d7ac5cc3ee0;p=thirdparty%2Flibvirt.git conf: only allow virtio bus for input passthrough Other buses are not supported. Signed-off-by: Ján Tomko https://bugzilla.redhat.com/show_bug.cgi?id=1724928 Reviewed-by: Daniel Henrique Barboza --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bfb95dd2ce..fd0578504c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6620,6 +6620,12 @@ virDomainInputDefValidate(const virDomainInputDef *input) break; case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH: + if (input->bus != VIR_DOMAIN_INPUT_BUS_VIRTIO) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("only bus 'virtio' is supported for 'passthrough' " + "input devices")); + return -1; + } break; case VIR_DOMAIN_INPUT_TYPE_LAST: