qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option
@ 2020-02-25 12:51 gengdongjiu
  0 siblings, 0 replies; 5+ messages in thread
From: gengdongjiu @ 2020-02-25 12:51 UTC (permalink / raw)
  To: Igor Mammedov, Peter Maydell
  Cc: Fam Zheng, Xiao Guangrong, kvm-devel, Michael S. Tsirkin,
	Marcelo Tosatti, QEMU Developers, Eduardo Habkost, Shannon Zhao,
	zhengxiang (A),
	qemu-arm, James Morse, Shameerali Kolothum Thodi,
	Jonathan Cameron, Paolo Bonzini, Laszlo Ersek, Richard Henderson

> 
> 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 Peter and Igor's clarification.

> 
> >
> > thanks
> > -- PMM
> >



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option
  2020-02-25  8:54     ` Peter Maydell
@ 2020-02-25 10:53       ` Igor Mammedov
  0 siblings, 0 replies; 5+ messages in thread
From: Igor Mammedov @ 2020-02-25 10:53 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Fam Zheng, Xiao Guangrong, kvm-devel, Michael S. Tsirkin,
	Marcelo Tosatti, QEMU Developers, Eduardo Habkost, Dongjiu Geng,
	Shannon Zhao, Zheng Xiang, qemu-arm, James Morse,
	Shameerali Kolothum Thodi, Jonathan Cameron, Paolo Bonzini,
	Laszlo Ersek, Richard Henderson

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
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option
  2020-02-25  8:34   ` Igor Mammedov
@ 2020-02-25  8:54     ` Peter Maydell
  2020-02-25 10:53       ` Igor Mammedov
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2020-02-25  8:54 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Fam Zheng, Xiao Guangrong, kvm-devel, Michael S. Tsirkin,
	Marcelo Tosatti, QEMU Developers, Eduardo Habkost, Dongjiu Geng,
	Shannon Zhao, Zheng Xiang, qemu-arm, James Morse,
	Shameerali Kolothum Thodi, Jonathan Cameron, Paolo Bonzini,
	Laszlo Ersek, Richard Henderson

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option
  2020-02-17 13:12 ` [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option Dongjiu Geng
@ 2020-02-25  8:34   ` Igor Mammedov
  2020-02-25  8:54     ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Mammedov @ 2020-02-25  8:34 UTC (permalink / raw)
  To: Dongjiu Geng
  Cc: fam, peter.maydell, xiaoguangrong.eric, kvm, mst, mtosatti,
	qemu-devel, ehabkost, shannon.zhaosl, zhengxiang9, qemu-arm,
	james.morse, shameerali.kolothum.thodi, jonathan.cameron,
	pbonzini, lersek, rth

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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option
  2020-02-17 13:12 [PATCH v24 00/10] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng
@ 2020-02-17 13:12 ` Dongjiu Geng
  2020-02-25  8:34   ` Igor Mammedov
  0 siblings, 1 reply; 5+ messages in thread
From: Dongjiu Geng @ 2020-02-17 13:12 UTC (permalink / raw)
  To: mst, imammedo, xiaoguangrong.eric, shannon.zhaosl, peter.maydell,
	fam, rth, ehabkost, mtosatti, qemu-devel, kvm, qemu-arm,
	pbonzini, james.morse, lersek, jonathan.cameron,
	shameerali.kolothum.thodi
  Cc: zhengxiang9, gengdongjiu

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>
---
 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;
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-25 13:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 12:51 [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option gengdongjiu
  -- strict thread matches above, loose matches on Subject: below --
2020-02-17 13:12 [PATCH v24 00/10] Add ARMv8 RAS virtualization support in QEMU Dongjiu Geng
2020-02-17 13:12 ` [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option Dongjiu Geng
2020-02-25  8:34   ` Igor Mammedov
2020-02-25  8:54     ` Peter Maydell
2020-02-25 10:53       ` Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).