From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: In kernel PIC support: kernel patch Date: Sat, 23 Jun 2007 10:53:14 +0300 Message-ID: <467CD16A.1020403@qumranet.com> References: <467B84EF0200005A00026401@mcclure.wal.novell.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: Gregory Haskins Return-path: In-Reply-To: <467B84EF0200005A00026401-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@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 Gregory Haskins wrote: > On Fri, 2007-06-22 at 13:50 +0300, Avi Kivity wrote: > >> Dong, Eddie wrote: >> >> >>> +#include "kvm.h" >>> +#include "virq.h" >>> + >>> +/* >>> + * check if there is pending interrupt without >>> + * intack. >>> + */ >>> +int cpu_has_interrupt(struct kvm_vcpu *v) >>> +{ >>> + struct pic_state2 *s = kernel_pic(v->kvm); >>> + >>> >>> >> Isn't the PIC connected to just one cpu? >> > > I agree with Eddie here. Its true that only one CPU would ever > associate with PIC (and its usually hardwired to the BSP, but it > technically doesn't have to be depending on the architecture). But the > PIC(s) are really a system wide resource that should hang off the kvm > struct, IMHO. > > In fact, my own implementation puts the ISA-userint model as hanging off > the kvm structure as well (which would be replaced with a similar PIC > model for layer-2 mode in the future). > > The PIC is certainly a system resource, but at least in qemu it's connected to cpu 0 only. We want to preserve that. I guess it doesn't really matter because smp configurations will use the ioapic. ------------------------------------------------------------------------- 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/