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: Eric Auger X-Patchwork-Id: 416244 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 141FF140129 for ; Mon, 1 Dec 2014 05:45:27 +1100 (AEDT) Received: from localhost ([::1]:51370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv9Ur-00033p-9R for incoming@patchwork.ozlabs.org; Sun, 30 Nov 2014 13:45:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv9M1-00067R-VJ for qemu-devel@nongnu.org; Sun, 30 Nov 2014 13:36:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xv9Lv-0002G7-QM for qemu-devel@nongnu.org; Sun, 30 Nov 2014 13:36:17 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:41125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv9Lv-0002FZ-LQ for qemu-devel@nongnu.org; Sun, 30 Nov 2014 13:36:11 -0500 Received: by mail-wi0-f172.google.com with SMTP id n3so22559962wiv.5 for ; Sun, 30 Nov 2014 10:36:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R5MUIizLah2Zp8ckKARj1adqLJgh7Cszc43pWDubdrE=; b=K6uz5S3/AcayhkJpjyREHuC6PdUgOR3ze8rsRV0HrsNnomvenElOCfG8PqxtzEG6c1 nhwLfXo/PLtww5CCWS0P8oYGD5Q0gjxdIZzPZKAzAzxEJjXVjt+lFTg/L4RKAJv1k5yK vc7i9ArOcj6F8ab/7ZRB2JZBwIVOwsZYTCXlnPVVnGRG9P2rIuWg5JZelZAjgP+40vSa qv+5u1eIGvZLhmTmNetq/vecGW76ZJs8CQuk0sqmsEwusuieisa0F3L9Lcr5s2E96Drz ZhACmAE/bYkXdkm+c5DvbWN1ImvdAVIOlIidRiywE1m8oluKniyjRtv77FGQpvYDT68q 2ljA== X-Gm-Message-State: ALoCoQkRglUBHKA7gZUMTFLYQhdwBWJw3Cs1RcX2Rpo6hnmO0tkBfmZbOoVculqnUPEi9fIWx9x+ 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 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.172 Cc: peter.maydell@linaro.org, patches@linaro.org, eric.auger@linaro.org, will.deacon@arm.com, stuart.yoder@freescale.com, Bharat.Bhushan@freescale.com, alex.williamson@redhat.com, a.motakis@virtualopensystems.com, kvmarm@lists.cs.columbia.edu Subject: [Qemu-devel] [PATCH v8 18/19] hw/vfio/common: vfio_kvm_device_fd moved in the common header 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 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,