From patchwork Wed Apr 29 08:48:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenfan X-Patchwork-Id: 465948 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 D45031402BD for ; Wed, 29 Apr 2015 18:55:43 +1000 (AEST) Received: from localhost ([::1]:37793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNmQ-0007fn-3f for incoming@patchwork.ozlabs.org; Wed, 29 Apr 2015 04:55:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNga-0003d2-7t for qemu-devel@nongnu.org; Wed, 29 Apr 2015 04:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnNgV-0002tt-KM for qemu-devel@nongnu.org; Wed, 29 Apr 2015 04:49:40 -0400 Received: from [59.151.112.132] (port=1065 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnNgV-0002jM-A7 for qemu-devel@nongnu.org; Wed, 29 Apr 2015 04:49:35 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="91413642" Received: from localhost (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 29 Apr 2015 16:45:42 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t3T8mIjY007371; Wed, 29 Apr 2015 16:48:19 +0800 Received: from G08FNSTD131468.g08.fujitsu.local (10.167.226.78) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 29 Apr 2015 16:49:38 +0800 From: Chen Fan To: Date: Wed, 29 Apr 2015 16:48:35 +0800 Message-ID: X-Mailer: git-send-email 1.9.3 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.167.226.78] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 59.151.112.132 Cc: izumi.taku@jp.fujitsu.com, alex.williamson@redhat.com Subject: [Qemu-devel] [PATCH RFC v6 07/11] pc: add HW_COMPAT_2_2 to disable aercap for vifo device 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 for piix4 chipset, we don't need to expose aer, so introduce HW_COMPAT_2_2 to disable aercap for all lower than 2.3. Signed-off-by: Chen Fan --- hw/i386/pc_q35.c | 4 ++++ include/hw/compat.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index dcc17c0..ffd27a5 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -428,6 +428,10 @@ static QEMUMachine pc_q35_machine_v2_2 = { PC_Q35_2_2_MACHINE_OPTIONS, .name = "pc-q35-2.2", .init = pc_q35_init_2_2, + .compat_props = (GlobalProperty[]) { + HW_COMPAT_2_2, + { /* end of list */ } + }, }; #define PC_Q35_2_1_MACHINE_OPTIONS \ diff --git a/include/hw/compat.h b/include/hw/compat.h index 313682a..5f90f0f 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -1,7 +1,15 @@ #ifndef HW_COMPAT_H #define HW_COMPAT_H +#define HW_COMPAT_2_2 \ + {\ + .driver = "vfio-pci",\ + .property = "x-aer",\ + .value = "off",\ + } + #define HW_COMPAT_2_1 \ + HW_COMPAT_2_2, \ {\ .driver = "intel-hda",\ .property = "old_msi_addr",\