From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 2/3] KVM: Add gsi_msg_pending_bitmap for MSI-X Date: Fri, 13 Feb 2009 15:10:48 -0200 Message-ID: <20090213171048.GA24353@amt.cnet> References: <1234339731-3195-1-git-send-email-sheng@linux.intel.com> <1234339731-3195-3-git-send-email-sheng@linux.intel.com> <20090212195118.GA19749@amt.cnet> <200902131137.47240.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34263 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbZBMRLa (ORCPT ); Fri, 13 Feb 2009 12:11:30 -0500 Content-Disposition: inline In-Reply-To: <200902131137.47240.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Feb 13, 2009 at 11:37:45AM +0800, Sheng Yang wrote: > > > +#define KVM_ASSIGNED_DEV_MSIX ((1 << 2) | (1 << 10)) > > > > Can you explain the usage of the two bits? > > Um... Just to keep consistent with formers(one for guest and one for host), at > cost of one bit. OK > > Can drop the printk's (also from find_gsi_from_host_irq). > > Not that confident. In fact, I often triggered this during debug... IIRC, > userspace program shouldn't trigger this if kernel space works well. Maybe it > can be changed to WARN_ON() or BUG_ON() later. OK > > Check the return value? > > Yeah... > > > > > + enable_irq(irq); > > > > Do you guarantee that particular irq you're enable_irq'ing is not bogus? > > Its has been passed from userspace after all. > > It isn't passed from userspace. This one is filled by pci_enable_msix(), which > should be OK. Alright. > > So you chose GSI == 0 as invalid because of x86 assumptions? Or is there > > any other reason? > > Yeah, it based on x86 and IA64 IRQ 0 can't be used by MSI-X. And only x86 > support MSI-X now(and IA64 would follow later). OK. > > > > IRQ sharing in the host side is not supported correct? > > Um? Yeah... And seems we won't support it forever... OK.