From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH 09/10] KVM: Enable MSI for device assignment Date: Tue, 4 Nov 2008 21:58:53 +0800 Message-ID: <20081104135853.GC18696@yukikaze> References: <1225428647-27614-1-git-send-email-sheng@linux.intel.com> <1225428647-27614-10-git-send-email-sheng@linux.intel.com> <49103098.7020109@redhat.com> <20081104132543.GB18696@yukikaze> <49104F01.30604@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sheng Yang , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from ti-out-0910.google.com ([209.85.142.187]:11308 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751911AbYKDN65 (ORCPT ); Tue, 4 Nov 2008 08:58:57 -0500 Received: by ti-out-0910.google.com with SMTP id b6so1703246tic.23 for ; Tue, 04 Nov 2008 05:58:55 -0800 (PST) Content-Disposition: inline In-Reply-To: <49104F01.30604@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Nov 04, 2008 at 03:32:49PM +0200, Avi Kivity wrote: > Sheng Yang wrote: >> One question here: did the architectures other than X86 and IA64 need >> dispatch MSI support? > > s390 doesn't. ppc may, one day in the future. Not now I think. OK, so reuse is enough for today. > >> If so, I am afraid reuse assigned_device_msi_dispatch >> (or similar solution) won't be elegant (though I already lean toward a arch >> specific dispatch function). >> >> I am not familiar with virtio-pci and how it works, it would be good if >> it can be illustrated a little more. > > For this context, it's just a pci device. qemu calls KVM_IRQ_LINE to > inject an irq, and the pci layer in the guest delivers the irq to the > virtio-pci driver. Got it. > > In fact, it's not just for pci. We could msi-enable e1000 and get > improved performance there as well. E1000? Don't understand... Sounds like INTx->MSI... > >> But I guess what you means is only set >> gsi can result in kvm_set_irq() deliver the MSI correctly. I think this can >> be done. Associating gsi with guest_msi_addr and guest_msi_data in a linked >> list, for gsi >= IOAPIC_PINS, > Let's say, (gsi >> 24) == 1. That gives us 16M potential MSIs. Confused... GSI become a bitmap? > >> kvm_set_irq() checked the list and deliver the >> interrupt. Of course, some lock should be taken to maintain the list, maybe >> kvm->lock in first step as we used for kvm_set_irq (kvm->lock become more >> and more bigger...). >> > > I think kvm_set_irq() already takes kvm->lock. Yes. So I means maybe we can improve the granularity of the lock in interrupt handling part in the future. -- regards Yang, Sheng > > -- > error compiling committee.c: too many arguments to function > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html