WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx, pbonzini@xxxxxxxxxx
Subject: [Xen-devel] [PATCH] retry instruction on svm emulation failure
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Wed, 18 May 2011 11:05:04 +0200
Cc:
Delivery-date: Wed, 18 May 2011 02:06:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.8.2
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
     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:

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>