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][SVM] HVM fix for SWINT event injection

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][SVM] HVM fix for SWINT event injection
From: "Woller, Thomas" <thomas.woller@xxxxxxx>
Date: Fri, 27 Jul 2007 10:31:29 -0500
Delivery-date: Fri, 27 Jul 2007 08:29:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfQYzPKvOx6lNgtT0G0uq8JV8aZRw==
Thread-topic: [PATCH][SVM] HVM fix for SWINT event injection
This patch resolves issues with booting/installing AMD-V HVM guests,
including 32bit win2000, and 64bit vista/longhorn guests on
xen-unstable.

This patch modifies the AMD-V reinjection logic (intr.c) to not inject
any SWINT that the processor was unable to execute (exitintinfo valid w/
type=4).  The processor indicates that a SWINT was unsuccessful by
filling in the exitintinfo field on an #PF intercept, during a world
switch from SVM/guest mode.  

There were several cases observed during boot of win2000 and
vista/longhorn 64b:

Win2000 -
A VMEXIT_EXCEPTION_PF (#PF intercept) occurs during execution of an "Int
10" instruction.  
The exitintinfo field is properly filled out by the processor containing
type=4/vector=0x10.
The call into paging_fault() to handle the #PF is not resolved
(not_a_shadow_fault/0 returned), so the eventinj information is filled
out in the #PF vmexit handler (to inject later).
The svm_intr_assist() code is executed with both the eventinj, and the
exitininfo fields filled out.
In this case the #PF needs to be injected, ignoring the SWINT in the
exitintinfo fields.

Vista/Longhorn 64b -
Similar to above, but the call into paging_fault() is resolved
(EXCRET_fault_fixed returned), and in this case the SWINT in exitintifo
should also be ignored.

Please apply to xen-unstable.
Applies cleanly to c/s 15651.
Signed-off-by Tom Woller <thomas.woller@xxxxxxx> 

Note that HVM guests will not boot on AMD-V with xen-staging.hg c/s
15652.  
Keir, do you want me to take a look at staging c/s 15652 on AMD-V w/
HVM?

  --Tom

thomas.woller@xxxxxxx  +1-512-602-0059
AMD Corporation - Operating Systems Research Center
5204 E. Ben White Blvd. UBC1
Austin, Texas 78741

Attachment: svm_inj_fix_for_hvm_15651.patch
Description: svm_inj_fix_for_hvm_15651.patch

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