From patchwork Tue May 14 11:18:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongjiu Geng X-Patchwork-Id: 10942719 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0C6614DB for ; Tue, 14 May 2019 11:22:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE4E5284D2 for ; Tue, 14 May 2019 11:22:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A27E2286A1; Tue, 14 May 2019 11:22:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5359E284D2 for ; Tue, 14 May 2019 11:22:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbfENLWF (ORCPT ); Tue, 14 May 2019 07:22:05 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:44092 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726363AbfENLWC (ORCPT ); Tue, 14 May 2019 07:22:02 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2FDC12560BFF5A8ED008; Tue, 14 May 2019 19:22:00 +0800 (CST) Received: from ros.huawei.com (10.143.28.118) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Tue, 14 May 2019 19:21:49 +0800 From: Dongjiu Geng To: , , , , , , , , , , , , , , , , , Subject: [PATCH v17 01/10] hw/arm/virt: Add RAS platform version for migration Date: Tue, 14 May 2019 04:18:14 -0700 Message-ID: <1557832703-42620-2-git-send-email-gengdongjiu@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557832703-42620-1-git-send-email-gengdongjiu@huawei.com> References: <1557832703-42620-1-git-send-email-gengdongjiu@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.143.28.118] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support this feature since version 4.1, disable it by default in the old version. Signed-off-by: Dongjiu Geng --- hw/arm/virt.c | 6 ++++++ include/hw/arm/virt.h | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 5331ab7..7bdd41b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2043,8 +2043,14 @@ DEFINE_VIRT_MACHINE_AS_LATEST(4, 1) static void virt_machine_4_0_options(MachineClass *mc) { + VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc)); + virt_machine_4_1_options(mc); compat_props_add(mc->compat_props, hw_compat_4_0, hw_compat_4_0_len); + /* Disable memory recovery feature for 4.0 as RAS support was + * introduced with 4.1. + */ + vmc->no_ras = true; } DEFINE_VIRT_MACHINE(4, 0) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 4240709..7f1a033 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -104,6 +104,7 @@ typedef struct { bool disallow_affinity_adjustment; bool no_its; bool no_pmu; + bool no_ras; bool claim_edge_triggered_timers; bool smbios_old_sys_ver; bool no_highmem_ecam;