mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemu: domcaps: Report disk <enum name="model">
This generates new XML like: <disk> <enum name='model'> <value>virtio</value> <value>virtio-transitional</value> <value>virtio-non-transitional</value> </enum> </disk> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8270b3d0cd
commit
aa42d364a5
@ -482,6 +482,7 @@ virDomainCapsDeviceDiskFormat(virBufferPtr buf,
|
||||
|
||||
ENUM_PROCESS(disk, diskDevice, virDomainDiskDeviceTypeToString);
|
||||
ENUM_PROCESS(disk, bus, virDomainDiskBusTypeToString);
|
||||
ENUM_PROCESS(disk, model, virDomainDiskModelTypeToString);
|
||||
|
||||
FORMAT_EPILOGUE(disk);
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ struct _virDomainCapsDeviceDisk {
|
||||
bool supported;
|
||||
virDomainCapsEnum diskDevice; /* Info about virDomainDiskDevice enum values */
|
||||
virDomainCapsEnum bus; /* Info about virDomainDiskBus enum values */
|
||||
virDomainCapsEnum model; /* Info about virDomainDiskModel enum values */
|
||||
/* add new fields here */
|
||||
};
|
||||
|
||||
|
@ -5024,6 +5024,16 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps,
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_AHCI))
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_SATA);
|
||||
|
||||
/* disk->model values */
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->model, VIR_DOMAIN_DISK_MODEL_VIRTIO);
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY) ||
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL)) {
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->model,
|
||||
VIR_DOMAIN_DISK_MODEL_VIRTIO_TRANSITIONAL);
|
||||
VIR_DOMAIN_CAPS_ENUM_SET(disk->model,
|
||||
VIR_DOMAIN_DISK_MODEL_VIRTIO_NON_TRANSITIONAL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
<value>virtio</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'/>
|
||||
</disk>
|
||||
<graphics supported='no'/>
|
||||
<video supported='no'/>
|
||||
|
@ -30,6 +30,7 @@
|
||||
<value>virtio</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'/>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -30,6 +30,7 @@
|
||||
<value>virtio</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'/>
|
||||
</disk>
|
||||
<graphics supported='no'/>
|
||||
<video supported='no'/>
|
||||
|
@ -51,6 +51,12 @@
|
||||
<value>sata</value>
|
||||
<value>sd</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>default</value>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -34,6 +34,7 @@
|
||||
<value>scsi</value>
|
||||
<value>xen</value>
|
||||
</enum>
|
||||
<enum name='model'/>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -24,6 +24,7 @@
|
||||
<value>scsi</value>
|
||||
<value>xen</value>
|
||||
</enum>
|
||||
<enum name='model'/>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -68,6 +68,9 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -74,6 +74,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -40,6 +40,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -133,6 +133,11 @@
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -98,6 +98,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -71,6 +71,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -71,6 +71,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -44,6 +44,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -72,6 +72,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -38,6 +38,11 @@
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -73,6 +73,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -119,6 +119,11 @@
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -73,6 +73,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -81,6 +81,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -105,6 +105,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -82,6 +82,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -139,6 +139,11 @@
|
||||
<value>scsi</value>
|
||||
<value>virtio</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -99,6 +99,11 @@
|
||||
<value>usb</value>
|
||||
<value>sata</value>
|
||||
</enum>
|
||||
<enum name='model'>
|
||||
<value>virtio</value>
|
||||
<value>virtio-transitional</value>
|
||||
<value>virtio-non-transitional</value>
|
||||
</enum>
|
||||
</disk>
|
||||
<graphics supported='yes'>
|
||||
<enum name='type'>
|
||||
|
@ -94,6 +94,7 @@ fillAllCaps(virDomainCapsPtr domCaps)
|
||||
disk->supported = true;
|
||||
SET_ALL_BITS(disk->diskDevice);
|
||||
SET_ALL_BITS(disk->bus);
|
||||
SET_ALL_BITS(disk->model);
|
||||
|
||||
graphics->supported = true;
|
||||
SET_ALL_BITS(graphics->type);
|
||||
|
Loading…
Reference in New Issue
Block a user