From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Eliminate the difference of ioapic andiosapic Date: Fri, 30 Nov 2007 13:57:03 +0200 Message-ID: <474FFA8F.7040403@qumranet.com> References: <42DFA526FC41B1429CE7279EF83C6BDCA3951B@pdsmsx415.ccr.corp.intel.com> <474FBFAB.7020407@qumranet.com> <42DFA526FC41B1429CE7279EF83C6BDCA397B3@pdsmsx415.ccr.corp.intel.com> <474FCA8C.2090809@qumranet.com> <42DFA526FC41B1429CE7279EF83C6BDCA3981F@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Zhang, Xiantao" Return-path: In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDCA3981F-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Zhang, Xiantao wrote: > Avi Kivity wrote: > >> Zhang, Xiantao wrote: >> >>> Avi Kivity wrote: >>> >>> >>>> Zhang, Xiantao wrote: >>>> >>>> >>>>> From: Zhang Xiantao >>>>> Date: Thu, 29 Nov 2007 18:17:13 +0800 >>>>> Subject: [PATCH] Clearing up the difference of ioapic and iosapic >>>>> Since IA64 uses iosapic, we want to merget it with current ioapic >>>>> code. This patch should make x86 and IA64 happy. >>>>> Signed-off-by: Zhang Xiantao --- >>>>> drivers/kvm/ioapic.c | 26 +++++++++++++------------- >>>>> drivers/kvm/irq.h | 5 +++-- >>>>> drivers/kvm/lapic.c | 23 ++++++++++++++++++----- >>>>> 3 files changed, 34 insertions(+), 20 deletions(-) >>>>> >>>>> diff --git a/drivers/kvm/ioapic.c b/drivers/kvm/ioapic.c >>>>> index cf1d50b..79c48ec 100644 >>>>> --- a/drivers/kvm/ioapic.c >>>>> +++ b/drivers/kvm/ioapic.c >>>>> @@ -36,11 +36,8 @@ >>>>> #include >>>>> #include >>>>> -#include >>>>> -#include >>>>> >>>>> >>>>> >>>> This will break compilation under certain .configs. >>>> >>>> Other than that, the patch is good. >>>> >>>> >>> Can we use the compile option CONFIG_X86 to handle it ? Xiantao >>> >>> >> Sure. >> >> But where does ia64 get its ioapic defines then? Things like >> dest_Fixed, I grepped for them in include/asm-ia64 but didn't find >> them. >> >> Maybe an include/asm-ia64/io_apic.h can provide them? >> > > In IA64, it uses macros to define them for iosapic side. Seems only > io_apic.h should be included for dest_Fixed reference, and apicdef is > not necessary here. > Now, I defined it in IA64-specific head file, (e.g.) ia64.h. > Here, I don't think we can define io_apic.h under asm-ia64, since the > similar definition exists in iosapic.h. Maybe we can removed the > include here, and just define an common macro such kvm_dest_Fixed and > kvm_dest_Low_Prio in irq.h to solve it, and make kvm not dependent of > kernel's head files here. What's your opinion? > Hm... I guess we can have a drivers/kvm/ioapic.h which will contain the definitions for io[s]apic, and drop the dependency on asm-x86/io_apic.h. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4