From patchwork Fri Feb 13 04:00:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 44654 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3A8221527 for ; Fri, 13 Feb 2015 04:00:40 +0000 (UTC) Received: by lamq1 with SMTP id q1sf9052290lam.0 for ; Thu, 12 Feb 2015 20:00:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=PuyTJDMx9QDY4rZ7rhhAs8ofaLf71Mjk4BT8HAW/Q0s=; b=PU11Rt0IKB7W7X6vA/Pj3iKrfPx6xqvYeuaKBThDfiUdxKednanCjGDE5idF7GJKOJ n99luq7RtFLBXpJd6A+5ga2dObxrRTA2+LQQzmVzZrUOduJX+KXYfzYp4KDZLfQcr6X/ sceNUdKlfpTAPGIt50XpsSJOXJyAdXb2r5Xzwy9QlstdZ6Pf8B/Gu5leKmB/ybBuJ6P2 hrORkzdi65rLzUCF4FprqLvwvLfmkTHtGSl2K6Z4pBxtZivG2EjNBSjO61hU/eoPXJXM IWsAdNNZn6/i+D2GSXWkyJUPpvTv1cyFw3zKenytQumLUW9RL5ea4FEJLB0pltWfzr60 EAgg== X-Gm-Message-State: ALoCoQlYIbUkARy122X6El+EtoDqO/ZemdFRV/A0OY2ZW1bs9+UaMxBZ4qZ1WCTnTcWqdto0kQXy X-Received: by 10.112.126.168 with SMTP id mz8mr1014683lbb.19.1423800039681; Thu, 12 Feb 2015 20:00:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.3 with SMTP id m3ls230348laj.57.gmail; Thu, 12 Feb 2015 20:00:39 -0800 (PST) X-Received: by 10.112.142.134 with SMTP id rw6mr6183059lbb.100.1423800039358; Thu, 12 Feb 2015 20:00:39 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id eq1si662882lac.11.2015.02.12.20.00.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 20:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labgq15 with SMTP id gq15so14063947lab.3 for ; Thu, 12 Feb 2015 20:00:39 -0800 (PST) X-Received: by 10.152.88.4 with SMTP id bc4mr6151678lab.86.1423800039287; Thu, 12 Feb 2015 20:00:39 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.35.133 with SMTP id h5csp828785lbj; Thu, 12 Feb 2015 20:00:38 -0800 (PST) X-Received: by 10.180.105.10 with SMTP id gi10mr12592542wib.24.1423800032266; Thu, 12 Feb 2015 20:00:32 -0800 (PST) Received: from mail-we0-f171.google.com (mail-we0-f171.google.com. [74.125.82.171]) by mx.google.com with ESMTPS id r1si1676775wib.50.2015.02.12.20.00.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 20:00:32 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.171 as permitted sender) client-ip=74.125.82.171; Received: by mail-we0-f171.google.com with SMTP id p10so14191712wes.2 for ; Thu, 12 Feb 2015 20:00:32 -0800 (PST) X-Received: by 10.180.75.19 with SMTP id y19mr1392238wiv.4.1423800031965; Thu, 12 Feb 2015 20:00:31 -0800 (PST) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id a13sm8231982wjx.30.2015.02.12.20.00.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 20:00:30 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, peter.maydell@linaro.org, agraf@suse.de, b.reynal@virtualopensystems.com, feng.wu@intel.com Cc: kvmarm@lists.cs.columbia.edu, patches@linaro.org, pbonzini@redhat.com, afaerber@suse.de, kim.phillips@freescale.com, Bharat.Bhushan@freescale.com, a.rigo@virtualopensystems.com, a.motakis@virtualopensystems.com Subject: [RFC 2/3] hw/vfio/common: vfio_kvm_device_fd moved in the common header Date: Fri, 13 Feb 2015 04:00:19 +0000 Message-Id: <1423800020-10940-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1423800020-10940-1-git-send-email-eric.auger@linaro.org> References: <1423800020-10940-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , the device is now used in platform for forwarded IRQ setup Signed-off-by: Eric Auger --- hw/vfio/common.c | 3 ++- include/hw/vfio/vfio-common.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c5d1551..be72ad6 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -44,9 +44,10 @@ struct vfio_as_head vfio_address_spaces = * initialized, this file descriptor is only released on QEMU exit and * we'll re-use it should another vfio device be attached before then. */ -static int vfio_kvm_device_fd = -1; +int vfio_kvm_device_fd = -1; #endif + /* * Common VFIO interrupt disable */ diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 2d1d8b3..8816731 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -41,6 +41,11 @@ #define VFIO_ALLOW_KVM_MSI 1 #define VFIO_ALLOW_KVM_MSIX 1 +#ifdef CONFIG_KVM +extern int vfio_kvm_device_fd; +#endif + + enum { VFIO_DEVICE_TYPE_PCI = 0, VFIO_DEVICE_TYPE_PLATFORM = 1,