[libvirt] [PATCH v2 0/5] Add "rawio" for hostdev

v1 is here: http://www.redhat.com/archives/libvir-list/2014-September/msg00502.html Changes since v1 (from code review): * Insert patch 1 to insert a missing goto if rawio is set, but the build doesn't suport CAP_SYS_RAWIO. * Insert patch 2 to use the TristateBool for virDomainDiskDef and the associated changes where it's used in code * Patch 3, 4, 5: Use TristateBool for hostdev rawio and the virYesNo in the rng John Ferlan (5): qemu: Add missing goto on rawio domain_conf: Change virDomainDiskDef 'rawio' to use virTristateBool hostdev: Add "rawio" attribute to _virDomainHostdevSubsysSCSI qemu: Process the hostdev "rawio" setting domain_conf: Process the "rawio" for a hostdev device docs/formatdomain.html.in | 12 +++++-- docs/schemas/domaincommon.rng | 12 +++++-- src/conf/domain_conf.c | 40 +++++++++++++++------- src/conf/domain_conf.h | 4 +-- src/qemu/qemu_domain.c | 23 +++++++++++-- src/qemu/qemu_domain.h | 4 +++ src/qemu/qemu_driver.c | 1 + src/qemu/qemu_process.c | 23 ++++++++++++- .../qemuxml2argv-hostdev-scsi-rawio.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 10 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml -- 1.9.3

Commit id '9a2f36ec' added a build conditional of CAP_SYS_RAWIO in order to determine whether or not a disk definition using rawio should be allowed on platforms without CAP_SYS_RAWIO. If one was found, virReportError was used but the code didn't goto cleanup. This patch adds the goto. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/qemu/qemu_process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 245a93c..eecef12 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4357,13 +4357,15 @@ int qemuProcessStart(virConnectPtr conn, virDomainDeviceDef dev; virDomainDiskDefPtr disk = vm->def->disks[i]; - if (vm->def->disks[i]->rawio == 1) + if (vm->def->disks[i]->rawio == 1) { #ifdef CAP_SYS_RAWIO virCommandAllowCap(cmd, CAP_SYS_RAWIO); #else virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Raw I/O is not supported on this platform")); + goto cleanup; #endif + } dev.type = VIR_DOMAIN_DEVICE_DISK; dev.data.disk = disk; -- 1.9.3

Adjust disk definition for 'rawio' to use the TristateBool logic Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/domain_conf.c | 16 ++++------------ src/conf/domain_conf.h | 3 +-- src/qemu/qemu_domain.c | 5 +++-- src/qemu/qemu_process.c | 2 +- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3ccec1c..c240c83 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5954,12 +5954,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, } if (rawio) { - def->rawio_specified = true; - if (STREQ(rawio, "yes")) { - def->rawio = 1; - } else if (STREQ(rawio, "no")) { - def->rawio = 0; - } else { + if ((def->rawio = virTristateBoolTypeFromString(rawio)) <= 0) { virReportError(VIR_ERR_XML_ERROR, _("unknown disk rawio setting '%s'"), rawio); @@ -15828,12 +15823,9 @@ virDomainDiskDefFormat(virBufferPtr buf, virBufferAsprintf(buf, "<disk type='%s' device='%s'", type, device); - if (def->rawio_specified) { - if (def->rawio == 1) { - virBufferAddLit(buf, " rawio='yes'"); - } else if (def->rawio == 0) { - virBufferAddLit(buf, " rawio='no'"); - } + if (def->rawio) { + virBufferAsprintf(buf, " rawio='%s'", + virTristateBoolTypeToString(def->rawio)); } if (def->sgio) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 640a4c5..afd9943 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -663,8 +663,7 @@ struct _virDomainDiskDef { int startupPolicy; /* enum virDomainStartupPolicy */ bool transient; virDomainDeviceInfo info; - bool rawio_specified; - int rawio; /* no = 0, yes = 1 */ + int rawio; /* enum virTristateBool */ int sgio; /* enum virDomainDeviceSGIO */ int discard; /* enum virDomainDiskDiscard */ unsigned int iothread; /* unused = 0, > 0 specific thread # */ diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 5859ba7..075406e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1945,8 +1945,9 @@ void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver, cfg->allowDiskFormatProbing) qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_DISK_PROBING, logFD); - if (disk->rawio == 1) - qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES, logFD); + if (disk->rawio == VIR_TRISTATE_BOOL_YES) + qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES, + logFD); virObjectUnref(cfg); } diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index eecef12..43cf396 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4357,7 +4357,7 @@ int qemuProcessStart(virConnectPtr conn, virDomainDeviceDef dev; virDomainDiskDefPtr disk = vm->def->disks[i]; - if (vm->def->disks[i]->rawio == 1) { + if (vm->def->disks[i]->rawio == VIR_TRISTATE_BOOL_YES) { #ifdef CAP_SYS_RAWIO virCommandAllowCap(cmd, CAP_SYS_RAWIO); #else -- 1.9.3

Add the 'rawio' attribute to match _virDomainDiskDef Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/conf/domain_conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index afd9943..47a1851 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -439,6 +439,7 @@ typedef virDomainHostdevSubsysSCSI *virDomainHostdevSubsysSCSIPtr; struct _virDomainHostdevSubsysSCSI { int protocol; /* enum virDomainHostdevSCSIProtocolType */ int sgio; /* enum virDomainDeviceSGIO */ + int rawio; /* enum virTristateBool */ union { virDomainHostdevSubsysSCSIHost host; virDomainHostdevSubsysSCSIiSCSI iscsi; -- 1.9.3

Mimic the "Disk" processing for 'rawio', but for a scsi_host hostdev lun device. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/qemu/qemu_domain.c | 18 ++++++++++++++++++ src/qemu/qemu_domain.h | 4 ++++ src/qemu/qemu_driver.c | 1 + src/qemu/qemu_process.c | 19 +++++++++++++++++++ 4 files changed, 42 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 075406e..95b71b7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1926,6 +1926,10 @@ void qemuDomainObjCheckTaint(virQEMUDriverPtr driver, for (i = 0; i < obj->def->ndisks; i++) qemuDomainObjCheckDiskTaint(driver, obj, obj->def->disks[i], logFD); + for (i = 0; i < obj->def->nhostdevs; i++) + qemuDomainObjCheckHostdevTaint(driver, obj, obj->def->hostdevs[i], + logFD); + for (i = 0; i < obj->def->nnets; i++) qemuDomainObjCheckNetTaint(driver, obj, obj->def->nets[i], logFD); @@ -1953,6 +1957,20 @@ void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver, } +void qemuDomainObjCheckHostdevTaint(virQEMUDriverPtr driver, + virDomainObjPtr obj, + virDomainHostdevDefPtr hostdev, + int logFD) +{ + virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi; + + if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI && + scsisrc->rawio == VIR_TRISTATE_BOOL_YES) + qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES, + logFD); +} + + void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver, virDomainObjPtr obj, virDomainNetDefPtr net, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 4ae2c57..d21acd7 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -301,6 +301,10 @@ void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver, virDomainObjPtr obj, virDomainDiskDefPtr disk, int logFD); +void qemuDomainObjCheckHostdevTaint(virQEMUDriverPtr driver, + virDomainObjPtr obj, + virDomainHostdevDefPtr disk, + int logFD); void qemuDomainObjCheckNetTaint(virQEMUDriverPtr driver, virDomainObjPtr obj, virDomainNetDefPtr net, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f28082f..b888b09 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6581,6 +6581,7 @@ qemuDomainAttachDeviceLive(virDomainObjPtr vm, break; case VIR_DOMAIN_DEVICE_HOSTDEV: + qemuDomainObjCheckHostdevTaint(driver, vm, dev->data.hostdev, -1); ret = qemuDomainAttachHostDevice(dom->conn, driver, vm, dev->data.hostdev); if (!ret) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 43cf396..8e3ae9b 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3983,6 +3983,7 @@ int qemuProcessStart(virConnectPtr conn, struct qemuProcessHookData hookData; unsigned long cur_balloon; size_t i; + bool rawio_set = false; char *nodeset = NULL; virBitmapPtr nodemask = NULL; unsigned int stop_flags; @@ -4360,6 +4361,7 @@ int qemuProcessStart(virConnectPtr conn, if (vm->def->disks[i]->rawio == VIR_TRISTATE_BOOL_YES) { #ifdef CAP_SYS_RAWIO virCommandAllowCap(cmd, CAP_SYS_RAWIO); + rawio_set = true; #else virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Raw I/O is not supported on this platform")); @@ -4376,6 +4378,23 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; } + /* If rawio not already set, check hostdevs as well */ + if (!rawio_set) { + for (i = 0; i < vm->def->nhostdevs; i++) { + virDomainHostdevSubsysSCSIPtr scsisrc = + &vm->def->hostdevs[i]->source.subsys.u.scsi; + if (scsisrc->rawio == VIR_TRISTATE_BOOL_YES) { +#ifdef CAP_SYS_RAWIO + virCommandAllowCap(cmd, CAP_SYS_RAWIO); +#else + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Raw I/O is not supported on this platform")); + goto cleanup; +#endif + } + } + } + virCommandSetPreExecHook(cmd, qemuProcessHook, &hookData); virCommandSetMaxProcesses(cmd, cfg->maxProcesses); virCommandSetMaxFiles(cmd, cfg->maxFiles); -- 1.9.3

On 09/19/2014 12:17 PM, John Ferlan wrote:
Mimic the "Disk" processing for 'rawio', but for a scsi_host hostdev lun device.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/qemu/qemu_domain.c | 18 ++++++++++++++++++ src/qemu/qemu_domain.h | 4 ++++ src/qemu/qemu_driver.c | 1 + src/qemu/qemu_process.c | 19 +++++++++++++++++++ 4 files changed, 42 insertions(+)
@@ -4376,6 +4378,23 @@ int qemuProcessStart(virConnectPtr conn, goto cleanup; }
+ /* If rawio not already set, check hostdevs as well */ + if (!rawio_set) { + for (i = 0; i < vm->def->nhostdevs; i++) { + virDomainHostdevSubsysSCSIPtr scsisrc = + &vm->def->hostdevs[i]->source.subsys.u.scsi; + if (scsisrc->rawio == VIR_TRISTATE_BOOL_YES) { +#ifdef CAP_SYS_RAWIO + virCommandAllowCap(cmd, CAP_SYS_RAWIO);
You can break; here.
+#else + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Raw I/O is not supported on this platform")); + goto cleanup; +#endif + } + } + } + virCommandSetPreExecHook(cmd, qemuProcessHook, &hookData); virCommandSetMaxProcesses(cmd, cfg->maxProcesses); virCommandSetMaxFiles(cmd, cfg->maxFiles);
Jan

Add a "rawio" to the hostdev XML and process it mimicing the disk XML for a lun which supports/requires rawio Signed-off-by: John Ferlan <jferlan@redhat.com> --- docs/formatdomain.html.in | 12 ++++++-- docs/schemas/domaincommon.rng | 12 ++++++-- src/conf/domain_conf.c | 24 +++++++++++++++ .../qemuxml2argv-hostdev-scsi-rawio.xml | 35 ++++++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 8c03ebb..5e2b65a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1815,7 +1815,7 @@ <dt><code>rawio</code> attribute <span class="since">since 0.9.10</span></dt> <dd> - Indicates whether the disk is needs rawio capability; valid + Indicates whether the disk needs rawio capability. Valid settings are "yes" or "no" (default is "no"). If any one disk in a domain has rawio='yes', rawio capability will be enabled for all disks in the domain (because, in the case of QEMU, this @@ -2925,7 +2925,7 @@ <pre> ... <devices> - <hostdev mode='subsystem' type='scsi'> + <hostdev mode='subsystem' type='scsi' sgio='filtered' rawio='yes'> <source> <adapter name='scsi_host0'/> <address type='scsi' bus='0' target='0' unit='0'/> @@ -2984,7 +2984,13 @@ (<span class="since">since 1.0.6</span>) attribute indicates whether the kernel will filter unprivileged SG_IO commands for the disk, valid settings are "filtered" or "unfiltered". - The default is "filtered". + The default is "filtered". The optional <code>rawio</code> + (<span class="since">since 1.2.9</span>) attribute indicates + whether the lun needs the rawio capability. Valid settings are + "yes" or "no". See the rawio description within the + <a href="#elementsDisks">disk</a> section. + If a disk lun in the domain already has the rawio capability, + then this setting not required. </dd> </dl> </dd> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 19dc82f..36bc184 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1252,9 +1252,7 @@ </choice> </attribute> <optional> - <attribute name="rawio"> - <ref name="virYesNo"/> - </attribute> + <ref name="rawIO"/> </optional> <optional> <attribute name="sgio"> @@ -3577,6 +3575,9 @@ </choice> </attribute> </optional> + <optional> + <ref name="rawIO"/> + </optional> <element name="source"> <choice> <group> <!-- scsi_host adapter --> @@ -4937,4 +4938,9 @@ </optional> </element> </define> + <define name="rawIO"> + <attribute name="rawio"> + <ref name="virYesNo"/> + </attribute> + </define> </grammar> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c240c83..bb4a4cb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4504,6 +4504,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, xmlNodePtr sourcenode; char *managed = NULL; char *sgio = NULL; + char *rawio = NULL; char *backendStr = NULL; int backend; int ret = -1; @@ -4521,6 +4522,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, } sgio = virXMLPropString(node, "sgio"); + rawio = virXMLPropString(node, "rawio"); /* @type is passed in from the caller rather than read from the * xml document, because it is specified in different places for @@ -4572,6 +4574,21 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, } } + if (rawio) { + if (def->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("rawio is only supported for scsi host device")); + goto error; + } + + if ((scsisrc->rawio = virTristateBoolTypeFromString(rawio)) <= 0) { + virReportError(VIR_ERR_XML_ERROR, + _("unknown hostdev rawio setting '%s'"), + rawio); + goto error; + } + } + switch (def->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: if (virDomainHostdevSubsysPCIDefParseXML(sourcenode, def, flags) < 0) @@ -4611,6 +4628,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node, error: VIR_FREE(managed); VIR_FREE(sgio); + VIR_FREE(rawio); VIR_FREE(backendStr); return ret; } @@ -17804,6 +17822,12 @@ virDomainHostdevDefFormat(virBufferPtr buf, scsisrc->sgio) virBufferAsprintf(buf, " sgio='%s'", virDomainDeviceSGIOTypeToString(scsisrc->sgio)); + + if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI && + scsisrc->rawio) { + virBufferAsprintf(buf, " rawio='%s'", + virTristateBoolTypeToString(scsisrc->rawio)); + } } virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml new file mode 100644 index 0000000..69fdde3 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml @@ -0,0 +1,35 @@ +<domain type='qemu'> + <name>QEMUGuest2</name> + <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='scsi' index='0' model='virtio-scsi'/> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <hostdev mode='subsystem' type='scsi' managed='yes' sgio='unfiltered' rawio='yes'> + <source> + <adapter name='scsi_host0'/> + <address bus='0' target='0' unit='0'/> + </source> + <address type='drive' controller='0' bus='0' target='4' unit='8'/> + </hostdev> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 675403a..56a371e 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -369,6 +369,7 @@ mymain(void) DO_TEST("disk-copy_on_read"); DO_TEST("hostdev-scsi-shareable"); DO_TEST("hostdev-scsi-sgio"); + DO_TEST("hostdev-scsi-rawio"); DO_TEST_DIFFERENT("hostdev-scsi-autogen-address"); -- 1.9.3

On 09/19/2014 12:17 PM, John Ferlan wrote:
v1 is here: http://www.redhat.com/archives/libvir-list/2014-September/msg00502.html
Changes since v1 (from code review):
* Insert patch 1 to insert a missing goto if rawio is set, but the build doesn't suport CAP_SYS_RAWIO. * Insert patch 2 to use the TristateBool for virDomainDiskDef and the associated changes where it's used in code * Patch 3, 4, 5: Use TristateBool for hostdev rawio and the virYesNo in the rng
John Ferlan (5): qemu: Add missing goto on rawio domain_conf: Change virDomainDiskDef 'rawio' to use virTristateBool
hostdev: Add "rawio" attribute to _virDomainHostdevSubsysSCSI
I think the above commit should be squashed with the domain_conf patch below.
qemu: Process the hostdev "rawio" setting
And this one moved to the end, since it depends on it.
domain_conf: Process the "rawio" for a hostdev device
docs/formatdomain.html.in | 12 +++++-- docs/schemas/domaincommon.rng | 12 +++++-- src/conf/domain_conf.c | 40 +++++++++++++++------- src/conf/domain_conf.h | 4 +-- src/qemu/qemu_domain.c | 23 +++++++++++-- src/qemu/qemu_domain.h | 4 +++ src/qemu/qemu_driver.c | 1 + src/qemu/qemu_process.c | 23 ++++++++++++- .../qemuxml2argv-hostdev-scsi-rawio.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 10 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml
ACK series Jan

On 09/19/2014 07:38 AM, Ján Tomko wrote:
On 09/19/2014 12:17 PM, John Ferlan wrote:
v1 is here: http://www.redhat.com/archives/libvir-list/2014-September/msg00502.html
Changes since v1 (from code review):
* Insert patch 1 to insert a missing goto if rawio is set, but the build doesn't suport CAP_SYS_RAWIO. * Insert patch 2 to use the TristateBool for virDomainDiskDef and the associated changes where it's used in code * Patch 3, 4, 5: Use TristateBool for hostdev rawio and the virYesNo in the rng
John Ferlan (5): qemu: Add missing goto on rawio domain_conf: Change virDomainDiskDef 'rawio' to use virTristateBool
hostdev: Add "rawio" attribute to _virDomainHostdevSubsysSCSI
I think the above commit should be squashed with the domain_conf patch below.
qemu: Process the hostdev "rawio" setting
And this one moved to the end, since it depends on it.
domain_conf: Process the "rawio" for a hostdev device
docs/formatdomain.html.in | 12 +++++-- docs/schemas/domaincommon.rng | 12 +++++-- src/conf/domain_conf.c | 40 +++++++++++++++------- src/conf/domain_conf.h | 4 +-- src/qemu/qemu_domain.c | 23 +++++++++++-- src/qemu/qemu_domain.h | 4 +++ src/qemu/qemu_driver.c | 1 + src/qemu/qemu_process.c | 23 ++++++++++++- .../qemuxml2argv-hostdev-scsi-rawio.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 10 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-rawio.xml
ACK series
Jan
I merged 3&5 and left 4 as the last one modifying it to add the break. I went back and forth on which way to handle it... Pushed - thanks for the review! John
participants (2)
-
John Ferlan
-
Ján Tomko