mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
src: introduce 'raw' and 'rawset' ACPI table types
The QEMU driver has only accepted type=slic even though QEMU is able to accept individual tables of any type, without needing to specify a signature. Introduce type=raw to address this usage scenario. Contrary to other types, this one may appear multiple times. The Xen driver has mistakenly accepted type=slic and use it to set the Xen acpi_firmware setting, which performs a simple passthrough of multiple concatenated data table. Introduce type=rawset to address this usage scenario. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3d94587655
commit
513ef8f028
@ -490,9 +490,22 @@ These options apply to any form of booting of the guest OS.
|
|||||||
...
|
...
|
||||||
|
|
||||||
``acpi``
|
``acpi``
|
||||||
The ``table`` element contains a fully-qualified path to the ACPI table. The
|
The ``table`` element contains a fully-qualified path to the ACPI table,
|
||||||
``type`` attribute contains the ACPI table type (currently only ``slic`` is
|
with the ``type`` attribute dictating what data must be present in the
|
||||||
supported) :since:`Since 1.3.5 (QEMU)` :since:`Since 5.9.0 (Xen)`
|
file:
|
||||||
|
|
||||||
|
* ``raw``: a single ACPI table with header and data, with ACPI
|
||||||
|
signature auto-detected from header (:since:`Since 11.2.0`).
|
||||||
|
* ``rawset``: concatenation of multiple ACPI tables with header
|
||||||
|
and data, each with any ACPI signature, auto-detected from header
|
||||||
|
(:since:`Since 11.2.0`).
|
||||||
|
* ``slic``: a single ACPI table with header and data, providing
|
||||||
|
software licensing information. The ACPI table signature in the
|
||||||
|
header will be forced to ``SLIC`` (:since:`Since 1.3.5 (QEMU)`,
|
||||||
|
mis-interpreted as ``rawset`` :since:`Since 5.9.0 (Xen)`).
|
||||||
|
|
||||||
|
Each type may be used only once, except for ``raw`` which can
|
||||||
|
appear multiple times.
|
||||||
|
|
||||||
|
|
||||||
SMBIOS System Information
|
SMBIOS System Information
|
||||||
|
@ -1459,6 +1459,8 @@ VIR_ENUM_IMPL(virDomainOsDefFirmwareFeature,
|
|||||||
|
|
||||||
VIR_ENUM_IMPL(virDomainOsACPITable,
|
VIR_ENUM_IMPL(virDomainOsACPITable,
|
||||||
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST,
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST,
|
||||||
|
"raw",
|
||||||
|
"rawset",
|
||||||
"slic",
|
"slic",
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -17900,7 +17902,8 @@ virDomainDefParseBootAcpiOptions(virDomainDef *def,
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
for (j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
if (tables[j]->type == type) {
|
if (tables[j]->type == type &&
|
||||||
|
type != VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW) {
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
_("ACPI table type '%1$s' may only appear once"),
|
_("ACPI table type '%1$s' may only appear once"),
|
||||||
virDomainOsACPITableTypeToString(type));
|
virDomainOsACPITableTypeToString(type));
|
||||||
|
@ -2482,6 +2482,8 @@ typedef enum {
|
|||||||
VIR_ENUM_DECL(virDomainOsDefFirmwareFeature);
|
VIR_ENUM_DECL(virDomainOsDefFirmwareFeature);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW,
|
||||||
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET,
|
||||||
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC,
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC,
|
||||||
|
|
||||||
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST
|
||||||
|
@ -7180,7 +7180,11 @@
|
|||||||
<zeroOrMore>
|
<zeroOrMore>
|
||||||
<element name="table">
|
<element name="table">
|
||||||
<attribute name="type">
|
<attribute name="type">
|
||||||
<value>slic</value>
|
<choice>
|
||||||
|
<value>raw</value>
|
||||||
|
<value>rawset</value>
|
||||||
|
<value>slic</value>
|
||||||
|
</choice>
|
||||||
</attribute>
|
</attribute>
|
||||||
<ref name="absFilePath"/>
|
<ref name="absFilePath"/>
|
||||||
</element>
|
</element>
|
||||||
|
@ -334,6 +334,13 @@ libxlDomainDefValidate(const virDomainDef *def,
|
|||||||
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC:
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW:
|
||||||
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET:
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("ACPI table type '%1$s' is not supported"),
|
||||||
|
virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type));
|
||||||
|
return -1;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
|
||||||
virReportEnumRangeError(virDomainOsACPITable,
|
virReportEnumRangeError(virDomainOsACPITable,
|
||||||
|
@ -130,6 +130,8 @@ VIR_ENUM_IMPL(qemuNumaPolicy,
|
|||||||
VIR_ENUM_DECL(qemuACPITableSIG);
|
VIR_ENUM_DECL(qemuACPITableSIG);
|
||||||
VIR_ENUM_IMPL(qemuACPITableSIG,
|
VIR_ENUM_IMPL(qemuACPITableSIG,
|
||||||
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST,
|
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST,
|
||||||
|
"", /* raw */
|
||||||
|
"", /* rawset */
|
||||||
"SLIC");
|
"SLIC");
|
||||||
|
|
||||||
|
|
||||||
|
@ -747,6 +747,13 @@ qemuValidateDomainDefBoot(const virDomainDef *def,
|
|||||||
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC:
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW:
|
||||||
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET:
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("ACPI table type '%1$s' is not supported"),
|
||||||
|
virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type));
|
||||||
|
return -1;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
|
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
|
||||||
virReportEnumRangeError(virDomainOsACPITable,
|
virReportEnumRangeError(virDomainOsACPITable,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user