From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Move irq sharing information to irqchip level. Date: Mon, 17 Aug 2009 12:35:47 +0300 Message-ID: <4A892473.9010000@redhat.com> References: <20090813171910.GA4636@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:42890 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932366AbZHQJft (ORCPT ); Mon, 17 Aug 2009 05:35:49 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7H9Zodk022103 for ; Mon, 17 Aug 2009 05:35:50 -0400 In-Reply-To: <20090813171910.GA4636@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/13/2009 08:19 PM, Gleb Natapov wrote: > This removes assumptions that max GSIs is smaller than number of pins. > Sharing is tracked on pin level not GSI level. > > Signed-off-by: Gleb Natapov > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index b17d845..4c15bdd 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -413,7 +413,6 @@ struct kvm_arch{ > gpa_t ept_identity_map_addr; > > unsigned long irq_sources_bitmap; > - unsigned long irq_states[KVM_IOAPIC_NUM_PINS]; > u64 vm_init_tsc; > }; > > diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h > index 7d6058a..c025a23 100644 > --- a/arch/x86/kvm/irq.h > +++ b/arch/x86/kvm/irq.h > @@ -71,6 +71,7 @@ struct kvm_pic { > int output; /* intr from master PIC */ > struct kvm_io_device dev; > void (*ack_notifier)(void *opaque, int irq); > + unsigned long irq_states[16]; > }; > > I think it's cleaner to move this into the routing table to avoid duplication. Currently there is no object which is unique to a gsi, but after your array patch, it can be placed next to the hlist_head. -- error compiling committee.c: too many arguments to function