From patchwork Fri Sep 14 23:02:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 184053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 61A4B2C00A4 for ; Sat, 15 Sep 2012 09:02:34 +1000 (EST) Received: from localhost ([::1]:37982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCeu8-0001Ty-EC for incoming@patchwork.ozlabs.org; Fri, 14 Sep 2012 19:02:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCetn-0001GP-Si for qemu-devel@nongnu.org; Fri, 14 Sep 2012 19:02:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCetm-0003nO-0n for qemu-devel@nongnu.org; Fri, 14 Sep 2012 19:02:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCetl-0003nF-N1 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 19:02:09 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8EN25gH003675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Sep 2012 19:02:08 -0400 Received: from bling.home (ovpn-113-153.phx2.redhat.com [10.3.113.153]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8EN2429015745; Fri, 14 Sep 2012 19:02:04 -0400 From: Alex Williamson To: aliguori@us.ibm.com Date: Fri, 14 Sep 2012 17:02:04 -0600 Message-ID: <20120914230203.12831.70873.stgit@bling.home> In-Reply-To: <20120914225712.12831.29465.stgit@bling.home> References: <20120914225712.12831.29465.stgit@bling.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kvm@vger.kernel.org, aik@ozlabs.ru, jan.kiszka@siemens.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, alex.williamson@redhat.com, avi@redhat.com Subject: [Qemu-devel] [PATCH v5 4/4] vfio: Enable vfio-pci and mark supported X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson --- MAINTAINERS | 5 +++++ configure | 6 ++++++ hw/Makefile.objs | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 61f8b45..fd3eca0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -474,6 +474,11 @@ M: Gerd Hoffmann S: Maintained F: hw/usb* +VFIO +M: Alex Williamson +S: Supported +F: hw/vfio* + vhost M: Michael S. Tsirkin S: Supported diff --git a/configure b/configure index 7656c32..25f7da7 100755 --- a/configure +++ b/configure @@ -167,6 +167,7 @@ attr="" libattr="" xfs="" +vfio_pci="no" vhost_net="no" kvm="no" gprof="no" @@ -528,6 +529,7 @@ Haiku) usb="linux" kvm="yes" vhost_net="yes" + vfio_pci="yes" if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then audio_possible_drivers="$audio_possible_drivers fmod" fi @@ -3180,6 +3182,7 @@ echo "libiscsi support $libiscsi" echo "build guest agent $guest_agent" echo "seccomp support $seccomp" echo "coroutine backend $coroutine_backend" +echo "VFIO PCI support $vfio_pci" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -3921,6 +3924,9 @@ if test "$target_softmmu" = "yes" ; then if test "$smartcard_nss" = "yes" ; then echo "subdir-$target: subdir-libcacard" >> $config_host_mak fi + if test "$vfio_pci" = "yes" ; then + echo "CONFIG_VFIO_PCI=y" >> $config_target_mak + fi case "$target_arch2" in i386|x86_64) echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 6dfebd2..7f8d3e4 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -198,7 +198,8 @@ obj-$(CONFIG_VGA) += vga.o obj-$(CONFIG_SOFTMMU) += device-hotplug.o obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o -# Inter-VM PCI shared memory +# Inter-VM PCI shared memory & VFIO PCI device assignment ifeq ($(CONFIG_PCI), y) obj-$(CONFIG_KVM) += ivshmem.o +obj-$(CONFIG_VFIO_PCI) += vfio_pci.o endif