Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Clear VMCS if reusing after vcpu reset

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Clear VMCS if reusing after vcpu reset
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 30 Apr 2007 08:25:07 +0100
Delivery-date: Mon, 30 Apr 2007 00:21:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <D470B4E54465E3469E2ABBC5AFAC390F013B1DAA@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceK7hrJaVpsNFsWQeu9LhE5uBSFagACMmDbAAABnYAAAHCupg==
Thread-topic: [Xen-devel] [PATCH] Clear VMCS if reusing after vcpu reset
User-agent: Microsoft-Entourage/11.3.3.061214
On 30/4/07 08:19, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:

>> Furthermore, this need to zap the page a second time is worrying. We
>> only
>> modify architectural state in the VMCS in a well-defined way. That
>> shouldn't
>> upset the hardware. Is this actually an indication that there is some
>> architectural state that we are forgetting to re-initialise? If so then
>> that's the bug which should be fixed.
> 
> Does construct_vmcs need to explicitly care all fields if hardware
> just expects a zero there which can be satisfied by memset()? Anyway,
> I'll take a deeper look to check which unexpected fields are with stale
> content before reset.

Well, we actually write lots of zeroes in construct_vmcs(), so it's not like
we really take advantage of the memset(). And in fact strictly speaking I
don't think we can -- the only architectural interface to the VMCS is via
the stupid VMREAD/VMWRITE instructions. We can make no assumptions about
VMCS layout nor, presumably, field encodings (you might choose to write 1s
for 0s and 0s for 1s in the actual in-memory format, for all I know!).

 -- Keir



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