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] MSR related clean up

To: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] MSR related clean up
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 24 Jun 2009 10:27:55 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Eddie Dong <eddie.dong@xxxxxxxxx>
Delivery-date: Wed, 24 Jun 2009 02:28:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200906241721.27265.sheng@xxxxxxxxxxxxxxx>
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: Acn0rTrEp/pda4dGTmWwsRs5r5DGUwAANMPb
Thread-topic: [Xen-devel] [PATCH] MSR related clean up
User-agent: Microsoft-Entourage/12.19.0.090515
On 24/06/2009 10:21, "Sheng Yang" <sheng@xxxxxxxxxxxxxxx> wrote:

> What we suffered now is, there are some MSRs existed in CPU, but shouldn't be
> accessed by guest. And guest should expected a GP fault for accessing, but we
> return a real value, which is not desired at all.
>
> And in general, reading from unknown native MSR is dangerous, and also break
> host/guest isolation. I think we at least should control what we read from
> native. Maybe add more MSR handling is necessary.

I kind of agree with you, up to but not including delivering #GPs that would
not be delivered when running the guest OS natively. A middle ground might
be to return all zeros for unknown MSRs for which rdmsr_safe() succeeds.
That is by far the most popular bodge value we manually use to fix up cases
where returning the real MSR value was actually a proven problem.

 -- Keir



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