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

[Xen-devel] [PATCH] retry instruction on svm emulation failure

From: pbonzini@xxxxxxxxxx

# HG changeset patch
# User Paolo Bonzini <pbonzini@xxxxxxxxxx>
# Date 1305708694 -7200
# Node ID 8605c877b972c82a385915e38c0171952621ac3c
# Parent  e1452f8088dc667ca57cc1c5a63983a5131d1314
retry instruction on svm emulation failure

Upon emulation failure, Xen injects a #GP into the guest on AMD machines.
However, this kind of #GP does not happen in hardware.  It is possible
(and was observed in practice) that the failure is transient.  It will
go away naturally if the instruction is retried, because the guest will
be executing other code and will not exit.

Of course, this bears the possibility that the failure was the result
of a hypervisor bug, and that the guest will hang as a result.  But even
in this case the outcome is not worse than getting a general-protection
fault (except for extra CPU consumption), and it will be much easier to
inspect the guest to see what's going on.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c
--- a/xen/arch/x86/hvm/svm/emulate.c
+++ b/xen/arch/x86/hvm/svm/emulate.c
@@ -200,7 +200,6 @@ int __get_instruction_length_from_list(s
              "%s: Mismatch between expected and actual instruction bytes: "
              "eip = %lx\n",  __func__, (unsigned long)vmcb->rip);
-    hvm_inject_exception(TRAP_gp_fault, 0, 0);
     return 0;

Xen-devel mailing list



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