From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 3/3] vfio: Enable vfio-pci and mark supported Date: Mon, 13 Aug 2012 17:19:34 -0500 Message-ID: <87sjbq8mfd.fsf@codemonkey.ws> References: <20120801050241.22163.78549.stgit@bling.home> <20120801051821.22163.64385.stgit@bling.home> <5018D78A.4040704@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, kvm@vger.kernel.org To: Jan Kiszka , Alex Williamson Return-path: In-Reply-To: <5018D78A.4040704@web.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Jan Kiszka writes: > On 2012-08-01 07:18, Alex Williamson wrote: >> 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" >> + ;; > > Do we need this level of control? Open question I'm just wondering every > time a new feature gets added together with --disable/--enable > switches. I don't think so--it's easy enough for an administrator to disable vfio for a user. Regards, Anthony Liguori > >> *) 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 > > Does this already somehow depend on host == Linux? If not, you may break > the others. > >> 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)) >> > > Jan From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T12z9-0004J1-5S for qemu-devel@nongnu.org; Mon, 13 Aug 2012 18:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T12z7-0005oJ-VP for qemu-devel@nongnu.org; Mon, 13 Aug 2012 18:19:43 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:42594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T12z7-0005oF-QV for qemu-devel@nongnu.org; Mon, 13 Aug 2012 18:19:41 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Aug 2012 18:19:41 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id AE64638C8039 for ; Mon, 13 Aug 2012 18:19:39 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7DMJd3x178744 for ; Mon, 13 Aug 2012 18:19:39 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7DMJcFd010417 for ; Mon, 13 Aug 2012 16:19:39 -0600 From: Anthony Liguori In-Reply-To: <5018D78A.4040704@web.de> References: <20120801050241.22163.78549.stgit@bling.home> <20120801051821.22163.64385.stgit@bling.home> <5018D78A.4040704@web.de> Date: Mon, 13 Aug 2012 17:19:34 -0500 Message-ID: <87sjbq8mfd.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 3/3] vfio: Enable vfio-pci and mark supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka , Alex Williamson Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, kvm@vger.kernel.org Jan Kiszka writes: > On 2012-08-01 07:18, Alex Williamson wrote: >> 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" >> + ;; > > Do we need this level of control? Open question I'm just wondering every > time a new feature gets added together with --disable/--enable > switches. I don't think so--it's easy enough for an administrator to disable vfio for a user. Regards, Anthony Liguori > >> *) 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 > > Does this already somehow depend on host == Linux? If not, you may break > the others. > >> 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)) >> > > Jan