From patchwork Fri Sep 19 11:54:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: frank.blaschka@de.ibm.com X-Patchwork-Id: 391223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1D895140186 for ; Fri, 19 Sep 2014 22:00:59 +1000 (EST) Received: from localhost ([::1]:57719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUwrx-0002GT-AL for incoming@patchwork.ozlabs.org; Fri, 19 Sep 2014 08:00:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUwr1-0001CH-Gn for qemu-devel@nongnu.org; Fri, 19 Sep 2014 08:00:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUwqs-0008UR-FX for qemu-devel@nongnu.org; Fri, 19 Sep 2014 07:59:59 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:60825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUwqs-0008Tz-5Y for qemu-devel@nongnu.org; Fri, 19 Sep 2014 07:59:50 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Sep 2014 12:59:43 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Sep 2014 12:59:41 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id EE38F17D8047 for ; Fri, 19 Sep 2014 13:01:45 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8JBxf5r34668734 for ; Fri, 19 Sep 2014 11:59:41 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8JBxe5J016175 for ; Fri, 19 Sep 2014 05:59:40 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s8JBxeQU016169; Fri, 19 Sep 2014 05:59:40 -0600 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 24631) id 58158122444C; Fri, 19 Sep 2014 13:59:40 +0200 (CEST) Message-Id: <20140919115940.253423024@de.ibm.com> User-Agent: quilt/0.61-1 Date: Fri, 19 Sep 2014 13:54:32 +0200 From: frank.blaschka@de.ibm.com To: qemu-devel@nongnu.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org References: <20140919115429.557279920@de.ibm.com> MIME-Version: 1.0 Content-Disposition: inline; filename=007-s390_vfio-3.16.patch X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14091911-2966-0000-0000-0000012FFD77 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.109 Cc: pbonzini@redhat.com, alex.williamson@redhat.com, agraf@suse.de Subject: [Qemu-devel] [RFC patch 3/6] vfio: make vfio build on s390 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 From: Frank Blaschka This patch adds some small changes to make vfio build on s390. Signed-off-by: Frank Blaschka --- drivers/vfio/Kconfig | 2 +- drivers/vfio/pci/vfio_pci_rdwr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig @@ -16,7 +16,7 @@ config VFIO_SPAPR_EEH menuconfig VFIO tristate "VFIO Non-Privileged userspace driver framework" depends on IOMMU_API - select VFIO_IOMMU_TYPE1 if X86 + select VFIO_IOMMU_TYPE1 if (X86 || S390) select VFIO_IOMMU_SPAPR_TCE if (PPC_POWERNV || PPC_PSERIES) select VFIO_SPAPR_EEH if (PPC_POWERNV || PPC_PSERIES) select ANON_INODES --- a/drivers/vfio/pci/vfio_pci_rdwr.c +++ b/drivers/vfio/pci/vfio_pci_rdwr.c @@ -177,6 +177,13 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_ return done; } +#ifdef CONFIG_NO_IOPORT_MAP +ssize_t vfio_pci_vga_rw(struct vfio_pci_device *vdev, char __user *buf, + size_t count, loff_t *ppos, bool iswrite) +{ + return -EINVAL; +} +#else ssize_t vfio_pci_vga_rw(struct vfio_pci_device *vdev, char __user *buf, size_t count, loff_t *ppos, bool iswrite) { @@ -236,3 +243,4 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_ return done; } +#endif