From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2][RFC] KVM: Emulate MSI-X table and PBA in kernel Date: Sun, 02 Jan 2011 12:26:11 +0200 Message-ID: <4D2052C3.3020901@redhat.com> References: <1293007495-32325-1-git-send-email-sheng@linux.intel.com> <4D1C5124.2090409@redhat.com> <20101230103256.GB6441@redhat.com> <201012311105.28371.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , Marcelo Tosatti , kvm@vger.kernel.org, Alex Williamson To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55807 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755026Ab1ABK0Q (ORCPT ); Sun, 2 Jan 2011 05:26:16 -0500 In-Reply-To: <201012311105.28371.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/31/2010 05:05 AM, Sheng Yang wrote: > > > > Existing code does not support PBA in assigned devices, so at least it's > > not a regression there, and the virtio spec says nothing about this so > > we should be fine. > > I agree. At least it's not a regression. And in fact we haven't seen any device > driver use this. I've checked Linux kernel code, found no one used PCI_MSIX_PBA or > msix_pba_offset_reg(). > > I guess it's fine to get MSI-X mask part in first, then deal with PBA part if > necessary - though we haven't seen any driver use it so far. It won't be worse > with this patch anyway... In a way it is worse because before, the fix would belong in user space, which is easier to test and distribute. Now we have to fix it in the kernel. However I recognize that drivers which rely on the pending bit are rare/nonexistent (likely on in preboot environments where interrupts are hard), so even if we do code it, it will likely be incorrect (certainly without a test). So I'll accept the patch without PBA. Michael, what about supporting virtio? Can we base something on this patch? -- error compiling committee.c: too many arguments to function