[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH-for-4.11 v2] xpti: fix bug in double fault handling



On 23/04/18 13:38, Juergen Gross wrote:
> 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 interrupt. So repair this in order to allow
> interrupt handling to work even after a double fault.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
>  xen/arch/x86/x86_64/entry.S | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
> index 45d9842d09..25427b0cec 100644
> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -773,6 +773,7 @@ ENTRY(double_fault)
>          neg   %rbx
>  .Ldblf_cr3_load:
>          mov   %rbx, %cr3
> +        movq $0, STACK_CPUINFO_FIELD(xen_cr3)(%r14)
>  .Ldblf_cr3_okay:
>  
>          movq  %rsp,%rdi

What about the other write into xen_cr3 with a negated value?  Won't
this still explode if we get an NMI or MCE at the wrong moment?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.