From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 0/8][v2] MSI-X mask emulation support for assigned device Date: Wed, 20 Oct 2010 14:13:01 -0600 Message-ID: <1287605581.3007.59.camel@x201> References: <1287563192-29685-1-git-send-email-sheng@linux.intel.com> <4CBEBB85.4000706@redhat.com> <20101020104447.GD12878@redhat.com> <1287586034.3007.12.camel@x201> <20101020144644.GB22204@redhat.com> <1287587232.3007.26.camel@x201> <20101020151334.GD22204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Sheng Yang , Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10541 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753340Ab0JTUNC (ORCPT ); Wed, 20 Oct 2010 16:13:02 -0400 In-Reply-To: <20101020151334.GD22204@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2010-10-20 at 17:13 +0200, Michael S. Tsirkin wrote: > On Wed, Oct 20, 2010 at 09:07:12AM -0600, Alex Williamson wrote: > > On Wed, 2010-10-20 at 16:46 +0200, Michael S. Tsirkin wrote: > > > On Wed, Oct 20, 2010 at 08:47:14AM -0600, Alex Williamson wrote: > > > > It would probably make sense to request a mask/unmask ioctl in VFIO for > > > > MSI-X, then perhaps the pending bits would only support read/write (no > > > > mmap), so we could avoid an ioctl there. > > > > > > Why not mask/unmask with a write? > > > > That would be possible too, only trouble is then we have QEMU > > intercepting and interpreting the write as well as VFIO intercepting and > > interpreting the write. > > If VFIO is only masking off the mask bit, > > that'd be pretty trivial though. > > I just mean write() instead of an ioctl() Hmm, looking back through my vfio driver, I actually have some code that passes guest writes of the vector control field down to vfio. With interrupt remapping support, vfio should pass these to the device masking the interrupt at the source so we don't even need pending bit emulation. Then we just need to make sure we only filter out the vector table for read/write of the page it lives on so we can support the PBA being on the same page. Alex