Jan Beulich wrote on 2013-03-11: > In version 3.4 acpi_os_prepare_sleep() got introduced in parallel with > reduced hardware sleep support, and the two changes didn't get > synchronized: The new code doesn't call the hook function (if so > requested). Fix this, requiring a boolean parameter to be added to the > hook function to distinguish "extended" from "legacy" sleep. > > This requires adjusting TXT, but the adjustments only go as far as > failing the extended mode call (since, looking at the TXT interface, > there doesn't even appear to be precautions to deal with that > alternative interface). > > The hypervisor change underlying this is commit 62d1a69 ("ACPI: support > v5 (reduced HW) sleep interface") on the master branch of > git://xenbits.xen.org/xen.git. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > Cc: Richard L Maliszewski <richard.l.maliszewski@xxxxxxxxx> > Cc: Gang Wei <gang.wei@xxxxxxxxx> > Cc: Shane Wang <shane.wang@xxxxxxxxx> > --- > v2: Extend description to include reference to hypervisor side change. > > --- > arch/x86/kernel/tboot.c | 6 +++++- > drivers/acpi/acpica/hwesleep.c | 8 ++++++++ > drivers/acpi/acpica/hwsleep.c | 2 +- > drivers/acpi/osl.c | 16 ++++++++-------- > drivers/xen/acpi.c | 26 +++++++++++++------------- > include/linux/acpi.h | 10 +++++----- > include/xen/acpi.h | 4 ++-- > include/xen/interface/platform.h | 7 ++++--- > 8 files changed, 46 insertions(+), 33 deletions(-) > --- 3.9-rc2/arch/x86/kernel/tboot.c > +++ 3.9-rc2-xen-ACPI-v5-sleep/arch/x86/kernel/tboot.c > @@ -273,7 +273,8 @@ static void tboot_copy_fadt(const struct > offsetof(struct acpi_table_facs, firmware_waking_vector); > } > -static int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control) > +static int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control, > + bool extended) > { static u32 acpi_shutdown_map[ACPI_S_STATE_COUNT] = { /* S0,1,2: */ > -1, -1, -1, @@ -284,6 +285,9 @@ static int tboot_sleep(u8 sleep_state, > u if (!tboot_enabled()) return 0; > + if (extended) > + return -1; > + > tboot_copy_fadt(&acpi_gbl_FADT); > tboot->acpi_sinfo.pm1a_cnt_val = pm1a_control; > tboot->acpi_sinfo.pm1b_cnt_val = pm1b_control; So looks like to make the extended way go further with TXT case other than failing, tboot & its' interface have to be modified to support Reduced Hardware sleeping first, is that true? Jimmy
Attachment:
smime.p7s
Description: S/MIME cryptographic signature