mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
domain: Allow 'model' attribute for ide controller
The optional values are 'piix3', 'piix4' or 'ich6'. Those will be needed to allow setting IDE controller model in VirtualBox driver.
This commit is contained in:
parent
06c4fd10fd
commit
1ed22398c3
@ -3647,6 +3647,10 @@
|
||||
<span class="since">Since 1.3.5</span>, USB controllers accept a
|
||||
<code>ports</code> attribute to configure how many devices can be
|
||||
connected to the controller.</dd>
|
||||
<dt><code>ide</code></dt>
|
||||
<dd><span class="since">Since 3.10.0</span> for the vbox driver, the
|
||||
<code>ide</code> controller has an optional attribute
|
||||
<code>model</code>, which is one of "piix3", "piix4" or "ich6".</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
|
@ -1975,12 +1975,11 @@
|
||||
<ref name="address"/>
|
||||
</optional>
|
||||
<choice>
|
||||
<!-- fdc/ide/sata/ccid have only the common attributes -->
|
||||
<!-- fdc/sata/ccid have only the common attributes -->
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>fdc</value>
|
||||
<value>ide</value>
|
||||
<value>sata</value>
|
||||
<value>ccid</value>
|
||||
</choice>
|
||||
@ -2041,6 +2040,21 @@
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<!-- ide has an optional attribute "model" -->
|
||||
<group>
|
||||
<attribute name="type">
|
||||
<value>ide</value>
|
||||
</attribute>
|
||||
<optional>
|
||||
<attribute name="model">
|
||||
<choice>
|
||||
<value>piix3</value>
|
||||
<value>piix4</value>
|
||||
<value>ich6</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<!-- pci has an optional attribute "model" -->
|
||||
<group>
|
||||
<attribute name="type">
|
||||
|
@ -377,6 +377,11 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
|
||||
"qemu-xhci",
|
||||
"none")
|
||||
|
||||
VIR_ENUM_IMPL(virDomainControllerModelIDE, VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST,
|
||||
"piix3",
|
||||
"piix4",
|
||||
"ich6")
|
||||
|
||||
VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
|
||||
"mount",
|
||||
"block",
|
||||
@ -9785,6 +9790,8 @@ virDomainControllerModelTypeFromString(const virDomainControllerDef *def,
|
||||
return virDomainControllerModelUSBTypeFromString(model);
|
||||
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
|
||||
return virDomainControllerModelPCITypeFromString(model);
|
||||
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE)
|
||||
return virDomainControllerModelIDETypeFromString(model);
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -9800,6 +9807,8 @@ virDomainControllerModelTypeToString(virDomainControllerDefPtr def,
|
||||
return virDomainControllerModelUSBTypeToString(model);
|
||||
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
|
||||
return virDomainControllerModelPCITypeToString(model);
|
||||
else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_IDE)
|
||||
return virDomainControllerModelIDETypeToString(model);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -748,6 +748,14 @@ typedef enum {
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST
|
||||
} virDomainControllerModelUSB;
|
||||
|
||||
typedef enum {
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_IDE_PIIX3,
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_IDE_PIIX4,
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_IDE_ICH6,
|
||||
|
||||
VIR_DOMAIN_CONTROLLER_MODEL_IDE_LAST
|
||||
} virDomainControllerModelIDE;
|
||||
|
||||
# define IS_USB2_CONTROLLER(ctrl) \
|
||||
(((ctrl)->type == VIR_DOMAIN_CONTROLLER_TYPE_USB) && \
|
||||
((ctrl)->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1 || \
|
||||
@ -3219,6 +3227,7 @@ VIR_ENUM_DECL(virDomainControllerModelPCI)
|
||||
VIR_ENUM_DECL(virDomainControllerPCIModelName)
|
||||
VIR_ENUM_DECL(virDomainControllerModelSCSI)
|
||||
VIR_ENUM_DECL(virDomainControllerModelUSB)
|
||||
VIR_ENUM_DECL(virDomainControllerModelIDE)
|
||||
VIR_ENUM_DECL(virDomainFS)
|
||||
VIR_ENUM_DECL(virDomainFSDriver)
|
||||
VIR_ENUM_DECL(virDomainFSAccessMode)
|
||||
|
@ -234,6 +234,8 @@ virDomainControllerFindUnusedIndex;
|
||||
virDomainControllerInsert;
|
||||
virDomainControllerInsertPreAlloced;
|
||||
virDomainControllerIsPSeriesPHB;
|
||||
virDomainControllerModelIDETypeFromString;
|
||||
virDomainControllerModelIDETypeToString;
|
||||
virDomainControllerModelPCITypeToString;
|
||||
virDomainControllerModelSCSITypeFromString;
|
||||
virDomainControllerModelSCSITypeToString;
|
||||
|
Loading…
Reference in New Issue
Block a user