tools/libacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests
PATCH 1/1 tools/libacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests
PVHv2 guests don't have any VGA card, and as so it must be notified in the FADT.
---
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- tools/firmware/hvmloader/util.c | 3 ++- tools/libacpi/acpi2_0.h | 1 + tools/libacpi/build.c | 2 ++ tools/libacpi/libacpi.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)
tools/firmware/hvmloader/util.c +2 -1
@@ -948,7 +948,8 @@ void hvmloader_acpi_build_tables(struct acpi_config *config,if ( !strncmp (xenstore_read ("platform/acpi_s4" ,"1" ),"1" ,1 ) ) config->table_flags |=ACPI_HAS_SSDT_S4 ; - config->table_flags |= (ACPI_HAS_TCPA |ACPI_HAS_IOAPIC |ACPI_HAS_WAET ); + config->table_flags |= (ACPI_HAS_TCPA |ACPI_HAS_IOAPIC |ACPI_HAS_WAET | +ACPI_HAS_VGA ); config->tis_hdr = (uint16_t *)ACPI_TIS_HDR_ADDRESS ;
tools/libacpi/acpi2_0.h +1 -0
@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)/* * FADT Fixed Feature Flags.
tools/libacpi/build.c +2 -0
@@ -579,6 +579,8 @@ int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) fadt->x_dsdt = ctxt->mem_ops.v2p (ctxt, dsdt); fadt->firmware_ctrl = ctxt->mem_ops.v2p (ctxt, facs); fadt->x_firmware_ctrl = ctxt->mem_ops.v2p (ctxt, facs); +if ( !(config->table_flags &ACPI_HAS_VGA ) ) + fadt->iapc_boot_arch |=ACPI_FADT_NO_VGA ;set_checksum (fadt, offsetof(struct acpi_header , checksum),sizeof (struct acpi_20_fadt ));
tools/libacpi/libacpi.h +1 -0
@@ -30,6 +30,7 @@#define ACPI_HAS_TCPA (1<<7)#define ACPI_HAS_IOAPIC (1<<8)#define ACPI_HAS_WAET (1<<9) +#define ACPI_HAS_VGA (1<<10)struct xen_vmemrange ;struct acpi_numa {
Signature · 7 lines
2.9.3 (Apple Git-75) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 01.12.16 at 13:40, <[email protected]> wrote:
PVHv2 guests don't have any VGA card, and as so it must be notified in the FADT.
Signed-off-by Roger Pau Monné <[email protected]>
Looking at this ...
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 232
Quoted 7 lines
tools/libacpi/acpi2_0.h +1
-0@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)
... though makes me wonder: Don't we need a similar patch then for ACPI_FADT_NO_CMOS_RTC, the setting of which then would need to be in sync with XEN_X86_EMU_RTC?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 01.12.16 at 13:40, <[email protected]> wrote:
PVHv2 guests don't have any VGA card, and as so it must be notified in the FADT.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Jan Beulich <[email protected]>Looking at this ...
Quoted 11 lines
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 232
Quoted 7 lines
tools/libacpi/acpi2_0.h +1
-0@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)... though makes me wonder: Don't we need a similar patch then for
ACPI_FADT_NO_CMOS_RTC, the setting of which then would need to be in sync withXEN_X86_EMU_RTC?
Right... and we also need to remove ACPI_8042, which is set by default. Will prepare two more patches to fix this.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Roger Pau Monne
Quoted 10 lines · Jan Beulich
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 01.12.16 at 13:40, <[email protected]> wrote:
PVHv2 guests don't have any VGA card, and as so it must be notified in the FADT.
Signed-off-by Roger Pau Monné <[email protected]>Reviewed-by Jan Beulich <[email protected]>Looking at this ...
Quoted 11 lines
Quoted 11 lines
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 232
Quoted 7 lines
tools/libacpi/acpi2_0.h +1
-0@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)... though makes me wonder: Don't we need a similar patch then for
ACPI_FADT_NO_CMOS_RTC, the setting of which then would need to be in sync withXEN_X86_EMU_RTC?
This will also eliminate the need in Linux to explicitly disable RTC for PVH guests. With ACPI_FADT_NO_CMOS_RTC this will be taken care of by generic ACPI boot code.
-boris
Quoted 6 lines
Right... and we also need to remove
ACPI_8042, which is set by default. Will prepare two more patches to fix this.Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 232
Quoted 7 lines · Roger Pau Monne
tools/libacpi/acpi2_0.h +1
-0@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)
Hm, I'm wondering whether I should drop the "_FADT_" here, other flags don't have it already.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 01.12.16 at 16:08, <[email protected]> wrote:
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 232
Quoted 7 lines · Roger Pau Monne
tools/libacpi/acpi2_0.h +1
-0@@ -229,6 +229,7 @@ struct acpi_20_fadt {*/ #define ACPI_LEGACY_DEVICES (1 << 0)#define ACPI_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2)Hm, I'm wondering whether I should drop the "_FADT_" here, other flags don't have it already.
No, the other two should gain _FADT (see actbl.h).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel