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/
Home Products Support Community News


Re: [Xen-devel] can dom0 modify Shadow PT of HVM domU?

To: Wu Bingzheng <wubingzheng@xxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] can dom0 modify Shadow PT of HVM domU?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 26 Aug 2009 13:58:38 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 26 Aug 2009 05:59:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <26241299.782791251282623958.JavaMail.coremail@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/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
Thread-index: AcomOFRAAASL74BVRnuxhI9EA2tC+AAFJln/
Thread-topic: [Xen-devel] can dom0 modify Shadow PT of HVM domU?
User-agent: Microsoft-Entourage/
On 26/08/2009 11:30, "Wu Bingzheng" <wubingzheng@xxxxxxx> wrote:

>> I see.  That seems like a pretty convoluted way of doing it.  Why don't
>> you just inject #GP (or whatever) straight into the guest from your dom0
>> hypercall?
> I think vmx_inject_hw_exception() can't be called under dom0's context,
> because it calls __vmread() to read VMCS.

You can do vmx_vmcs_enter(v) at the very start of the function (before any
vmread or vmwrite) and vmx_vmcs_exit(v) at the very end. If you make this
change then it will be safe to call the function from dom0.

 -- Keir

Xen-devel mailing list