From: Paolo Bonzini <pbonzini@xxxxxxxxxx> Adding a new model for virtio-scsi roughly follows the same scheme as the previous patch. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- --- docs/formatdomain.html.in | 2 +- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 3 ++- src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 3 +++ src/vmx/vmx.c | 3 ++- 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 2dd3fd2..29497a0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1658,7 +1658,7 @@ control how many devices can be connected through the controller. A "scsi" controller has an optional attribute <code>model</code>, which is one of "auto", "buslogic", - "ibmvscsi", "lsilogic", "lsias1068" or "vmpvscsi". + "ibmvscsi", "lsilogic", "lsias1068", "virtio-scsi" or "vmpvscsi". A "usb" controller has an optional attribute <code>model</code>, which is one of "piix3-uhci", "piix4-uhci", "ehci", "ich9-ehci1", "ich9-uhci1", "ich9-uhci2", "ich9-uhci3", diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index d3deaea..724d7d0 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1121,6 +1121,7 @@ <value>lsisas1068</value> <value>vmpvscsi</value> <value>ibmvscsi</value> + <value>virtio-scsi</value> <value>piix3-uhci</value> <value>piix4-uhci</value> <value>ehci</value> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a23be05..2da41f8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -239,7 +239,8 @@ VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAS "lsilogic", "lsisas1068", "vmpvscsi", - "ibmvscsi") + "ibmvscsi", + "virtio-scsi") VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST, "piix3-uhci", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index aa8c824..777bccb 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -453,6 +453,7 @@ enum virDomainControllerModelSCSI { VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSISAS1068, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI, + VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST }; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0cc552f..ba22127 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2360,6 +2360,9 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef ATTRIBUTE_UNUSED, switch (def->type) { case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: switch (def->model) { + case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: + virBufferAddLit(&buf, "virtio-scsi-pci"); + break; case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC: virBufferAddLit(&buf, "lsi"); break; diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 5ebd81d..1fdbd50 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -491,7 +491,8 @@ VIR_ENUM_IMPL(virVMXControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, "lsilogic", "lsisas1068", "pvscsi", - "UNUSED ibmvscsi"); + "UNUSED ibmvscsi", + "UNUSED virtio-scsi"); -- 1.7.7.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list