From 8dcac770f1f5bd966968962de905ab37eb17488a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 27 Feb 2012 17:16:20 +0800 Subject: [PATCH] qemu: add virtio-scsi controller model Adding a new model for virtio-scsi roughly follows the same scheme as the previous patch. Signed-off-by: Paolo Bonzini --- 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 25f8da5da0..29497a059e 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 model, 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 model, 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 d3deaea457..724d7d04e9 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1121,6 +1121,7 @@ lsisas1068 vmpvscsi ibmvscsi + virtio-scsi piix3-uhci piix4-uhci ehci diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 18e8b97d2d..93501cf316 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 aa8c824589..777bccb9b1 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 90d9948c5d..63f6a05e95 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2375,6 +2375,9 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef, model = qemuDefaultScsiControllerModel(domainDef); } switch (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 5eb7acba5e..75cb6d1910 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"); -- GitLab