diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2011-06-15 16:16:41 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2011-06-15 16:16:41 +0100 |
commit | 2de77fa3cdbc08f76942db9bcf38dc6885cb4786 (patch) | |
tree | 4fe9cb641aa95fe477c2ec5a9b1cc4f7d0edc559 /xen/include/xen/kexec.h | |
parent | f6239c2a1e56e2795effe44fcf88467c501ca9d0 (diff) | |
download | xen-2de77fa3cdbc08f76942db9bcf38dc6885cb4786.tar.gz xen-2de77fa3cdbc08f76942db9bcf38dc6885cb4786.tar.bz2 xen-2de77fa3cdbc08f76942db9bcf38dc6885cb4786.zip |
KEXEC: correctly revert x2apic state when kexecing
Introduce the boolean variable 'kexecing' which indicates to functions
whether we are on the kexec path or not. This is used by
disable_local_APIC() to try and revert the APIC mode back to how it
was found on boot.
We also need some fudging of the x2apic_enabled variable. It is used
in multiple places over the codebase to mean multiple things,
including:
What did the user specifify on the command line?
Did the BIOS boot me in x2apic mode?
Is the BSP Local APIC in x2apic mode?
What mode is my Local APIC in?
Therefore, set it up to prevent a protection fault when disabling the
IOAPICs. (In this case, it is used in the "What mode is my Local APIC
in?" case, so the processor doesnt suffer a protection fault because
of trying to use x2apic MSRs when it should be using xapic MMIO)
Finally, make sure that interrupts are disabled when jumping into the
purgatory code. It would be bad to service interrupts in the Xen
context when the next kernel is booting.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Diffstat (limited to 'xen/include/xen/kexec.h')
-rw-r--r-- | xen/include/xen/kexec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h index 26df1ac9ac..db58e62361 100644 --- a/xen/include/xen/kexec.h +++ b/xen/include/xen/kexec.h @@ -12,6 +12,8 @@ typedef struct xen_kexec_reserve { extern xen_kexec_reserve_t kexec_crash_area; +extern bool_t kexecing; + void set_kexec_crash_area_size(u64 system_ram); /* We have space for 4 images to support atomic update |