tools/libacpi: fix boot flags passed to PVHv2 guests
v2 cover tools/libacpi: fix boot flags passed to PVHv2 guests
Hello,
There are a couple of boot flags that should be passed to PVHv2 guests, that report the lack of VGA and CMOS RTC, and we shouldn't also pass the 8042 flag, because PVHv2 guests don't have access to such controller. The no CMOS RTC flags requires that the FADT table is bumped to version 5 at least, which is done in the same patch where the flag is added.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 1/4 tools/libacpi: add _FADT_ to the FADT boot flags definitions
---
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/libacpi/acpi2_0.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
tools/libacpi/acpi2_0.h +2 -3
@@ -227,9 +227,8 @@ struct acpi_20_fadt {/* * FADT Boot Architecture Flags. */ -#define ACPI_LEGACY_DEVICES (1 << 0) -#define ACPI_8042 (1 << 1) - +#define ACPI_FADT_LEGACY_DEVICES (1 << 0) +#define ACPI_FADT_8042 (1 << 1)/* * FADT Fixed Feature Flags. */
Signature · 7 lines
2.9.3 (Apple Git-75) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 1/4] tools/libacpi: add _FADT_ to the FADT boot flags definitions
Quoted 17 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>---
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/libacpi/acpi2_0.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)tools/libacpi/acpi2_0.h +0
-0
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 231
Quoted 8 lines
tools/libacpi/acpi2_0.h +2
-3@@ -227,9 +227,8 @@ struct acpi_20_fadt {/* * FADT Boot Architecture Flags. */ -#define ACPI_LEGACY_DEVICES (1 << 0) -#define ACPI_8042 (1 << 1) - +#define ACPI_FADT_LEGACY_DEVICES (1 << 0) +#define ACPI_FADT_8042 (1 << 1)
It would be better to retain the newline here, Otherwise, Reviewed-by:
Andrew Cooper <[email protected]>
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 234
Quoted 3 lines
tools/libacpi/acpi2_0.h +0
-0/* * FADT Fixed Feature Flags. */
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 1/4] tools/libacpi: add _FADT_ to the FADT boot flags definitions
Quoted 13 lines · Andrew Cooper
Quoted 12 lines · Roger Pau Monne
Signed-off-by Roger Pau Monné <[email protected]>---
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/libacpi/acpi2_0.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Quoted 16 lines
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 231
Quoted 13 lines
tools/libacpi/acpi2_0.h +2
-3@@ -227,9 +227,8 @@ struct acpi_20_fadt {/* * FADT Boot Architecture Flags. */ -#define ACPI_LEGACY_DEVICES (1 << 0) -#define ACPI_8042 (1 << 1) - +#define ACPI_FADT_LEGACY_DEVICES (1 << 0) +#define ACPI_FADT_8042 (1 << 1)It would be better to retain the newline here, Otherwise, Reviewed-by:
Andrew Cooper <[email protected]>
Right, I somehow managed to screw it. I've pushed a new version with the newline issue fixed, it's at:
git://xenbits.xen.org/people/royger/xen.git libacpi_bootflags_v2
Sorry, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 1/4] tools/libacpi: add _FADT_ to the FADT boot flags definitions
In reply to Roger Pau MonneQuoted 5 lines
Quoted 1 line
Quoted 1 line · On 02.12.16 at 14:48, <[email protected]> wrote:
tools/libacpi/acpi2_0.h +0
-0@@ -227,9 +227,8 @@ struct acpi_20_fadt {/*
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 234
Quoted 10 lines
tools/libacpi/acpi2_0.h +2
-3* FADT Boot Architecture Flags. */ -#define ACPI_LEGACY_DEVICES (1 << 0) -#define ACPI_8042 (1 << 1) - +#define ACPI_FADT_LEGACY_DEVICES (1 << 0) +#define ACPI_FADT_8042 (1 << 1)/* * FADT Fixed Feature Flags. */
Afaict this breaks the build (until patch 3).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 2/4 tools/libacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests
In reply to Roger Pau MonnePVHv2 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 | 2 ++ tools/libacpi/build.c | 2 ++ tools/libacpi/libacpi.h | 1 + 4 files changed, 7 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 +2 -0
@@ -229,6 +229,8 @@ struct acpi_20_fadt {*/ #define ACPI_FADT_LEGACY_DEVICES (1 << 0)#define ACPI_FADT_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
Re: [PATCH v2 2/4] tools/libacpi: set FADT boot flag to notify lack of VGA for PVHv2 guests
tools/libacpi/acpi2_0.h struct acpi_20_fadt { · line 233
Quoted 10 lines · Roger Pau Monne
tools/libacpi/acpi2_0.h +2
-0@@ -229,6 +229,8 @@ struct acpi_20_fadt {*/ #define ACPI_FADT_LEGACY_DEVICES (1 << 0)#define ACPI_FADT_8042 (1 << 1) +#define ACPI_FADT_NO_VGA (1 << 2) +
Ah - this extra newline looks like a rebasing error with patch 1.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 3/4 tools/libacpi: don't announce a 8042 controller in the FADT for PVHv2 guests
In reply to Roger Pau MonneThere's no such controler available for PVHv2 guests.
---
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 | 2 +- tools/libacpi/build.c | 2 ++ tools/libacpi/libacpi.h | 1 + tools/libacpi/static_tables.c | 1 - 4 files changed, 4 insertions(+), 2 deletions(-)
tools/firmware/hvmloader/util.c +1 -1
@@ -949,7 +949,7 @@ void hvmloader_acpi_build_tables(struct acpi_config *config, config->table_flags |=ACPI_HAS_SSDT_S4 ; config->table_flags |= (ACPI_HAS_TCPA |ACPI_HAS_IOAPIC |ACPI_HAS_WAET | -ACPI_HAS_VGA ); +ACPI_HAS_VGA |ACPI_HAS_8042 ); config->tis_hdr = (uint16_t *)ACPI_TIS_HDR_ADDRESS ;
tools/libacpi/build.c +2 -0
@@ -581,6 +581,8 @@ int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) 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 ; +if ( config->table_flags &ACPI_HAS_8042 ) + fadt->iapc_boot_arch |=ACPI_FADT_8042 ;set_checksum (fadt, offsetof(struct acpi_header , checksum),sizeof (struct acpi_20_fadt ));
tools/libacpi/libacpi.h +1 -0
@@ -31,6 +31,7 @@#define ACPI_HAS_IOAPIC (1<<8)#define ACPI_HAS_WAET (1<<9)#define ACPI_HAS_VGA (1<<10) +#define ACPI_HAS_8042 (1<<11)struct xen_vmemrange ;struct acpi_numa {
tools/libacpi/static_tables.c +0 -1
@@ -63,7 +63,6 @@ struct acpi_20_fadt Fadt = { .p_lvl2_lat = 0x0fff, /* >100, means we do not support C2 state */ .p_lvl3_lat = 0x0fff, /* >1000, means we do not support C3 state */ - .iapc_boot_arch = ACPI_8042, .flags = (ACPI_PROC_C1 | ACPI_WBINVD | ACPI_FIX_RTC | ACPI_TMR_VAL_EXT |
Signature · 7 lines
2.9.3 (Apple Git-75) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v2 3/4] tools/libacpi: don't announce a 8042 controller in the FADT for PVHv2 guests
Quoted 3 lines · Roger Pau Monne
There's no such controler available for PVHv2 guests.
Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v2 4/4 tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
In reply to Roger Pau MonneAt the moment this flag is unconditionally set for PVHv2 domains. Note that using this boot flag requires that the FADT table revision is at least 5 (or any later version), so bump the current FADT version from 4 to 5 and add two new fields that will be unused.
---
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]
---
Ideally this should be somehow fetched from the emulation_flags set of flags, but sadly there's no way for hvmloader (which runs in guest context) to fetch this information. If at some point a rtc option is added to libxl, we should see about passing it through to init_acpi_config in libxl_x86_acpi.c so that we can then appropriately set this flag for PVHv2 guests.
--- tools/firmware/hvmloader/util.c | 2 +- tools/libacpi/acpi2_0.h | 5 ++++- tools/libacpi/build.c | 2 ++ tools/libacpi/libacpi.h | 1 + 4 files changed, 8 insertions(+), 2 deletions(-)
tools/firmware/hvmloader/util.c +1 -1
@@ -949,7 +949,7 @@ void hvmloader_acpi_build_tables(struct acpi_config *config, config->table_flags |=ACPI_HAS_SSDT_S4 ; config->table_flags |= (ACPI_HAS_TCPA |ACPI_HAS_IOAPIC |ACPI_HAS_WAET | -ACPI_HAS_VGA |ACPI_HAS_8042 ); +ACPI_HAS_VGA |ACPI_HAS_8042 |ACPI_HAS_CMOS_RTC ); config->tis_hdr = (uint16_t *)ACPI_TIS_HDR_ADDRESS ;
tools/libacpi/acpi2_0.h +4 -1
@@ -222,6 +222,8 @@ struct acpi_20_fadt {struct acpi_20_generic_address x_pm_tmr_blk;struct acpi_20_generic_address x_gpe0_blk;struct acpi_20_generic_address x_gpe1_blk; +struct acpi_20_generic_address sleep_control; +struct acpi_20_generic_address sleep_status; };/*
@@ -230,6 +232,7 @@ struct acpi_20_fadt {#define ACPI_FADT_LEGACY_DEVICES (1 << 0)#define ACPI_FADT_8042 (1 << 1)#define ACPI_FADT_NO_VGA (1 << 2) +#define ACPI_FADT_NO_CMOS_RTC (1 << 5)/* * FADT Fixed Feature Flags.
@@ -436,7 +439,7 @@ struct acpi_20_slit {* Table revision numbers. */ #define ACPI_2_0_RSDP_REVISION 0x02 -#define ACPI_2_0_FADT_REVISION 0x04 +#define ACPI_2_0_FADT_REVISION 0x05#define ACPI_2_0_MADT_REVISION 0x02#define ACPI_2_0_RSDT_REVISION 0x01#define ACPI_2_0_XSDT_REVISION 0x01
tools/libacpi/build.c +2 -0
@@ -583,6 +583,8 @@ int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) fadt->iapc_boot_arch |=ACPI_FADT_NO_VGA ;if ( config->table_flags &ACPI_HAS_8042 ) fadt->iapc_boot_arch |=ACPI_FADT_8042 ; +if ( !(config->table_flags &ACPI_HAS_CMOS_RTC ) ) + fadt->iapc_boot_arch |=ACPI_FADT_NO_CMOS_RTC ;set_checksum (fadt, offsetof(struct acpi_header , checksum),sizeof (struct acpi_20_fadt ));
tools/libacpi/libacpi.h +1 -0
@@ -32,6 +32,7 @@#define ACPI_HAS_WAET (1<<9)#define ACPI_HAS_VGA (1<<10)#define ACPI_HAS_8042 (1<<11) +#define ACPI_HAS_CMOS_RTC (1<<12)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
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
Quoted 7 lines · Roger Pau Monne
At the moment this flag is unconditionally set for PVHv2 domains. Note that using this boot flag requires that the FADT table revision is at least 5 (or any later version), so bump the current FADT version from 4 to 5 and add two new fields that will be unused.
Reported-by Jan Beulich <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>
Quoted 13 lines
---
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]
---
Ideally this should be somehow fetched from theemulation_flagsset of flags, but sadly there's no way for hvmloader (which runs in guest context) to fetch this information. If at some point a rtc option is added to libxl, we should see about passing it through toinit_acpi_configinlibxl_x86_acpi.cso that we can then appropriately set this flag for PVHv2 guests.
(I forget if there is a good reason, but) why do we still have hvmloader writing the ACPI tables for HVM guests? We should consolidate on one consistent way of making things like this happen.
We definitely shouldn't be exposing emulation_flags to the guest, just so a bit of early firmware can write the proper information into the ACPI tables. That is a broken interface.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
Quoted 21 lines · Andrew Cooper
Quoted 7 lines · Roger Pau Monne
At the moment this flag is unconditionally set for PVHv2 domains. Note that using this boot flag requires that the FADT table revision is at least 5 (or any later version), so bump the current FADT version from 4 to 5 and add two new fields that will be unused.
Reported-by Jan Beulich <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>Quoted 13 lines
---
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]
---
Ideally this should be somehow fetched from theemulation_flagsset of flags, but sadly there's no way for hvmloader (which runs in guest context) to fetch this information. If at some point a rtc option is added to libxl, we should see about passing it through toinit_acpi_configinlibxl_x86_acpi.cso that we can then appropriately set this flag for PVHv2 guests.
Quoted 3 lines
(I forget if there is a good reason, but) why do we still have hvmloader writing the ACPI tables for HVM guests? We should consolidate on one consistent way of making things like this happen.
I think one of the reasons was that MMIO addresses (which are needed by the tables) are determined by hvmloader during runtime.
It would be nice to do this in the toolstack because we also use this information in cacheattr_init() which appears to be the only reason why we need to bring all possible VCPUs up and then offlining them.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
Quoted 25 lines · Boris Ostrovsky
Quoted 21 lines · Andrew Cooper
Quoted 7 lines · Roger Pau Monne
At the moment this flag is unconditionally set for PVHv2 domains. Note that using this boot flag requires that the FADT table revision is at least 5 (or any later version), so bump the current FADT version from 4 to 5 and add two new fields that will be unused.
Reported-by Jan Beulich <[email protected]>Signed-off-by Roger Pau Monné <[email protected]>Quoted 13 lines
---
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]
---
Ideally this should be somehow fetched from theemulation_flagsset of flags, but sadly there's no way for hvmloader (which runs in guest context) to fetch this information. If at some point a rtc option is added to libxl, we should see about passing it through toinit_acpi_configinlibxl_x86_acpi.cso that we can then appropriately set this flag for PVHv2 guests.Quoted 3 lines
(I forget if there is a good reason, but) why do we still have hvmloader writing the ACPI tables for HVM guests? We should consolidate on one consistent way of making things like this happen.
Quoted 6 lines
I think one of the reasons was that MMIO addresses (which are needed by the tables) are determined by hvmloader during runtime.
It would be nice to do this in the toolstack because we also use this information in
cacheattr_init()which appears to be the only reason why we need to bring all possible VCPUs up and then offlining them.
Ah yes. This ties in with the other needs to actually know the proper layout of the guest in one consistent location.
This can be fixed properly when the hypervisor is the one authoritative source of guest-layout information.
Lets fudge it for now if we can; no point expending effort fixing a corner case which is going to be fixed differently anyway.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
In reply to Roger Pau Monnetools/libacpi/acpi2_0.h struct acpi_20_slit { · line 442
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 02.12.16 at 14:48, <[email protected]> wrote:
tools/libacpi/acpi2_0.h +1
-1@@ -436,7 +439,7 @@ struct acpi_20_slit {* Table revision numbers. */ #define ACPI_2_0_RSDP_REVISION 0x02 -#define ACPI_2_0_FADT_REVISION 0x04 +#define ACPI_2_0_FADT_REVISION 0x05
Do we really want to make this change unconditionally, rather than only for PVH guests? I'm not sure which (older) OSes look at table revisions (and may hence end up being incompatible), or whether OSes may expect certain table versions together with certain base ACPI versions. I think I had pointed out before that we really should have the guest config file "acpi=" setting mean a version number, and table revisions should then be selected according to that base version. As that's a larger change, simply using one fixed version for HVM and another for PVH would look fine to me.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
Quoted 17 lines · Jan Beulich
tools/libacpi/acpi2_0.h struct acpi_20_slit { · line 442
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 02.12.16 at 14:48, <[email protected]> wrote:
tools/libacpi/acpi2_0.h +1
-1@@ -436,7 +439,7 @@ struct acpi_20_slit {* Table revision numbers. */ #define ACPI_2_0_RSDP_REVISION 0x02 -#define ACPI_2_0_FADT_REVISION 0x04 +#define ACPI_2_0_FADT_REVISION 0x05Do we really want to make this change unconditionally, rather than only for PVH guests? I'm not sure which (older) OSes look at table revisions (and may hence end up being incompatible), or whether OSes may expect certain table versions together with certain base ACPI versions. I think I had pointed out before that we really should have the guest config file "acpi=" setting mean a version number, and table revisions should then be selected according to that base version. As that's a larger change, simply using one fixed version for HVM and another for PVH would look fine to me.
I don't mind using different revision numbers for HVM and PVH, but that means that we would need to also have two different structures, one for FADT 4.0 and one for FADT 5.0, which is kind of redundant, or maybe play tricks with size and the checksum. Also the current FADT table strcuture is named acpi_20_fadt, which seems to have gotten out-of-sync with the version we are using (4).
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v2 4/4] tools/libacpi: announce that PVHv2 has no CMOS RTC in FADT
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 02.12.16 at 18:32, <[email protected]> wrote:
Quoted 17 lines · Jan Beulich
tools/libacpi/acpi2_0.h struct acpi_20_slit { · line 442
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 02.12.16 at 14:48, <[email protected]> wrote:
tools/libacpi/acpi2_0.h +1
-1@@ -436,7 +439,7 @@ struct acpi_20_slit {* Table revision numbers. */ #define ACPI_2_0_RSDP_REVISION 0x02 -#define ACPI_2_0_FADT_REVISION 0x04 +#define ACPI_2_0_FADT_REVISION 0x05Do we really want to make this change unconditionally, rather than only for PVH guests? I'm not sure which (older) OSes look at table revisions (and may hence end up being incompatible), or whether OSes may expect certain table versions together with certain base ACPI versions. I think I had pointed out before that we really should have the guest config file "acpi=" setting mean a version number, and table revisions should then be selected according to that base version. As that's a larger change, simply using one fixed version for HVM and another for PVH would look fine to me.
Quoted 3 lines
I don't mind using different revision numbers for HVM and PVH, but that means that we would need to also have two different structures, one for FADT 4.0 and one for FADT 5.0, which is kind of redundant, or maybe play tricks with size
I wouldn't call this "playing tricks" - using sizeof() or offsetof() there depending on version doesn't seem all that tricky to me, and is common practice elsewhere.
Quoted 2 lines
and the checksum. Also the current FADT table strcuture is named
acpi_20_fadt, which seems to have gotten out-of-sync with the version we are using (4).
Looks like so, yes. The header file's name has the same issue.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel