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] Set NX bit for a PTE.

To: Necrosoft <necrosoft@xxxxxx>
Subject: Re: [Xen-devel] Set NX bit for a PTE.
From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
Date: Thu, 19 Jun 2008 17:38:36 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 19 Jun 2008 09:39:24 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=m6fScMouwZVwPjXwr+V/OdyQvJ/y1Q53OJNRtCMvGpk=; b=MwRQmqD8oayaZolbhzEoGyw5vyUSqV/Hu7jDR5DnJnEHsuA+jaSNWbx16hLfv6ez06 AJ3zLe2lMU/mY8pWivWB0ev/D1lHzAeiFRsnlIAOhqLDvUJEWCFSz/kGNOnAv/hABZ3F AXVVn7D6wLw4v0KpCbyotP6D6YfTyn/s2Orbs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=ImGvxaB1RnGu0JQsywd/G1No0ssz0ZMPSItq5EvERwn2Sdt4rJXMMpMbDyN3I+3WlK 03LpefH59kiIEKN71DoHK/scAW+GRrXzg+7drLmdk04ekYdPLtDxlNXHOS9lOo8OdE3Q /Y1YkT53flOiGG0djpX4QiAVDxxa4tB7XCC1M=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <b1399c5e0806120608n18f31310yc2cd8f2f13e7b54@xxxxxxxxxxxxxx>
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: <b1399c5e0806120608n18f31310yc2cd8f2f13e7b54@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> Hi
>
> I would set the NX bit for a kernel pte in a PV domain. I try to do that
> from dom0 walking the page table: when l1e = l1[l1_table_offset_pae(va)]; is
> reached I try to overwrite this entry (l1[l1_table_offset_pae(va)] = l1e_NX)
> but I receive a "segmentation fault" and PV domain crash. The address seems
> to be correct (l1 is not unmapped). In PAE mode page table walk work fine.
> For example I can print the following informations:
>
> domU Kernel Address: c0105448
> l1e: 17489063
> l1 address mapped: b7fab000
> l1 offset: 105
> write on: b7fab105
> Segmentation Fault
>
> I can write a pte from dom0 or I must do that only from the hypervisor?

You are trying to change a DomU's pte from Dom0, right? I don't think
this is possible at the moment. While Xen allows (privileged) Dom0 to
map DomU's 'data' pages for writing, it won't let you map page table
pages (Dom0 will fail to get_page_and_type(page, d, PGT_writable_page)
while trying to mod_l1_entry()). The easiest way to set NX bit, would
probably be to add another mmuext hypercall, which Dom0 can then use.

hope this helps
Gr(z)egor(z)

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

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