From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: in-kernel interrupt controller steering Date: Wed, 6 Mar 2013 06:46:15 -0500 (EST) Message-ID: <2040163825.3174283.1362570375614.JavaMail.root@redhat.com> References: <13C727C1-19A2-47FA-A55A-2F34A3BEB68D@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Stuart Yoder , Scott Wood , Paul Mackerras , Peter Maydell , Gleb Natapov To: Alexander Graf Return-path: In-Reply-To: <13C727C1-19A2-47FA-A55A-2F34A3BEB68D@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org > Please go ahead and try to describe an interface the way you envision > it. It needs to fulfill the following criteria: > > * different machine models have different interrupt controller > types > * we need to be able to fetch information from interrupt > controllers, this should be as flexible as possible because we > don't know all future state we want to synchronize today > * user space creates its virtual representation of an interrupt > controller after the vcpus got created > * user space needs a token to an interrupt controller, so that we > have the possibility to add a second in-kernel irqchip if the need > arises > > What the current interface does is: > > SET_IRQCHIP_TYPE: > > * declare CPUs as listeners to a specific irqchip bus > * set the path that interrupt injection takes (this could > probably be changed to dynamic lookups though, based on device > tokens) > > CREATE_DEVICE: > > * spawn one or multiple in-kernel irqchip devices that hook up to > CPUs using the irqchip bus > * tell user space a token to access this irqchip > > I really don't see why you wouldn't want to have that split. I agree. But is the device really being created at CREATE_DEVICE time? What happens if you create N CPUs and N-1 irqchips? On x86, the LAPIC is created magically together with the VCPU. Paolo