mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xpti: fix bug in double fault handling
When entering the hypervisor via the double fault handler resetting xen_cr3 was missing. This led to switching to pv_cr3 when returning from the next following exception, so repair this in order to allow exception handling to work even after a double fault. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Tested-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
f26441439e
commit
d80af845de
1 file changed
+3
-1
@@ -767,12 +767,14 @@ ENTRY(double_fault)
|
||||
/* WARNING! `ret`, `call *`, `jmp *` not safe before this point. */
|
||||
|
||||
mov STACK_CPUINFO_FIELD(xen_cr3)(%r14), %rbx
|
||||
test %rbx, %rbx
|
||||
neg %rbx
|
||||
jz .Ldblf_cr3_okay
|
||||
jns .Ldblf_cr3_load
|
||||
mov %rbx, STACK_CPUINFO_FIELD(xen_cr3)(%r14)
|
||||
neg %rbx
|
||||
.Ldblf_cr3_load:
|
||||
mov %rbx, %cr3
|
||||
movq $0, STACK_CPUINFO_FIELD(xen_cr3)(%r14)
|
||||
.Ldblf_cr3_okay:
|
||||
|
||||
movq %rsp,%rdi
|
||||
|
||||