From patchwork Tue Jan 5 01:20:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 562928 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 DA9B41402C0 for ; Tue, 5 Jan 2016 12:22:45 +1100 (AEDT) Received: from localhost ([::1]:47675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGGKh-0004Hn-Oq for incoming@patchwork.ozlabs.org; Mon, 04 Jan 2016 20:22:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGGGr-0004nH-GH for qemu-devel@nongnu.org; Mon, 04 Jan 2016 20:18:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGGGq-0003uu-Dn for qemu-devel@nongnu.org; Mon, 04 Jan 2016 20:18:45 -0500 Received: from [59.151.112.132] (port=41549 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGGGq-0003qw-2H for qemu-devel@nongnu.org; Mon, 04 Jan 2016 20:18:44 -0500 X-IronPort-AV: E=Sophos;i="5.20,346,1444665600"; d="scan'208";a="2210897" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 05 Jan 2016 09:18:32 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 0D45E41890F0; Tue, 5 Jan 2016 09:18:17 +0800 (CST) Received: from G08FNSTD140223.g08.fujitsu.local (10.167.226.69) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Tue, 5 Jan 2016 09:18:17 +0800 From: Cao jin To: Date: Tue, 5 Jan 2016 09:20:56 +0800 Message-ID: <75a725131c88b860ffc48435453c2a5d58f6a973.1451901804.git.chen.fan.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.167.226.69] X-yoursite-MailScanner-ID: 0D45E41890F0.AB430 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Cc: chen.fan.fnst@cn.fujitsu.com, alex.williamson@redhat.com, mst@redhat.com Subject: [Qemu-devel] [v15 15/15] vfio: add 'aer' property to expose aercap 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: Chen Fan add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bc81132..e800cf8 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3124,6 +3124,8 @@ static Property vfio_pci_dev_properties[] = { sub_vendor_id, PCI_ANY_ID), DEFINE_PROP_UINT32("x-pci-sub-device-id", VFIOPCIDevice, sub_device_id, PCI_ANY_ID), + DEFINE_PROP_BIT("aer", VFIOPCIDevice, features, + VFIO_FEATURE_ENABLE_AER_BIT, false), /* * TODO - support passed fds... is this necessary? * DEFINE_PROP_STRING("vfiofd", VFIOPCIDevice, vfiofd_name),