aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorDongjiu Geng <gengdongjiu@huawei.com>2020-05-12 11:06:01 +0800
committerPeter Maydell <peter.maydell@linaro.org>2020-05-14 15:03:09 +0100
commit2afa8c85192595e2b6a61e2045df7bea66bdea08 (patch)
tree7f6f4401d5a3b5e75e8f4789163e3061b093c8e5 /hw/arm
parent1439f213074a8ebc30e6713ce1bf766407ddce46 (diff)
downloadqemu-2afa8c85192595e2b6a61e2045df7bea66bdea08.zip
qemu-2afa8c85192595e2b6a61e2045df7bea66bdea08.tar.gz
qemu-2afa8c85192595e2b6a61e2045df7bea66bdea08.tar.bz2
hw/arm/virt: Introduce a RAS machine option
RAS Virtualization feature is not supported now, so add a RAS machine option and disable it by default. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20200512030609.19593-3-gengdongjiu@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/virt.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 634db0c..9e76fa7 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);