From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel Date: Tue, 1 Mar 2011 22:59:28 +0200 Message-ID: <20110301205928.GB21457@redhat.com> References: <1298541065-21343-1-git-send-email-sheng@linux.intel.com> <1298541065-21343-4-git-send-email-sheng@linux.intel.com> <20110224104508.GE6895@redhat.com> <201102251428.02261.sheng@linux.intel.com> <20110225082938.GB17290@redhat.com> <20110301201858.GA8368@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sheng Yang , Avi Kivity , Alex Williamson , kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18902 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757226Ab1CAU7j (ORCPT ); Tue, 1 Mar 2011 15:59:39 -0500 Content-Disposition: inline In-Reply-To: <20110301201858.GA8368@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Mar 01, 2011 at 05:18:58PM -0300, Marcelo Tosatti wrote: > On Fri, Feb 25, 2011 at 10:29:38AM +0200, Michael S. Tsirkin wrote: > > On Fri, Feb 25, 2011 at 02:28:02PM +0800, Sheng Yang wrote: > > > On Thursday 24 February 2011 18:45:08 Michael S. Tsirkin wrote: > > > > On Thu, Feb 24, 2011 at 05:51:04PM +0800, Sheng Yang wrote: > > > > > Then we can support mask bit operation of assigned devices now. > > > > > > > > > > Signed-off-by: Sheng Yang > > > > > > > > Doesn't look like all comments got addressed. > > > > E.g. gpa_t entry_base is still there and in reality > > > > you said it's a host virtual address so > > > > should be void __user *; > > > > > > Would update it. > > > > > > > And ENOTSYNC meaning 'MSIX' is pretty hacky. > > > > > > I'd like to discuss it later. We may need some work on all MMIO handling side to > > > make it more straightforward. But I don't want to bundle it with this one... > > > > It's not PCI related so I'll defer to Avi/Marcelo on this. > > Are you guys happy with the ENOTSYNC meaning 'MSIX' > > What would be a better alternative to ENOTSYNC? Can't see any. Return a negative value on error, positive exit code if we want to exit to userspace. As a bonus MSIX knowledge is localized in one file. > > and userspace_exit_needed hacks in this code? > > I thought this was handled by mmio_needed in a previous patch? > > Since x86_emulate_instruction does > > } else if (vcpu->mmio_needed) { > if (vcpu->mmio_is_write) > vcpu->mmio_needed = 0; > r = EMULATE_DO_MMIO; > > It should be fine. Sheng why did you introduce userspace_exit_needed?