lkml.org 
[lkml]   [2009]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 2/5] x86, sleep: always save the value of EFER
    Date
    On Saturday 14 November 2009, H. Peter Anvin wrote:
    > Always save the value of EFER, regardless of the state of NX. Since
    > EFER may not actually exist, use rdmsr_safe() to do so.
    >
    > Signed-off-by: H. Peter Anvin <hpa@zytor.com>
    > Cc: Pavel Machek <pavel@ucw.cz>
    > Cc: Rafael J. Wysocki <rjw@sisk.pl>

    Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

    > Cc: Nigel Cunningham <nigel@tuxonice.net>
    > ---
    > arch/x86/kernel/acpi/sleep.c | 9 +++------
    > 1 files changed, 3 insertions(+), 6 deletions(-)
    >
    > diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
    > index ca93638..c2e4455 100644
    > --- a/arch/x86/kernel/acpi/sleep.c
    > +++ b/arch/x86/kernel/acpi/sleep.c
    > @@ -78,12 +78,9 @@ int acpi_save_state_mem(void)
    > #ifndef CONFIG_64BIT
    > store_gdt((struct desc_ptr *)&header->pmode_gdt);
    >
    > - header->pmode_efer_low = nx_enabled;
    > - if (header->pmode_efer_low & 1) {
    > - /* This is strange, why not save efer, always? */
    > - rdmsr(MSR_EFER, header->pmode_efer_low,
    > - header->pmode_efer_high);
    > - }
    > + header->pmode_efer_low = header->pmode_efer_high = 0;
    > + rdmsr_safe(MSR_EFER,
    > + &header->pmode_efer_low, &header->pmode_efer_high);
    > #endif /* !CONFIG_64BIT */
    >
    > header->pmode_cr0 = read_cr0();
    >



    \
     
     \ /
      Last update: 2009-11-14 01:17    [W:0.021 / U:93.528 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site