mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
libxl: use b_info->{acpi,acpi} when available
b_info->u.hvm.{acpi,apic} are deprecated. But also, on recent libxl version (4.14) the old one seems to be broken. While libxl part should be fixed too, update the usage here and at some point drop support for the old version. b_info->acpi was added in Xen 4.8 b_info->apic was added in Xen 4.10 Xen 4.10 is the oldest version that still has security support (until December 2020). Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
cf6cc86cd2
commit
f253dc90f5
@ -508,12 +508,25 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
||||
libxl_defbool_set(&b_info->u.hvm.pae,
|
||||
def->features[VIR_DOMAIN_FEATURE_PAE] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
#ifdef LIBXL_HAVE_BUILDINFO_APIC
|
||||
libxl_defbool_set(&b_info->apic,
|
||||
def->features[VIR_DOMAIN_FEATURE_APIC] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
/*
|
||||
* Strictly speaking b_info->acpi was introduced earlier (Xen 4.8), but
|
||||
* there is no separate #define in libxl.h.
|
||||
*/
|
||||
libxl_defbool_set(&b_info->acpi,
|
||||
def->features[VIR_DOMAIN_FEATURE_ACPI] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
#else
|
||||
libxl_defbool_set(&b_info->u.hvm.apic,
|
||||
def->features[VIR_DOMAIN_FEATURE_APIC] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
libxl_defbool_set(&b_info->u.hvm.acpi,
|
||||
def->features[VIR_DOMAIN_FEATURE_ACPI] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
#endif
|
||||
|
||||
/* copy SLIC table path to acpi_firmware */
|
||||
if (def->os.slic_table)
|
||||
|
@ -21,10 +21,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
@ -21,10 +21,10 @@
|
||||
"sched_params": {
|
||||
"weight": 1500
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
@ -14,10 +14,10 @@
|
||||
"shadow_memkb": 5656,
|
||||
"sched_params": {
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"acpi_firmware": "/path/to/slic.dat",
|
||||
"nographic": "True",
|
||||
"vga": {
|
||||
|
@ -21,10 +21,10 @@
|
||||
],
|
||||
"sched_params": {
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"nested_hvm": "False",
|
||||
"nographic": "True",
|
||||
"vga": {
|
||||
|
@ -22,10 +22,10 @@
|
||||
"sched_params": {
|
||||
},
|
||||
"nested_hvm": "False",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"nographic": "True",
|
||||
"vga": {
|
||||
"kind": "none"
|
||||
|
@ -22,10 +22,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
@ -22,10 +22,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
@ -23,10 +23,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"hpet": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
|
@ -23,10 +23,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
@ -109,10 +109,10 @@
|
||||
"sched_params": {
|
||||
|
||||
},
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"nested_hvm": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
|
@ -110,10 +110,10 @@
|
||||
|
||||
},
|
||||
"nested_hvm": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"type.hvm": {
|
||||
"pae": "True",
|
||||
"apic": "True",
|
||||
"acpi": "True",
|
||||
"vga": {
|
||||
"kind": "cirrus"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user