From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: In kernel PIC support: kernel patch Date: Tue, 03 Jul 2007 07:52:06 -0700 Message-ID: <468A6296.6020801@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A01B40B4A@pdsmsx411.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: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01B40B4A-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@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 Dong, Eddie wrote: >>> +/* for KVM_SET_IRQ_LEVEL */ >>> +struct kvm_irq_level { >>> + __u32 irq; >>> + __u32 level; >>> +}; >>> >>> >> Please add an irqchip index, so this can be used for >> configurations with >> multiple irqchips (likely ioapics). You'll also need to add >> padding so >> the structure is 64-bit aligned. >> >> > Adding irqchip index is one way, another way is to just use gsi index > (probably rename irq to gsi). I.e. In X86, gsi 0-15 is for both PIC and > IOAPIC > and gsi 16-23 is for IOAPIC0 only, gsi 24---xxx can be for ioapic 1,2, > .. n. > > In IA64, gsi 0-xxx is just for IOAPIC 0,1, .. n. > > Since ACPI already defined gsi, so do we really want to use irqchip > index? > They are functionally equvalent but gsi is cross architecture neutral, > while > irqchip index is very X86 specific. > > GSI is good enough. However, we want not to use the name gsi in the code, since other archs will not hace it. Just add a comment indicating that for x86 and ia64 the irqchip number is interpreted according to the gsi conventions. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/