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] Why CR0.WP is always set in HVM domain

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Tim Deegan" <Tim.Deegan@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Why CR0.WP is always set in HVM domain
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Fri, 9 Nov 2007 01:25:55 +0800
Delivery-date: Thu, 08 Nov 2007 09:27:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <391BF3CDD2DC0848B40ACB72FA97AD5902697131@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <391BF3CDD2DC0848B40ACB72FA97AD590269711E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx><C358D12D.181C9%Keir.Fraser@xxxxxxxxxxxx> <391BF3CDD2DC0848B40ACB72FA97AD5902697131@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgiEt9W5+JjfWKHQJ2PRjRqeHa4uwAAutVLAABWmXAABSuOcA==
Thread-topic: [Xen-devel] Why CR0.WP is always set in HVM domain
Not sure if we can use shadow_mode_trap_reads(), i.e. when WP is clear,
we set all user space mapping to guest page table to be non-present. And
then do emulate in shadow for such situation. But seems
shadow_mode_traps_reads not implemented yet :(

-- Yunhong 


xen-devel-bounces@xxxxxxxxxxxxxxxxxxx <> wrote:
> Thanks for your explaination.
> I notice some anti-virus application clear CR0.WP, so maybe we need to
> consider this support. 
> 
> -- Yunhong
> 
> xen-devel-bounces@xxxxxxxxxxxxxxxxxxx <> wrote:
>> It's necessary because we need to trap guest writes to pagetables,
>> regardless of setting of guest CR0.WP. If it turns out we need
>> to properly
>> emulate CR0.WP then we'll need to come up with a scheme that does not
>> require us to run the guest with real CR0.WP set. Possibly it
>> will require
>> us to emulate certain memory accesses.
>> 
>> -- Keir
>> 
>> On 8/11/07 14:23, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote:
>> 
>>> In "arch/x86/hvm/vmx/vmx.c", vmx_update_guest_cr(), the CR0.WP is
always
>>>         set as following code: v->arch.hvm_vcpu.hw_cr[0] =
>>>             v->arch.hvm_vcpu.guest_cr[0] |
>>>             X86_CR0_PE | X86_CR0_NE | X86_CR0_PG | X86_CR0_WP;
>>> 
>>> I'm wondering are there any special reason for this? I try to check
>>> shadow code and didn't find any clue.
>>> Can anyone give me some hints?
>>> 
>>> Thanks
>>> Yunhong Jiang
>>> 
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>>> http://lists.xensource.com/xen-devel
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

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