From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Add ifdef in irqchip struct for x86 only structures Date: Mon, 26 Nov 2007 13:10:19 -0600 Message-ID: <474B1A1B.4030104@codemonkey.ws> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Zhang, Xiantao" To: Jerone Young Return-path: In-Reply-To: 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 Perhaps we could just move the declaration of kvm_irqchip to an arch specific header instead of introducing #ifdef's? Does ia64 have a i8259a? Regards, Anthony Liguori Jerone Young wrote: > # HG changeset patch > # User Jerone Young > # Date 1196087575 21600 > # Node ID ccf9dd8a8e0a4513090d44d52c879fb9dfbb79dd > # Parent 32d8bd91d9441d2a3655593a0aaf99f6c403d70f > Add ifdef in irqchip struct for x86 only structures. > > This patch fixes a small issue where sturctures: > kvm_pic_state > kvm_ioapic_state > > are defined inside x86 specific code and may or may not > be defined in anyway for other architectures. The problem > caused is one cannot compile userspace apps (ex. libkvm) > for other archs since a size cannot be determined for these > structures. > > Signed-off-by: Jerone Young > > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > --- a/include/linux/kvm.h > +++ b/include/linux/kvm.h > @@ -51,8 +51,10 @@ struct kvm_irqchip { > __u32 pad; > union { > char dummy[512]; /* reserving space */ > +#if defined(__i386__) || defined(__x86_64__) > struct kvm_pic_state pic; > struct kvm_ioapic_state ioapic; > +#endif > } chip; > }; > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > kvm-devel mailing list > kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/kvm-devel > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/