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

RE: [Xen-devel] [PATCH]Do some checks and settings of CR0according to VM

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>, "Liu, Eric E" <eric.e.liu@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH]Do some checks and settings of CR0according to VMX capability MSRs
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Wed, 1 Aug 2007 12:50:37 +0800
Delivery-date: Tue, 31 Jul 2007 21:48:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2CF68E9.13226%keir@xxxxxxxxxxxxx>
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>
References: <9D7649D18729DE4BB2BD7B494F7FEDC23A0E44@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C2CF68E9.13226%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfQJJ9SFwvDkiqOSFe7z7TNqnXGEAAAhlp1APPR2gA=
Thread-topic: [Xen-devel] [PATCH]Do some checks and settings of CR0according to VMX capability MSRs
good point, and this is a two side issue, one is hardware capability, the other is software capability, maybe a better way is to have another CR0 value expected by software, and use both of hardware and software expected value to get the effiective one?
-Xin


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
Sent: Friday, July 27, 2007 4:19 PM
To: Liu, Eric E; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH]Do some checks and settings of CR0according to VMX capability MSRs

I agree with some aspects of this patch but not others. For example, not explicitly including PG and PE in guest-mode cr0 value is a bad idea. If a future processor does support e.g., paged real mode then it won’t magically be the case that old Xen will know how to handle that. Currently we expect and require a VMX guest always to run with CR0.PE==1.

I’ll pull out the bits of the patch that I like.

 -- Keir

On 27/7/07 09:03, "Liu, Eric E" <eric.e.liu@xxxxxxxxx> wrote:

According to SDM Vol 3B 19.8 Software should consult the VMX capability MSRs to determine how bits
in CR0 are set, VMXON fails if any of these bits contains an unsupported value. And according to
SDM Vol 3A 2.5, 3B 21.3 and 2A MOV-MOV to/from Control Registers, setting upper 32 bits of CR0
results in a general-protection exception and setting the reserved bits in lower 32 bits of CR0 are ignored .
In accordance with above-mentioned, the patch is attached to do some checks and settings of CR0.

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