From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 0/8][v2] MSI-X mask emulation support for assigned device Date: Wed, 20 Oct 2010 09:12:38 -0600 Message-ID: <1287587558.3007.31.camel@x201> References: <1287563192-29685-1-git-send-email-sheng@linux.intel.com> <4CBEBB85.4000706@redhat.com> <20101020104447.GD12878@redhat.com> <4CBECB9E.7000005@redhat.com> <20101020134329.GB13311@redhat.com> <1287586718.3007.19.camel@x201> <20101020145822.GC22204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Sheng Yang , Marcelo Tosatti , kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753599Ab0JTPMl (ORCPT ); Wed, 20 Oct 2010 11:12:41 -0400 In-Reply-To: <20101020145822.GC22204@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2010-10-20 at 16:58 +0200, Michael S. Tsirkin wrote: > On Wed, Oct 20, 2010 at 08:58:38AM -0600, Alex Williamson wrote: > > On Wed, 2010-10-20 at 15:43 +0200, Michael S. Tsirkin wrote: > > > On Wed, Oct 20, 2010 at 12:59:42PM +0200, Avi Kivity wrote: > > > > How far away is vfio? If it's merged soon, we might avoid making > > > > changes to the old assigned device infrastructure and instead update > > > > vfio. > > > > > > Hard to be sure, hopefully 2.6.38 material. > > > > > > Some issues off the top of my head are > > > - readonly/virtualized table correctness > > > hopefully will start converging now that > > > we are switching to standard registers from pci_regs.h > > > - work out some capability negotiation mechanism so userspace/kernel > > > can detect bug fixes/missing features and recover or fail gracefully > > > - with multiple assigned devices in a guest: > > > I don't think we have figured out how do they share an iommu context > > > > A single UIOMMU fd can be used for multiple devices. The code I wrote > > supports this, but it's really only meant to support a uiommufd passed > > via the command line for libvirt usage. Since libvirt doesn't yet > > support vfio, it's never been tested. > > I think there was some issue that programming was > done through vfio fd and got lost if you try to hot unplug > device which programmed it. Maybe I'm wrong ... Hasn't been tested, so bugs are probably. Sounds fixable though. Sharing an IOMMU context is at least part of the design. > > > - maybe: reset handling (flr support) - need to look a it > > > > I'd add that for the qemu vfio driver, we need to work out the KVM > > interrupt optimizations, otherwise we suffer extra latency vs current > > code. > > You see this in some benchmark? I haven't done any formal benchmarks on VFIO, but I recall that while both can achieve line rate on a 1G link, VFIO currently requires more CPU to do so. Bouncing interrupts through QEMU seems like an obvious candidate for that. Thanks, Alex