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: One question on xen_cpuid in pv guest

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] RE: One question on xen_cpuid in pv guest
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 30 Jul 2009 13:44:07 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 29 Jul 2009 22:44:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A707EDF.1030104@xxxxxxxx>
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: <E2263E4A5B2284449EEBD0AAB751098402CDE9D46C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A707EDF.1030104@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcoQbVTuHgx3KGRQQ1O74199FOHfjQAZ9vEg
Thread-topic: One question on xen_cpuid in pv guest
Jeremy, thanks for clarification, but I still not sure about following code in 
pv_ops dom0. Since the Local APIC is owned by Xen totally, why is it not 
"outright forbidden for the guest"?


    if (!xen_initial_domain())
        cpuid_leaf1_edx_mask &=
            ~((1 << X86_FEATURE_APIC) |  /* disable local APIC */
              (1 << X86_FEATURE_ACPI));  /* disable ACPI */

Thanks
Yunhong Jiang

Jeremy Fitzhardinge wrote:
> On 07/28/09 20:19, Jiang, Yunhong wrote:
>> I have a question to xen_cpuid() in pv_ops guest. Currently
> the cpuid will be trapped to xen HV for emulation. So why do
> we still use cpuid_leaf1_edx_mask/cpuid_leaf1_ecx_mask to do
> mask in guest side? Havn't that been achieved in hypervisor already?
>> 
> 
> Not entirely, or consistently.  In general Xen masks features which
> are outright forbidden for the guest to use, but leaves things that
> might possibly be useful - we still need to mask those out.  It also
> fails to mask some newer features which are not usable in guests
> (like GByte pages and XSAVE), so we need to mask those anyway.  For
> domU, 
> the set of
> mask flags is under the control of the domain config file; a
> misconfiguration could enable flags that the kernel can simply not
> use. 
> 
>    J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>