xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] retry instruction on svm emulation failure
@ 2011-05-18  9:05 Paolo Bonzini
  2011-05-18 10:08 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2011-05-18  9:05 UTC (permalink / raw)
  To: xen-devel, pbonzini

From: pbonzini@redhat.com

# HG changeset patch
# User Paolo Bonzini <pbonzini@redhat.com>
# 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@redhat.com>

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
     gdprintk(XENLOG_WARNING,
              "%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;
 
  done:

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-18 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-18  9:05 [PATCH] retry instruction on svm emulation failure Paolo Bonzini
2011-05-18 10:08 ` Keir Fraser
2011-05-18 21:08   ` Wei Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).