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: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: expose MWAIT to dom0
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Mon, 15 Aug 2011 09:10:31 +0100
Cc: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>
Delivery-date: Mon, 15 Aug 2011 01:13:13 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=vvrUXqIuUkBy2VWmKgWMKpu7VQHieGNWUd5NxDkIHvI=; b=jfN16KXpPZBxBoP9F0+pp7NWhM9hD7vKVemW5YeIUJPR5BAd0LvgPJdS3DsmLCS0IT HKAbBsnS4IlojroC05eVcZq52LBWacb3ImdD5HFv80Avh/jIJ7Gqhg/9vz+nVGC/t22Q todcGmr8/4S1qRNf2OEsB98We8tJtsMhBf4gY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <625BA99ED14B2D499DC4E29D8138F15062D2E80DCA@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/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: Acxa+ymibBfDa2PpTRKdAF4mJFeEFAAHRLo3AACWc5AAASamtgAADcSgAADZNOc=
Thread-topic: expose MWAIT to dom0
User-agent: Microsoft-Entourage/12.30.0.110427
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?

 -- Keir



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