[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v27 02/10] hw/arm/virt: Introduce a RAS machine option
From: |
Dongjiu Geng |
Subject: |
[PATCH v27 02/10] hw/arm/virt: Introduce a RAS machine option |
Date: |
Tue, 12 May 2020 11:06:01 +0800 |
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>
---
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 171e690..2d46c3f 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);
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 6d67ace..31878dd 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;
--
1.8.3.1
- [PATCH v27 00/10] Add ARMv8 RAS virtualization support in QEMU, Dongjiu Geng, 2020/05/11
- [PATCH v27 02/10] hw/arm/virt: Introduce a RAS machine option,
Dongjiu Geng <=
- [PATCH v27 01/10] acpi: nvdimm: change NVDIMM_UUID_LE to a common macro, Dongjiu Geng, 2020/05/11
- [PATCH v27 04/10] ACPI: Build related register address fields via hardware error fw_cfg blob, Dongjiu Geng, 2020/05/11
- [PATCH v27 03/10] docs: APEI GHES generation and CPER record description, Dongjiu Geng, 2020/05/11
- [PATCH v27 07/10] KVM: Move hwpoison page related functions into kvm-all.c, Dongjiu Geng, 2020/05/11
- [PATCH v27 06/10] ACPI: Record the Generic Error Status Block address, Dongjiu Geng, 2020/05/11
- [PATCH v27 08/10] ACPI: Record Generic Error Status Block(GESB) table, Dongjiu Geng, 2020/05/11
- [PATCH v27 09/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM, Dongjiu Geng, 2020/05/11
- [PATCH v27 10/10] MAINTAINERS: Add ACPI/HEST/GHES entries, Dongjiu Geng, 2020/05/11
- [PATCH v27 05/10] ACPI: Build Hardware Error Source Table, Dongjiu Geng, 2020/05/11