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: x2APIC emulation for HVM guest

To: "Yang, Sheng" <sheng.yang@xxxxxxxxx>
Subject: [Xen-devel] Re: x2APIC emulation for HVM guest
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Thu, 02 Dec 2010 07:44:05 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 01 Dec 2010 22:44:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201012021423.16866.sheng.yang@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: <201012021009.36497.sheng.yang@xxxxxxxxx> <201012021343.49014.sheng.yang@xxxxxxxxx> <4CF7331F.7080207@xxxxxxxxxx> <201012021423.16866.sheng.yang@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6
On 12/02/2010 07:23 AM, Yang, Sheng wrote:
> On Thursday 02 December 2010 13:48:15 Paolo Bonzini wrote:
>> On 12/02/2010 06:43 AM, Yang, Sheng wrote:
>>> I think we can do it step by step. This patch is big enough.
>>
>> Yes, I agree it can go in as a separate patch.
>>
>>> I'd like to work the direct EOI patch out, but I am thinking about how to
>>> test it...
>>
>> Maybe you can run Xen inside an HVM guest, forcing x2apic mode to be
>> enabled?  You do not need nested VMX if you only run PV guests in the
>> guest hypervisor.
> 
> I don't know how much work need to be done for this, and if it's worth to do 
> for
> something was not be used in practice(if it would be used in practice, then it
> would be easy for us to test)...

Maybe it's as easy as this:

diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -41,13 +41,13 @@ int x2apic_cmdline_disable(void)
 static int probe_x2apic_phys(void)
 {
     return x2apic && x2apic_phys && x2apic_is_available() &&
-        iommu_supports_eim();
+        1;
 }
 
 static int probe_x2apic_cluster(void)
 {
     return x2apic && !x2apic_phys && x2apic_is_available() &&
-        iommu_supports_eim();
+        1;
 }
 
 const struct genapic apic_x2apic_phys = {

The original Xen x2apic code was not conditional on iommu_supports_eim().

Paolo

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