From patchwork Wed Aug 1 05:18:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 174388 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 266A62C00AF for ; Wed, 1 Aug 2012 15:18:40 +1000 (EST) Received: from localhost ([::1]:54732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwRKQ-00029b-6U for incoming@patchwork.ozlabs.org; Wed, 01 Aug 2012 01:18:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwRKE-00023u-Kd for qemu-devel@nongnu.org; Wed, 01 Aug 2012 01:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwRKC-0003p7-9E for qemu-devel@nongnu.org; Wed, 01 Aug 2012 01:18:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwRKC-0003or-0y for qemu-devel@nongnu.org; Wed, 01 Aug 2012 01:18:24 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q715INie009240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Aug 2012 01:18:23 -0400 Received: from bling.home (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q715IMYL028787; Wed, 1 Aug 2012 01:18:23 -0400 From: Alex Williamson To: aliguori@us.ibm.com Date: Tue, 31 Jul 2012 23:18:22 -0600 Message-ID: <20120801051821.22163.64385.stgit@bling.home> In-Reply-To: <20120801050241.22163.78549.stgit@bling.home> References: <20120801050241.22163.78549.stgit@bling.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 3/3] 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 Signed-off-by: Alex Williamson --- MAINTAINERS | 5 +++++ configure | 12 ++++++++++++ hw/i386/Makefile.objs | 1 + 3 files changed, 18 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2d219d2..9680d69 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6 +460,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 c65b5f6..81108dc 100755 --- a/configure +++ b/configure @@ -143,6 +143,7 @@ attr="" libattr="" xfs="" +vfio_pci="no" vhost_net="no" kvm="no" gprof="no" @@ -489,6 +490,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 @@ -824,6 +826,10 @@ for opt do ;; --disable-guest-agent) guest_agent="no" ;; + --disable-vfio-pci) vfio_pci="no" + ;; + --enable-vfio-pci) vfio_pci="yes" + ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;; esac @@ -1112,6 +1118,8 @@ echo " --disable-guest-agent disable building of the QEMU Guest Agent" echo " --enable-guest-agent enable building of the QEMU Guest Agent" echo " --with-coroutine=BACKEND coroutine backend. Supported options:" echo " gthread, ucontext, sigaltstack, windows" +echo " --disable-vfio-pci disable vfio pci device assignement support" +echo " --enable-vfio-pci enable vfio pci device assignment support" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -3072,6 +3080,7 @@ echo "OpenGL support $opengl" echo "libiscsi support $libiscsi" echo "build guest agent $guest_agent" 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" @@ -3754,6 +3763,9 @@ case "$target_arch2" in *) echo "CONFIG_NO_XEN=y" >> $config_target_mak esac +if test "$vfio_pci" = "yes" -a "$target_softmmu" = "yes" ; then + echo "CONFIG_VFIO_PCI=y" >> $config_target_mak +fi case "$target_arch2" in i386|x86_64|ppcemb|ppc|ppc64|s390x) # Make sure the target and host cpus are compatible diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 8c764bb..a2783ef 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -11,5 +11,6 @@ obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_msi.o obj-y += kvm/ obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o +obj-$(CONFIG_VFIO_PCI) += vfio_pci.o obj-y := $(addprefix ../,$(obj-y))