All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
@ 2021-09-28 23:29 Alistair Francis
  2021-09-29  8:26   ` Philippe Mathieu-Daudé
  2021-09-29  9:47   ` Bin Meng
  0 siblings, 2 replies; 7+ messages in thread
From: Alistair Francis @ 2021-09-28 23:29 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: bmeng.cn, palmer, alistair.francis, alistair23, f4bug

From: Alistair Francis <alistair.francis@wdc.com>

Mark the shakti_c machine as not user creatable.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 hw/riscv/shakti_c.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
index 2f084d3c8d..e7cd3bdfb4 100644
--- a/hw/riscv/shakti_c.c
+++ b/hw/riscv/shakti_c.c
@@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     dc->realize = shakti_c_soc_state_realize;
+    /* Reasons:
+     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
+     *       CPUs
+     *     - Uses serial_hds in realize function, thus can't be used twice
+     */
+    dc->user_creatable = false;
 }
 
 static void shakti_c_soc_instance_init(Object *obj)
-- 
2.31.1



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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
  2021-09-28 23:29 [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable Alistair Francis
@ 2021-09-29  8:26   ` Philippe Mathieu-Daudé
  2021-09-29  9:47   ` Bin Meng
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-29  8:26 UTC (permalink / raw)
  To: Alistair Francis, qemu-devel, qemu-riscv
  Cc: alistair.francis, bmeng.cn, palmer, alistair23

On 9/29/21 01:29, Alistair Francis wrote:
> From: Alistair Francis <alistair.francis@wdc.com>
> 
> Mark the shakti_c machine as not user creatable.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  hw/riscv/shakti_c.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> index 2f084d3c8d..e7cd3bdfb4 100644
> --- a/hw/riscv/shakti_c.c
> +++ b/hw/riscv/shakti_c.c
> @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      dc->realize = shakti_c_soc_state_realize;
> +    /* Reasons:
> +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> +     *       CPUs

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> +     *     - Uses serial_hds in realize function, thus can't be used twice
> +     */
> +    dc->user_creatable = false;
>  }


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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
@ 2021-09-29  8:26   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-29  8:26 UTC (permalink / raw)
  To: Alistair Francis, qemu-devel, qemu-riscv
  Cc: bmeng.cn, palmer, alistair.francis, alistair23

On 9/29/21 01:29, Alistair Francis wrote:
> From: Alistair Francis <alistair.francis@wdc.com>
> 
> Mark the shakti_c machine as not user creatable.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  hw/riscv/shakti_c.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> index 2f084d3c8d..e7cd3bdfb4 100644
> --- a/hw/riscv/shakti_c.c
> +++ b/hw/riscv/shakti_c.c
> @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      dc->realize = shakti_c_soc_state_realize;
> +    /* Reasons:
> +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> +     *       CPUs

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> +     *     - Uses serial_hds in realize function, thus can't be used twice
> +     */
> +    dc->user_creatable = false;
>  }


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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
  2021-09-28 23:29 [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable Alistair Francis
@ 2021-09-29  9:47   ` Bin Meng
  2021-09-29  9:47   ` Bin Meng
  1 sibling, 0 replies; 7+ messages in thread
From: Bin Meng @ 2021-09-29  9:47 UTC (permalink / raw)
  To: Alistair Francis
  Cc: open list:RISC-V, Philippe Mathieu-Daudé,
	qemu-devel@nongnu.org Developers, Palmer Dabbelt,
	Alistair Francis, Alistair Francis

On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis
<alistair.francis@opensource.wdc.com> wrote:
>
> From: Alistair Francis <alistair.francis@wdc.com>
>
> Mark the shakti_c machine as not user creatable.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  hw/riscv/shakti_c.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> index 2f084d3c8d..e7cd3bdfb4 100644
> --- a/hw/riscv/shakti_c.c
> +++ b/hw/riscv/shakti_c.c
> @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      dc->realize = shakti_c_soc_state_realize;
> +    /* Reasons:

nits: the multi-line comment format should use:

/*
 *
 */

> +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> +     *       CPUs
> +     *     - Uses serial_hds in realize function, thus can't be used twice
> +     */
> +    dc->user_creatable = false;
>  }
>
>  static void shakti_c_soc_instance_init(Object *obj)


Otherwise,
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
@ 2021-09-29  9:47   ` Bin Meng
  0 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2021-09-29  9:47 UTC (permalink / raw)
  To: Alistair Francis
  Cc: qemu-devel@nongnu.org Developers, open list:RISC-V,
	Palmer Dabbelt, Alistair Francis, Alistair Francis,
	Philippe Mathieu-Daudé

On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis
<alistair.francis@opensource.wdc.com> wrote:
>
> From: Alistair Francis <alistair.francis@wdc.com>
>
> Mark the shakti_c machine as not user creatable.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  hw/riscv/shakti_c.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> index 2f084d3c8d..e7cd3bdfb4 100644
> --- a/hw/riscv/shakti_c.c
> +++ b/hw/riscv/shakti_c.c
> @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      dc->realize = shakti_c_soc_state_realize;
> +    /* Reasons:

nits: the multi-line comment format should use:

/*
 *
 */

> +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> +     *       CPUs
> +     *     - Uses serial_hds in realize function, thus can't be used twice
> +     */
> +    dc->user_creatable = false;
>  }
>
>  static void shakti_c_soc_instance_init(Object *obj)


Otherwise,
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
  2021-09-29  9:47   ` Bin Meng
@ 2021-09-29 23:35     ` Alistair Francis
  -1 siblings, 0 replies; 7+ messages in thread
From: Alistair Francis @ 2021-09-29 23:35 UTC (permalink / raw)
  To: Bin Meng
  Cc: Alistair Francis, open list:RISC-V,
	qemu-devel@nongnu.org Developers, Philippe Mathieu-Daudé,
	Alistair Francis, Palmer Dabbelt

On Wed, Sep 29, 2021 at 7:47 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis
> <alistair.francis@opensource.wdc.com> wrote:
> >
> > From: Alistair Francis <alistair.francis@wdc.com>
> >
> > Mark the shakti_c machine as not user creatable.
> >
> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  hw/riscv/shakti_c.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> > index 2f084d3c8d..e7cd3bdfb4 100644
> > --- a/hw/riscv/shakti_c.c
> > +++ b/hw/riscv/shakti_c.c
> > @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
> >  {
> >      DeviceClass *dc = DEVICE_CLASS(klass);
> >      dc->realize = shakti_c_soc_state_realize;
> > +    /* Reasons:
>
> nits: the multi-line comment format should use:
>
> /*
>  *
>  */

Fixed when applying the patch

Applied to riscv-to-apply.next

Alistair

>
> > +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> > +     *       CPUs
> > +     *     - Uses serial_hds in realize function, thus can't be used twice
> > +     */
> > +    dc->user_creatable = false;
> >  }
> >
> >  static void shakti_c_soc_instance_init(Object *obj)
>
>
> Otherwise,
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


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

* Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable
@ 2021-09-29 23:35     ` Alistair Francis
  0 siblings, 0 replies; 7+ messages in thread
From: Alistair Francis @ 2021-09-29 23:35 UTC (permalink / raw)
  To: Bin Meng
  Cc: Alistair Francis, qemu-devel@nongnu.org Developers,
	open list:RISC-V, Palmer Dabbelt, Alistair Francis,
	Philippe Mathieu-Daudé

On Wed, Sep 29, 2021 at 7:47 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis
> <alistair.francis@opensource.wdc.com> wrote:
> >
> > From: Alistair Francis <alistair.francis@wdc.com>
> >
> > Mark the shakti_c machine as not user creatable.
> >
> > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  hw/riscv/shakti_c.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
> > index 2f084d3c8d..e7cd3bdfb4 100644
> > --- a/hw/riscv/shakti_c.c
> > +++ b/hw/riscv/shakti_c.c
> > @@ -150,6 +150,12 @@ static void shakti_c_soc_class_init(ObjectClass *klass, void *data)
> >  {
> >      DeviceClass *dc = DEVICE_CLASS(klass);
> >      dc->realize = shakti_c_soc_state_realize;
> > +    /* Reasons:
>
> nits: the multi-line comment format should use:
>
> /*
>  *
>  */

Fixed when applying the patch

Applied to riscv-to-apply.next

Alistair

>
> > +     *     - Creates CPUS in riscv_hart_realize(), and can create unintended
> > +     *       CPUs
> > +     *     - Uses serial_hds in realize function, thus can't be used twice
> > +     */
> > +    dc->user_creatable = false;
> >  }
> >
> >  static void shakti_c_soc_instance_init(Object *obj)
>
>
> Otherwise,
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


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

end of thread, other threads:[~2021-09-29 23:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 23:29 [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable Alistair Francis
2021-09-29  8:26 ` Philippe Mathieu-Daudé
2021-09-29  8:26   ` Philippe Mathieu-Daudé
2021-09-29  9:47 ` Bin Meng
2021-09-29  9:47   ` Bin Meng
2021-09-29 23:35   ` Alistair Francis
2021-09-29 23:35     ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.