From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 1/3] KVM: Emulation MSI-X mask bits for assigned devices Date: Tue, 12 Oct 2010 20:30:30 +0200 Message-ID: <20101012183030.GD30997@redhat.com> References: <1285667052-24907-1-git-send-email-sheng@linux.intel.com> <201010111728.30602.sheng@linux.intel.com> <20101011100100.GA26294@redhat.com> <201010121449.58332.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754267Ab0JLSgr (ORCPT ); Tue, 12 Oct 2010 14:36:47 -0400 Content-Disposition: inline In-Reply-To: <201010121449.58332.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Oct 12, 2010 at 02:49:58PM +0800, Sheng Yang wrote: > On Monday 11 October 2010 18:01:00 Michael S. Tsirkin wrote: > > On Mon, Oct 11, 2010 at 05:28:30PM +0800, Sheng Yang wrote: > > > On Sunday 03 October 2010 19:12:47 Michael S. Tsirkin wrote: > > > > On Tue, Sep 28, 2010 at 05:44:10PM +0800, Sheng Yang wrote: > > > > > This patch enable per-vector mask for assigned devices using MSI-X. > > > > > > > > > > Signed-off-by: Sheng Yang > > > > > > > > I think I see an issue here, noted below. Some general comments: > > > > - The mask bit seems broken for injecting interrupts from > > > > > > > > userspace (with interrupts/ioctls). > > > > I think we must test it on injection path. > > > > > > I am not quite understand how it related to userspace interrupt injection > > > here... This patch only cover assigned devices for now. > > > > Well, this is a kernel/userspace interface, if it's broken for userspace > > injection now we'll have to go through pain to fix it in a compatible > > way later when we want to use it for userspace injection. > > You might want to ask why we want the kernel to support making > > userspace-injected interrupts when userspace can just avoid injecting > > them, and the answer would be that with irqfd the injection might be > > handled in a separate process. > > OK, I've understood how it related to userspace interrupt injection. But I still > can't see why the interface is broken... That's easy to explain: mask vector, then inject interrupt with an ioctl or irqfd: it still goes in even though it's masked. -- MST