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

[Xen-devel] RE: expose MWAIT to dom0

To: Keir Fraser <keir.xen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: expose MWAIT to dom0
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Mon, 15 Aug 2011 16:14:11 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Mon, 15 Aug 2011 01:15:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA6E9307.1F34C%keir.xen@xxxxxxxxx>
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>
References: <625BA99ED14B2D499DC4E29D8138F15062D2E80DCA@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <CA6E9307.1F34C%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acxa+ymibBfDa2PpTRKdAF4mJFeEFAAHRLo3AACWc5AAASamtgAADcSgAADZNOcAAAbekA==
Thread-topic: expose MWAIT to dom0
> From: Keir Fraser [mailto:keir.xen@xxxxxxxxx]
> Sent: Monday, August 15, 2011 4:11 PM
> 
> On 15/08/2011 08:57, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
> 
> >> Else the kernel could get the flag from the real non paravirtualised CPUID
> >> instruction.
> >
> > linux uses cpu_has to extract mwait capability. To use real cpuid 
> > instruction,
> > then
> > we need change Linux code which is not worthy though, like below:
> >        if (!cpu_has(c, X86_FEATURE_MWAIT))
> >                buf[2] &= ~(ACPI_PDC_C_C2C3_FFH);
> > If we make it into cpu_has bits, then it lacks of original guarding effect.
> 
> cpu_has() accesses a pre-filled capabilities bitmask, filled from cpuid,
> right? And cpuid goes through a pv_ops hook?
> 

I'm not quite catching you here. Do you want to prefill mwait bit from pv_ops
hook unconditionally even in current situation where Xen doesn't expose 
mwait, or selectively under some dom0's boot option even when Xen is
changed to expose mwait? The first case is not sane, while for the 2nd case
I don't think any pv_ops hook is required as long as Xen can expose it, isn't 
it?

Thanks
Kevin

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