From patchwork Sun Nov 30 18:35:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 41741 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4730824001 for ; Sun, 30 Nov 2014 18:36:13 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf5796174lbj.3 for ; Sun, 30 Nov 2014 10:36:12 -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=R5MUIizLah2Zp8ckKARj1adqLJgh7Cszc43pWDubdrE=; b=hdjTczJscljZ18Wo6p2ywi3BmrcX2M2Fej0lrECRCEwopbW8K2Gn0XCUBjaRJ7zcse Q4YdYT3HAX26ziE9f0HCs2TMSUkSxVPLNXRboChIdzrZ2zdltXHjiKvuZnlHxmHawQyv rRemUkp+MoAC4j2wICCsr22qmfV+8Q31GW9xYTdcvOTzU6zm0kA8l6AhvPstdo/iItoL 54RUCX9R7Dp/yCcI9RY5ZuWgS7oQbeBJglRKzPEWOVQeTHbGBGp2nxo/GedY9PAacT5P 8kaOeqLOWxjbZdZegqebSqpwxTAPHiaJETbGqZGhWJCCq1L7IRj3hFH2vlUyd8G1sRWi aRYQ== X-Gm-Message-State: ALoCoQlQ0PtrMnkSRnvEf8fwzyDtfpTcRTDPd3vW5un7tH+AhOH8FygvEIgIP8c+JpcmOYPruSMe X-Received: by 10.181.27.135 with SMTP id jg7mr12643546wid.5.1417372572266; Sun, 30 Nov 2014 10:36:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.168 with SMTP id u8ls980642lag.103.gmail; Sun, 30 Nov 2014 10:36:12 -0800 (PST) X-Received: by 10.112.157.194 with SMTP id wo2mr53069397lbb.55.1417372572114; Sun, 30 Nov 2014 10:36:12 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id y9si15615160lbw.115.2014.11.30.10.36.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:36:12 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id ge10so7739039lab.3 for ; Sun, 30 Nov 2014 10:36:12 -0800 (PST) X-Received: by 10.152.21.66 with SMTP id t2mr1902224lae.27.1417372572043; Sun, 30 Nov 2014 10:36:12 -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.184.201 with SMTP id ew9csp172744lbc; Sun, 30 Nov 2014 10:36:11 -0800 (PST) X-Received: by 10.180.95.227 with SMTP id dn3mr19687404wib.13.1417372571356; Sun, 30 Nov 2014 10:36:11 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com. [209.85.212.173]) by mx.google.com with ESMTPS id pe9si26817749wjb.29.2014.11.30.10.36.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:36:11 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.173 as permitted sender) client-ip=209.85.212.173; Received: by mail-wi0-f173.google.com with SMTP id r20so22579968wiv.0 for ; Sun, 30 Nov 2014 10:36:11 -0800 (PST) X-Received: by 10.180.99.105 with SMTP id ep9mr78137270wib.26.1417372571140; Sun, 30 Nov 2014 10:36:11 -0800 (PST) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id z7sm38794058wia.22.2014.11.30.10.36.09 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:36:10 -0800 (PST) From: Eric Auger To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, kim.phillips@freescale.com, a.rigo@virtualopensystems.com, manish.jaggi@caviumnetworks.com, joel.schopp@amd.com, zhaoshenglong@huawei.com, ard.biesheuvel@linaro.org Cc: eric.auger@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, alex.williamson@redhat.com, peter.maydell@linaro.org, will.deacon@arm.com, Bharat.Bhushan@freescale.com, stuart.yoder@freescale.com, a.motakis@virtualopensystems.com Subject: [PATCH v8 18/19] hw/vfio/common: vfio_kvm_device_fd moved in the common header Date: Sun, 30 Nov 2014 18:35:23 +0000 Message-Id: <1417372524-12936-19-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1417372524-12936-1-git-send-email-eric.auger@linaro.org> References: <1417372524-12936-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.44 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 554467f..ba00ec9 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 b5af090..58fd786 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,