conf: only allow virtio bus for input passthrough

Other buses are not supported.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1724928
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Ján Tomko 2020-02-25 15:44:23 +01:00
parent 0627150a56
commit 33bc3ffe54

View File

@ -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: