From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel Date: Wed, 2 Mar 2011 09:23:21 +0800 Message-ID: <201103020923.21867.sheng@linux.intel.com> References: <1298541065-21343-1-git-send-email-sheng@linux.intel.com> <20110225082938.GB17290@redhat.com> <20110301201858.GA8368@amt.cnet> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , Avi Kivity , Alex Williamson , kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mga02.intel.com ([134.134.136.20]:2998 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686Ab1CBBUc (ORCPT ); Tue, 1 Mar 2011 20:20:32 -0500 In-Reply-To: <20110301201858.GA8368@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Wednesday 02 March 2011 04:18:58 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. > > > 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? Because strictly speaking it's not MMIO exit, I don't know if Avi would object the confusing concept here, so I introduced another type of exit. But if it's OK, I still would use mmio_needed in the next version, which is also more simple. -- regards Yang, Sheng