qemu: caps: check for q35/ICH9 disable S3/S4

Update test data to match
This commit is contained in:
Cole Robinson 2016-01-09 15:58:50 -05:00
parent 5900356efb
commit c77fd89000
15 changed files with 388 additions and 79 deletions

View File

@ -309,6 +309,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"virtio-tablet", /* 205 */
"virtio-input-host",
"chardev-file-append",
"ich9-disable-s3",
"ich9-disable-s4",
);
@ -1650,6 +1652,11 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioGpu[] = {
{ "virgl", QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsICH9[] = {
{ "disable_s3", QEMU_CAPS_ICH9_DISABLE_S3 },
{ "disable_s4", QEMU_CAPS_ICH9_DISABLE_S4 },
};
struct virQEMUCapsObjectTypeProps {
const char *type;
struct virQEMUCapsStringFlags *props;
@ -1705,6 +1712,8 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
ARRAY_CARDINALITY(virQEMUCapsObjectPropsQxlVga) },
{ "virtio-gpu-pci", virQEMUCapsObjectPropsVirtioGpu,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsVirtioGpu) },
{ "ICH9-LPC", virQEMUCapsObjectPropsICH9,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsICH9) },
};

View File

@ -336,6 +336,8 @@ typedef enum {
QEMU_CAPS_VIRTIO_TABLET, /* -device virtio-tablet-{device,pci} */
QEMU_CAPS_VIRTIO_INPUT_HOST, /* -device virtio-input-host-{device,pci} */
QEMU_CAPS_CHARDEV_FILE_APPEND, /* -chardev file,append=on|off */
QEMU_CAPS_ICH9_DISABLE_S3, /* -M q35 S3 BIOS Advertisement on/off */
QEMU_CAPS_ICH9_DISABLE_S4, /* -M q35 S4 BIOS Advertisement on/off */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -1605,6 +1605,15 @@
}
}
{
"id": "libvirt-32",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -1649,7 +1658,7 @@
"name": "none"
}
],
"id": "libvirt-32"
"id": "libvirt-33"
}
{
@ -1721,7 +1730,7 @@
"name": "Opteron_G4"
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -1729,11 +1738,11 @@
"enabled": false,
"present": true
},
"id": "libvirt-34"
"id": "libvirt-35"
}
{
"id": "libvirt-35",
"id": "libvirt-36",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-models has not been found"
@ -1741,7 +1750,7 @@
}
{
"id": "libvirt-36",
"id": "libvirt-37",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-types has not been found"
@ -1749,7 +1758,7 @@
}
{
"id": "libvirt-37",
"id": "libvirt-38",
"error": {
"class": "CommandNotFound",
"desc": "The command query-command-line-options has not been found"
@ -1763,5 +1772,5 @@
"state": false
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}

View File

@ -1784,6 +1784,14 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -1835,7 +1843,7 @@
"name": "none"
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -1913,7 +1921,7 @@
"name": "Opteron_G5"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -1921,11 +1929,11 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"id": "libvirt-36",
"id": "libvirt-37",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-models has not been found"
@ -1933,7 +1941,7 @@
}
{
"id": "libvirt-37",
"id": "libvirt-38",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-types has not been found"
@ -1941,7 +1949,7 @@
}
{
"id": "libvirt-38",
"id": "libvirt-39",
"error": {
"class": "CommandNotFound",
"desc": "The command query-command-line-options has not been found"
@ -1955,5 +1963,5 @@
"state": false
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -1831,6 +1831,15 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -1885,7 +1894,7 @@
"name": "none"
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -1963,7 +1972,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -1971,11 +1980,11 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"id": "libvirt-36",
"id": "libvirt-37",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-models has not been found"
@ -1983,7 +1992,7 @@
}
{
"id": "libvirt-37",
"id": "libvirt-38",
"error": {
"class": "CommandNotFound",
"desc": "The command query-tpm-types has not been found"
@ -1991,7 +2000,7 @@
}
{
"id": "libvirt-38",
"id": "libvirt-39",
"error": {
"class": "CommandNotFound",
"desc": "The command query-command-line-options has not been found"
@ -2005,5 +2014,5 @@
"state": false
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -1905,6 +1905,14 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -1975,7 +1983,7 @@
"cpu-max": 1
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2053,7 +2061,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2061,12 +2069,6 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
}
{
"return": [
],
"id": "libvirt-36"
}
@ -2076,6 +2078,12 @@
"id": "libvirt-37"
}
{
"return": [
],
"id": "libvirt-38"
}
{
"return": [
{
@ -2749,7 +2757,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -2759,5 +2767,5 @@
"state": false
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -1967,6 +1967,14 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -2053,7 +2061,7 @@
"cpu-max": 1
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2131,7 +2139,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2139,12 +2147,6 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
}
{
"return": [
],
"id": "libvirt-36"
}
@ -2154,6 +2156,12 @@
"id": "libvirt-37"
}
{
"return": [
],
"id": "libvirt-38"
}
{
"return": [
{
@ -2729,7 +2737,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -2751,5 +2759,5 @@
"state": false
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -1931,6 +1931,14 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -2025,7 +2033,7 @@
"cpu-max": 1
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2103,7 +2111,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2111,12 +2119,6 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
}
{
"return": [
],
"id": "libvirt-36"
}
@ -2126,6 +2128,12 @@
"id": "libvirt-37"
}
{
"return": [
],
"id": "libvirt-38"
}
{
"return": [
{
@ -2711,7 +2719,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -2733,5 +2741,5 @@
"state": false
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -2377,6 +2377,14 @@
}
}
{
"id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
}
}
{
"return": [
{
@ -2487,7 +2495,7 @@
"cpu-max": 255
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2568,7 +2576,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2576,21 +2584,21 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"return": [
"tpm-tis"
],
"id": "libvirt-36"
"id": "libvirt-37"
}
{
"return": [
"passthrough"
],
"id": "libvirt-37"
"id": "libvirt-38"
}
{
@ -3450,7 +3458,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -3472,5 +3480,5 @@
"capability": "zero-blocks"
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -167,4 +167,6 @@
<flag name='virtio-mouse'/>
<flag name='virtio-tablet'/>
<flag name='virtio-input-host'/>
<flag name='ich9-disable-s3'/>
<flag name='ich9-disable-s4'/>
</qemuCaps>

View File

@ -2758,6 +2758,84 @@
"id": "libvirt-32"
}
{
"return": [
{
"type": "bool",
"name": "memory-hotplug-support"
},
{
"type": "uint32",
"name": "rombar"
},
{
"type": "uint32",
"name": "sci_int"
},
{
"type": "uint32",
"name": "gpe0_blk_len"
},
{
"type": "uint32",
"name": "pm_io_base"
},
{
"type": "bool",
"name": "noreboot"
},
{
"type": "bool",
"name": "multifunction",
"description": "on/off"
},
{
"type": "uint8",
"name": "disable_s4"
},
{
"type": "uint8",
"name": "acpi_disable_cmd"
},
{
"type": "str",
"name": "romfile"
},
{
"type": "uint8",
"name": "disable_s3"
},
{
"type": "uint8",
"name": "s4_val"
},
{
"type": "uint8",
"name": "acpi_enable_cmd"
},
{
"type": "bool",
"name": "command_serr_enable",
"description": "on/off"
},
{
"type": "int32",
"name": "addr",
"description": "Slot and optional function number, example: 06.0 or 06"
},
{
"type": "bool",
"name": "enable_tco"
},
{
"type": "uint32",
"name": "gpe0_blk"
}
],
"id": "libvirt-33"
}
{
"return": [
{
@ -2884,7 +2962,7 @@
"cpu-max": 255
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2974,7 +3052,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2982,21 +3060,21 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"return": [
"tpm-tis"
],
"id": "libvirt-36"
"id": "libvirt-37"
}
{
"return": [
"passthrough"
],
"id": "libvirt-37"
"id": "libvirt-38"
}
{
@ -4000,7 +4078,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -4030,5 +4108,5 @@
"capability": "events"
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -168,4 +168,6 @@
<flag name='virtio-mouse'/>
<flag name='virtio-tablet'/>
<flag name='virtio-input-host'/>
<flag name='ich9-disable-s3'/>
<flag name='ich9-disable-s4'/>
</qemuCaps>

View File

@ -2763,6 +2763,84 @@
"id": "libvirt-32"
}
{
"return": [
{
"type": "bool",
"name": "memory-hotplug-support"
},
{
"type": "uint32",
"name": "rombar"
},
{
"type": "uint32",
"name": "sci_int"
},
{
"type": "uint32",
"name": "gpe0_blk_len"
},
{
"type": "uint32",
"name": "pm_io_base"
},
{
"type": "bool",
"name": "noreboot"
},
{
"type": "bool",
"name": "multifunction",
"description": "on/off"
},
{
"type": "uint8",
"name": "disable_s4"
},
{
"type": "uint8",
"name": "acpi_disable_cmd"
},
{
"type": "str",
"name": "romfile"
},
{
"type": "uint8",
"name": "disable_s3"
},
{
"type": "uint8",
"name": "s4_val"
},
{
"type": "uint8",
"name": "acpi_enable_cmd"
},
{
"type": "bool",
"name": "command_serr_enable",
"description": "on/off"
},
{
"type": "int32",
"name": "addr",
"description": "Slot and optional function number, example: 06.0 or 06"
},
{
"type": "bool",
"name": "enable_tco"
},
{
"type": "uint32",
"name": "gpe0_blk"
}
],
"id": "libvirt-33"
}
{
"return": [
{
@ -2889,7 +2967,7 @@
"cpu-max": 255
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2979,7 +3057,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2987,21 +3065,21 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"return": [
"tpm-tis"
],
"id": "libvirt-36"
"id": "libvirt-37"
}
{
"return": [
"passthrough"
],
"id": "libvirt-37"
"id": "libvirt-38"
}
{
@ -4005,7 +4083,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -4035,5 +4113,5 @@
"capability": "events"
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}

View File

@ -170,4 +170,6 @@
<flag name='virtio-tablet'/>
<flag name='virtio-input-host'/>
<flag name='chardev-file-append'/>
<flag name='ich9-disable-s3'/>
<flag name='ich9-disable-s4'/>
</qemuCaps>

View File

@ -2763,6 +2763,84 @@
"id": "libvirt-32"
}
{
"return": [
{
"type": "bool",
"name": "memory-hotplug-support"
},
{
"type": "uint32",
"name": "rombar"
},
{
"type": "uint32",
"name": "sci_int"
},
{
"type": "uint32",
"name": "gpe0_blk_len"
},
{
"type": "uint32",
"name": "pm_io_base"
},
{
"type": "bool",
"name": "noreboot"
},
{
"type": "bool",
"name": "multifunction",
"description": "on/off"
},
{
"type": "uint8",
"name": "disable_s4"
},
{
"type": "uint8",
"name": "acpi_disable_cmd"
},
{
"type": "str",
"name": "romfile"
},
{
"type": "uint8",
"name": "disable_s3"
},
{
"type": "uint8",
"name": "s4_val"
},
{
"type": "uint8",
"name": "acpi_enable_cmd"
},
{
"type": "bool",
"name": "command_serr_enable",
"description": "on/off"
},
{
"type": "int32",
"name": "addr",
"description": "Slot and optional function number, example: 06.0 or 06"
},
{
"type": "bool",
"name": "enable_tco"
},
{
"type": "uint32",
"name": "gpe0_blk"
}
],
"id": "libvirt-33"
}
{
"return": [
{
@ -2889,7 +2967,7 @@
"cpu-max": 255
}
],
"id": "libvirt-33"
"id": "libvirt-34"
}
{
@ -2979,7 +3057,7 @@
"name": "qemu64"
}
],
"id": "libvirt-34"
"id": "libvirt-35"
}
{
@ -2987,21 +3065,21 @@
"enabled": false,
"present": true
},
"id": "libvirt-35"
"id": "libvirt-36"
}
{
"return": [
"tpm-tis"
],
"id": "libvirt-36"
"id": "libvirt-37"
}
{
"return": [
"passthrough"
],
"id": "libvirt-37"
"id": "libvirt-38"
}
{
@ -4009,7 +4087,7 @@
"option": "drive"
}
],
"id": "libvirt-38"
"id": "libvirt-39"
}
{
@ -4039,5 +4117,5 @@
"capability": "events"
}
],
"id": "libvirt-39"
"id": "libvirt-40"
}