aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjiu Geng <gengdongjiu@huawei.com>2019-10-15 22:01:36 +0800
committerPeter Maydell <peter.maydell@linaro.org>2019-10-15 15:40:43 +0100
commit3f71f76326c32c1b43e8fcf020824aa842134b7f (patch)
tree0655baf7dba5bf1d8fc64029730a3d66c5e49883
parent9020e9526cd08c4dc99d54dba48730de2908c970 (diff)
downloadqemu-arm-3f71f76326c32c1b43e8fcf020824aa842134b7f.tar.gz
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. Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com> Message-id: 20191015140140.34748-2-zhengxiang9@huawei.com
-rw-r--r--hw/arm/virt.c23
-rw-r--r--include/hw/arm/virt.h1
2 files changed, 24 insertions, 0 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d74538b021..130ea7a13b 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1783,6 +1783,20 @@ static void virt_set_its(Object *obj, bool value, Error **errp)
vms->its = value;
}
+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);
@@ -2026,6 +2040,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 "
+ "RAS instantiation",
+ NULL);
+
vms->irqmap = a15irqmap;
virt_flash_create(vms);
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index a72094204e..21ca4e01dd 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -119,6 +119,7 @@ typedef struct {
bool highmem_ecam;
bool its;
bool virt;
+ bool ras;
int32_t gic_version;
VirtIOMMUType iommu;
struct arm_boot_info bootinfo;