mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Extend the virDomainDeviceAddress struture to allow disk controller addresses
Introduce a new structure
struct _virDomainDeviceDriveAddress {
unsigned int controller;
unsigned int bus;
unsigned int unit;
};
and plug that into virDomainDeviceAddress and generates XML that
looks like
<address type='drive' controller='1' bus='0' unit='5'/>
This syntax will be used by the QEMU driver to explicitly control
how drives are attached to the bus
* src/conf/domain_conf.h, src/conf/domain_conf.c: Parsing and
formatting of drive addresses
* docs/schemas/domain.rng: Define new address format for drives
This commit is contained in:
@@ -1189,6 +1189,21 @@
|
||||
<ref name="pciFunc"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<define name="driveaddress">
|
||||
<optional>
|
||||
<attribute name="controller">
|
||||
<ref name="driveController"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="bus">
|
||||
<ref name="driveBus"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<attribute name="unit">
|
||||
<ref name="driveUnit"/>
|
||||
</attribute>
|
||||
</define>
|
||||
<!--
|
||||
Devices attached to a domain.
|
||||
-->
|
||||
@@ -1305,6 +1320,12 @@
|
||||
</attribute>
|
||||
<ref name="pciaddress"/>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>drive</value>
|
||||
</attribute>
|
||||
<ref name="driveaddress"/>
|
||||
</group>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@@ -1434,6 +1455,21 @@
|
||||
<param name="pattern">(0x)?[0-7]</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveController">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveBus">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="driveUnit">
|
||||
<data type="string">
|
||||
<param name="pattern">[0-9]{1,2}</param>
|
||||
</data>
|
||||
</define>
|
||||
<define name="featureName">
|
||||
<data type="string">
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
|
||||
Reference in New Issue
Block a user