From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 3/3] KVM: Enable MSI-X for KVM assigned device Date: Fri, 13 Feb 2009 15:13:14 -0200 Message-ID: <20090213171314.GB24353@amt.cnet> References: <1234339731-3195-1-git-send-email-sheng@linux.intel.com> <1234339731-3195-4-git-send-email-sheng@linux.intel.com> <20090212204005.GB19749@amt.cnet> <200902131329.42960.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]:56989 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbZBMRNp (ORCPT ); Fri, 13 Feb 2009 12:13:45 -0500 Content-Disposition: inline In-Reply-To: <200902131329.42960.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Feb 13, 2009 at 01:29:42PM +0800, Sheng Yang wrote: > The allocation only happen once, at the second time it would report error in > current code. But allocate/deallocate is also acceptable for future. Oops, it OK. > > - interrupt context can read the table while kvm_vm_ioctl_set_msix_entry > > is modifying it. So you either need to forbid more than one > > kvm_vm_ioctl_set_msix_entry call in the lifetime of a guest (which > > you can later allow when you support MSI table change), or handle > > accesses from multiple contexes now. It seems forbidding is enough for > > the moment from what you said. > > Yeah. > > But for the modifying the MSI-X table, the most critical problem is, current > Linux didn't support it IIRC. So I have to disable MSI-X then enable it again > with new table, and it would result in lost interrupt. > > So seems the most reasonable method is to modify pci_enable_msix() and related > function's action to support this... Alright, then just reply "[PATCH 1/3] KVM: Ioctls for init MSI-X entry" with the minor comments reworked so Avi can apply. Thanks.