From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 7/8] KVM: assigned dev: Introduce io_device for MSI-X MMIO accessing Date: Thu, 21 Oct 2010 11:47:18 +0200 Message-ID: <4CC00C26.30900@redhat.com> References: <1287563192-29685-1-git-send-email-sheng@linux.intel.com> <1287563192-29685-8-git-send-email-sheng@linux.intel.com> <4CBEBA87.3040107@redhat.com> <201010211446.51904.sheng@linux.intel.com> <4CC00782.8020903@redhat.com> <20101021092459.GA2950@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sheng Yang , Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755928Ab0JUJrX (ORCPT ); Thu, 21 Oct 2010 05:47:23 -0400 In-Reply-To: <20101021092459.GA2950@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/21/2010 11:24 AM, Michael S. Tsirkin wrote: > On Thu, Oct 21, 2010 at 11:27:30AM +0200, Avi Kivity wrote: > > On 10/21/2010 08:46 AM, Sheng Yang wrote: > > >> > + r = -EOPNOTSUPP; > > >> > > >> If the guest assigned the device to another guest, it allows the nested > > >> guest to kill the non-nested guest. Need to exit in a graceful fashion. > > > > > >Don't understand... It wouldn't result in kill but return to QEmu/userspace. > > > > What would qemu do on EOPNOTSUPP? It has no way of knowing that > > this was triggered by an unsupported msix access. What can it do? > > > > Best to just ignore the write. > > > > If you're worried about debugging, we can have a trace_kvm_discard() > > tracepoint that logs the address and a type enum field that explains > > why an access was discarded. > > The issue is that the same page is used for mask and entry programming. Yeah. For that use the normal mmio exit_reason. I was referring to misaligned writes. I'm not happy with partial emulation, but I'm not happy either with yet another interface to communicate the decoded MSI BAR writes to userspace. Shall we just reprogram the irq routing table? -- error compiling committee.c: too many arguments to function