x86/efi: Clear EFI_RUNTIME_SERVICES if failing to enter virtual mode
authorDave Young <dyoung@redhat.com>
Thu, 14 Aug 2014 09:15:31 +0000 (17:15 +0800)
committerMatt Fleming <matt.fleming@intel.com>
Fri, 3 Oct 2014 17:40:59 +0000 (18:40 +0100)
commita5a750a98fe2812263546cc20badd32bab21ec52
tree61c283161af2dc26c8cb1b3443b01bcb4c4826f2
parent6632210f50530ea53dd21f786f2854609d928689
x86/efi: Clear EFI_RUNTIME_SERVICES if failing to enter virtual mode

If enter virtual mode failed due to some reason other than the efi call
the EFI_RUNTIME_SERVICES bit in efi.flags should be cleared thus users
of efi runtime services can check the bit and handle the case instead of
assume efi runtime is ok.

Per Matt, if efi call SetVirtualAddressMap fails we will be not sure
it's safe to make any assumptions about the state of the system. So
kernel panics instead of clears EFI_RUNTIME_SERVICES bit.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/platform/efi/efi.c