Message ID | 20200217131248.28273-3-gengdongjiu@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add ARMv8 RAS virtualization support in QEMU | expand |
On Mon, 17 Feb 2020 21:12:40 +0800 Dongjiu Geng <gengdongjiu@huawei.com> wrote: > RAS Virtualization feature is not supported now, so add a RAS machine > option and disable it by default. ^^^^ this doesn't match the patch. I'd rephrase it as: ... feature is disabled by default .. add an option so user could enable it with -machine virt,ras=on > 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> > --- > 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 f788fe2..9555b8b 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -1823,6 +1823,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); > @@ -2126,6 +2140,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 71508bf..c32b7c7 100644 > --- a/include/hw/arm/virt.h > +++ b/include/hw/arm/virt.h > @@ -123,6 +123,7 @@ typedef struct { > bool highmem_ecam; > bool its; > bool virt; > + bool ras; > int32_t gic_version; > VirtIOMMUType iommu; > struct arm_boot_info bootinfo;
On Tue, 25 Feb 2020 at 08:34, Igor Mammedov <imammedo@redhat.com> wrote: > > On Mon, 17 Feb 2020 21:12:40 +0800 > Dongjiu Geng <gengdongjiu@huawei.com> wrote: > > > RAS Virtualization feature is not supported now, so add a RAS machine > > > option and disable it by default. > ^^^^ > > this doesn't match the patch. Hmm? It seems right to me -- the patch adds a machine option and makes it disabled-by-default, doesn't it? thanks -- PMM
On Tue, 25 Feb 2020 08:54:07 +0000 Peter Maydell <peter.maydell@linaro.org> wrote: > On Tue, 25 Feb 2020 at 08:34, Igor Mammedov <imammedo@redhat.com> wrote: > > > > On Mon, 17 Feb 2020 21:12:40 +0800 > > Dongjiu Geng <gengdongjiu@huawei.com> wrote: > > > > > RAS Virtualization feature is not supported now, so add a RAS machine > > > > > option and disable it by default. > > ^^^^ > > > > this doesn't match the patch. > > Hmm? It seems right to me -- the patch adds a machine option > and makes it disabled-by-default, doesn't it? Right, I misread 'and' as 'to' somehow. My apologies > > thanks > -- PMM >
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index f788fe2..9555b8b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1823,6 +1823,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); @@ -2126,6 +2140,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 71508bf..c32b7c7 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -123,6 +123,7 @@ typedef struct { bool highmem_ecam; bool its; bool virt; + bool ras; int32_t gic_version; VirtIOMMUType iommu; struct arm_boot_info bootinfo;