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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] MSR related clean up
From: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Date: Wed, 24 Jun 2009 17:21:26 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Eddie Dong <eddie.dong@xxxxxxxxx>
Delivery-date: Wed, 24 Jun 2009 02:21:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C667AA8C.E090%keir.fraser@xxxxxxxxxxxxx>
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>
Organization: Intel Opensource Technology Center
References: <C667AA8C.E090%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.11.2 (Linux/2.6.28-13-generic; KDE/4.2.2; x86_64; ; )
On Wednesday 24 June 2009 17:03:56 Keir Fraser wrote:
> On 24/06/2009 09:50, "Sheng Yang" <sheng@xxxxxxxxxxxxxxx> wrote:
> > On Thursday 18 June 2009 17:57:06 Sheng Yang wrote:
> >> rdmsr_safe() is used to access MSR unknown to Xen, and is not safe... I
> >> think it is legacy.
> >>
> >> Also let msr_write be parity with msr_read on MSR_IA32_MISC_ENABLE.
> >>
> >> CC: Eddie Dong <eddie.dong@xxxxxxxxx>
> >> Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
> >
> > Keir?
>
> Looks pretty dangerous to me. So I'm not sure. There are various MSRs that
> are detected via CPU family/model (which we pass through) which would then
> #GP on access. Also this doesn't change the AMD default. Overall, what we
> have now does seem to work so I'm reluctant to mess with it.
>
Hi Keir

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.

-- 
regards
Yang, Sheng

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