From nobody Tue Feb 10 23:54:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1572870201; cv=none; d=zoho.com; s=zohoarc; b=YkWtAGi6CwyRCqfmcejoS6cEGLIjR0CsSJmyKZw0ijXC8Wv6o/reKhG3WO3fgbqja6i0HdFlB5vBlPUtk69ki4A1JQGbXPFeRNDD2QGh7lxXR6rVHTjlEL74eqfNkBnrlAHhxo+NwvEHdFzaXsamFSMNeZuce1DZsngN/sKLRSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572870201; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IbvMJLUbvwvGiIbDxq+d/EcgnnusId+H/M+XpHkZyt0=; b=a+09CpwjMifOcdgAl4/3/5dSFCrh3rr9WFYVNQo1tynSrjJsOa6FaBZRZCtRCTW8ts3BXG4aNIBHdUTr57xrej7KcSzPpWXCvLNYRiBby13is+L02TBvwQLpHRVDyHUnVZQ8j6f01av+CVDK51wDgmIez7UgVPmYQ4QbOrALsDw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572870201626514.7585686537469; Mon, 4 Nov 2019 04:23:21 -0800 (PST) Received: from localhost ([::1]:60136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRbOB-0005pc-Nz for importer@patchew.org; Mon, 04 Nov 2019 07:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40249) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRbHq-00078A-AA for qemu-devel@nongnu.org; Mon, 04 Nov 2019 07:16:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRbHl-0004yT-De for qemu-devel@nongnu.org; Mon, 04 Nov 2019 07:16:46 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2185 helo=huawei.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRbHi-0004qu-H0; Mon, 04 Nov 2019 07:16:38 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 908ACFC3B13359B9CC1A; Mon, 4 Nov 2019 20:16:30 +0800 (CST) Received: from HGHY4Z004218071.china.huawei.com (10.133.224.57) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Mon, 4 Nov 2019 20:16:21 +0800 From: Xiang Zheng To: , , , , , , , , , , , , , , , , Subject: [PATCH v21 1/6] hw/arm/virt: Introduce a RAS machine option Date: Mon, 4 Nov 2019 20:14:53 +0800 Message-ID: <20191104121458.29208-2-zhengxiang9@huawei.com> X-Mailer: git-send-email 2.15.1.windows.2 In-Reply-To: <20191104121458.29208-1-zhengxiang9@huawei.com> References: <20191104121458.29208-1-zhengxiang9@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.224.57] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 45.249.212.190 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wanghaibin.wang@huawei.com, zhengxiang9@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Dongjiu Geng RAS Virtualization feature is not supported now, so add a RAS machine option and disable it by default. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- hw/arm/virt.c | 23 +++++++++++++++++++++++ include/hw/arm/virt.h | 1 + 2 files changed, 24 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d4bedc2607..ea0fbf82be 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1819,6 +1819,20 @@ static void virt_set_its(Object *obj, bool value, Er= ror **errp) vms->its =3D value; } =20 +static bool virt_get_ras(Object *obj, Error **errp) +{ + VirtMachineState *vms =3D VIRT_MACHINE(obj); + + return vms->ras; +} + +static void virt_set_ras(Object *obj, bool value, Error **errp) +{ + VirtMachineState *vms =3D VIRT_MACHINE(obj); + + vms->ras =3D value; +} + static char *virt_get_gic_version(Object *obj, Error **errp) { VirtMachineState *vms =3D VIRT_MACHINE(obj); @@ -2122,6 +2136,15 @@ static void virt_instance_init(Object *obj) "Valid values are none and smmuv3", NULL); =20 + /* Default disallows RAS instantiation */ + vms->ras =3D false; + object_property_add_bool(obj, "ras", virt_get_ras, + virt_set_ras, NULL); + object_property_set_description(obj, "ras", + "Set on/off to enable/disable " + "RAS instantiation", + NULL); + vms->irqmap =3D a15irqmap; =20 virt_flash_create(vms); diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 0b41083e9d..989785f2f7 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -122,6 +122,7 @@ typedef struct { bool highmem_ecam; bool its; bool virt; + bool ras; int32_t gic_version; VirtIOMMUType iommu; struct arm_boot_info bootinfo; --=20 2.19.1