[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/45] hw/arm/virt: Introduce a RAS machine option
From: |
Peter Maydell |
Subject: |
[PULL 20/45] hw/arm/virt: Introduce a RAS machine option |
Date: |
Thu, 14 May 2020 15:21:13 +0100 |
From: Dongjiu Geng <address@hidden>
RAS Virtualization feature is not supported now, so
add a RAS machine option and disable it by default.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Dongjiu Geng <address@hidden>
Signed-off-by: Xiang Zheng <address@hidden>
Reviewed-by: Jonathan Cameron <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
include/hw/arm/virt.h | 1 +
hw/arm/virt.c | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 6d67ace76e1..31878ddc722 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -132,6 +132,7 @@ typedef struct {
bool highmem_ecam;
bool its;
bool virt;
+ bool ras;
OnOffAuto acpi;
VirtGICType gic_version;
VirtIOMMUType iommu;
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 634db0cfe97..9e76fa7b01b 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1995,6 +1995,20 @@ static void virt_set_acpi(Object *obj, Visitor *v, const
char *name,
visit_type_OnOffAuto(v, name, &vms->acpi, errp);
}
+static bool virt_get_ras(Object *obj, Error **errp)
+{
+ VirtMachineState *vms = VIRT_MACHINE(obj);
+
+ return vms->ras;
+}
+
+static void virt_set_ras(Object *obj, bool value, Error **errp)
+{
+ VirtMachineState *vms = VIRT_MACHINE(obj);
+
+ vms->ras = value;
+}
+
static char *virt_get_gic_version(Object *obj, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2327,6 +2341,15 @@ static void virt_instance_init(Object *obj)
"Valid values are none and smmuv3",
NULL);
+ /* Default disallows RAS instantiation */
+ vms->ras = 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 reporting
host memory errors "
+ "to a KVM guest using ACPI and guest
external abort exceptions",
+ NULL);
+
vms->irqmap = a15irqmap;
virt_flash_create(vms);
--
2.20.1
- [PULL 08/45] target/arm: Create gen_gvec_{mla,mls}, (continued)
- [PULL 08/45] target/arm: Create gen_gvec_{mla,mls}, Peter Maydell, 2020/05/14
- [PULL 09/45] target/arm: Swap argument order for VSHL during decode, Peter Maydell, 2020/05/14
- [PULL 10/45] target/arm: Create gen_gvec_{cmtst,ushl,sshl}, Peter Maydell, 2020/05/14
- [PULL 11/45] target/arm: Create gen_gvec_{uqadd, sqadd, uqsub, sqsub}, Peter Maydell, 2020/05/14
- [PULL 12/45] target/arm: Remove fp_status from helper_{recpe, rsqrte}_u32, Peter Maydell, 2020/05/14
- [PULL 13/45] target/arm: Create gen_gvec_{qrdmla,qrdmls}, Peter Maydell, 2020/05/14
- [PULL 15/45] target/arm: Clear tail in gvec_fmul_idx_*, gvec_fmla_idx_*, Peter Maydell, 2020/05/14
- [PULL 14/45] target/arm: Pass pointer to qc to qrdmla/qrdmls, Peter Maydell, 2020/05/14
- [PULL 16/45] target/arm: Vectorize SABD/UABD, Peter Maydell, 2020/05/14
- [PULL 18/45] aspeed: Add support for the sonorapass-bmc board, Peter Maydell, 2020/05/14
- [PULL 20/45] hw/arm/virt: Introduce a RAS machine option,
Peter Maydell <=
- [PULL 21/45] docs: APEI GHES generation and CPER record description, Peter Maydell, 2020/05/14
- [PULL 24/45] ACPI: Record the Generic Error Status Block address, Peter Maydell, 2020/05/14
- [PULL 17/45] target/arm: Vectorize SABA/UABA, Peter Maydell, 2020/05/14
- [PULL 25/45] KVM: Move hwpoison page related functions into kvm-all.c, Peter Maydell, 2020/05/14
- [PULL 30/45] target/arm: Convert Neon 3-reg-same SHA to decodetree, Peter Maydell, 2020/05/14
- [PULL 23/45] ACPI: Build Hardware Error Source Table, Peter Maydell, 2020/05/14
- [PULL 27/45] target-arm: kvm64: handle SIGBUS signal from kernel or KVM, Peter Maydell, 2020/05/14
- [PULL 19/45] acpi: nvdimm: change NVDIMM_UUID_LE to a common macro, Peter Maydell, 2020/05/14
- [PULL 22/45] ACPI: Build related register address fields via hardware error fw_cfg blob, Peter Maydell, 2020/05/14