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: [PATCH] Share the IO_APIC_route_entry with iosapic

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] Share the IO_APIC_route_entry with iosapic
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Thu, 9 Oct 2008 16:27:31 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc:
Delivery-date: Thu, 09 Oct 2008 01:27:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C510D744.1DEF3%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>
References: <F4AE3CDE26E0164D9E990A34F2D4E0DF08A5F0CE63@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C510D744.1DEF3%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckgiO9bcpoCwP60QhSSqGPREIpSFQAkJdlgAAYECKAABwJS6wG/ibPAAADWZOQAAHRlMAAAsQN/AGTTN6A=
Thread-topic: [PATCH] Share the IO_APIC_route_entry with iosapic
Hi Keir,
I think the idea "making an arch-neutral io-apic header" may need too many 
lines of code.

I tried the idea "duplicating the IO_APIC_route_entry structure in a header 
under drivers/passthrough" and find it's not ok:
xen/drivers/passthrough/vtd/intremap.c includes xen/sched.h which has the 
IO_APIC_route_entry defined in include/asm-x86/io_apic.h.
To use the newly-duplicated definition in intremap.c, I have to remove the 
inclusion of xen/sched.h and I find doing this causes many header files 
compilation issue which seems not easy to resolve.
Another drawback of this idea is: we have 2 different definitions for the same 
struct name -- this can cause great confusion, I think.

A better idea may be:
we duplicate the IO_APIC_route_entry structure in a header under 
drivers/passthrough/ and rename it to IO_xAPIC_route_entry -- this new name 
will only be used by files in drivers/passthrough/.
This requires the least changes and avoids confusion.
How do you like this?

Thanks,
-- Dexuan


-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
Sent: 2008年10月7日 16:07
To: Cui, Dexuan; 'xen-devel@xxxxxxxxxxxxxxxxxxx'; Xu, Anthony
Subject: [Xen-devel] Re: [PATCH] Share the IO_APIC_route_entry with iosapic

If you're making an arch-neutral io-apic header, you should move them. If
you just want a convenient stash for vt-d struct definitions, duplicate the
route_entry structure in a header under drivers/passthrough.

 -- Keir

On 7/10/08 08:49, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> wrote:

> The IO_APIC_reg_xx structures are not used in IPF side.
> Let me double check if we also need to move them.
>
> Thanks,
> -- Dexuan
>
>
> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
> Sent: 2008年10月7日 15:34
> To: Cui, Dexuan; 'xen-devel@xxxxxxxxxxxxxxxxxxx'; Xu, Anthony
> Subject: Re: [PATCH] Share the IO_APIC_route_entry with iosapic
>
> On 7/10/08 08:24, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> wrote:
>
>> Hi Keir,
>> The iosapic continues to stay inside arch/ia64/; on the other hand, I think
>> the struct 'IO_APIC_route_entry' should be placed to a common place so that
>> IPF and x86 can share most of the common codes, like interrupt remapping.
>> To make the most use of the current x86 VT-d codes, I personally think
>> this movement of the definition of the struct IO_APIC_route_entry is
>> necessary
>> here.
>> Could you please comment this more?
>
> Okay. Please move all arch-neutral definitions to xen/io_apic.h though --
> that will at a minimum be all IO_APIC_reg_xx structures.
>
>  -- Keir
>
>



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