qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
@ 2021-05-16 20:53 Philippe Mathieu-Daudé
  2021-05-16 20:55 ` Philippe Mathieu-Daudé
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-16 20:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, qemu-trivial, Bin Meng, Laurent Vivier,
	Philippe Mathieu-Daudé, Palmer Dabbelt, Alistair Francis

Physical Memory Protection is a system feature.
Avoid polluting the user-mode emulation by its definitions.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/riscv/cpu.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 7e879fb9ca5..0619b491a42 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -97,7 +97,9 @@ enum {
 
 typedef struct CPURISCVState CPURISCVState;
 
+#if !defined(CONFIG_USER_ONLY)
 #include "pmp.h"
+#endif
 
 #define RV_VLEN_MAX 256
 
-- 
2.26.3



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

* Re: [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
  2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
@ 2021-05-16 20:55 ` Philippe Mathieu-Daudé
  2021-05-16 23:14 ` Alistair Francis
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-16 20:55 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers
  Cc: open list:RISC-V TCG CPUs, QEMU Trivial, Bin Meng, Laurent Vivier,
	Palmer Dabbelt, Alistair Francis

Oops this is v1, not v2.

On Sun, May 16, 2021 at 10:53 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Physical Memory Protection is a system feature.
> Avoid polluting the user-mode emulation by its definitions.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/riscv/cpu.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 7e879fb9ca5..0619b491a42 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -97,7 +97,9 @@ enum {
>
>  typedef struct CPURISCVState CPURISCVState;
>
> +#if !defined(CONFIG_USER_ONLY)
>  #include "pmp.h"
> +#endif
>
>  #define RV_VLEN_MAX 256
>
> --
> 2.26.3
>


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

* Re: [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
  2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
  2021-05-16 20:55 ` Philippe Mathieu-Daudé
@ 2021-05-16 23:14 ` Alistair Francis
  2021-05-17  1:42 ` Bin Meng
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Alistair Francis @ 2021-05-16 23:14 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: open list:RISC-V, QEMU Trivial, Bin Meng,
	qemu-devel@nongnu.org Developers, Laurent Vivier, Palmer Dabbelt,
	Alistair Francis

On Mon, May 17, 2021 at 6:53 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Physical Memory Protection is a system feature.
> Avoid polluting the user-mode emulation by its definitions.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/cpu.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 7e879fb9ca5..0619b491a42 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -97,7 +97,9 @@ enum {
>
>  typedef struct CPURISCVState CPURISCVState;
>
> +#if !defined(CONFIG_USER_ONLY)
>  #include "pmp.h"
> +#endif
>
>  #define RV_VLEN_MAX 256
>
> --
> 2.26.3
>
>


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

* Re: [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
  2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
  2021-05-16 20:55 ` Philippe Mathieu-Daudé
  2021-05-16 23:14 ` Alistair Francis
@ 2021-05-17  1:42 ` Bin Meng
  2021-05-18  6:33 ` Alistair Francis
  2021-06-05 18:59 ` Laurent Vivier
  4 siblings, 0 replies; 6+ messages in thread
From: Bin Meng @ 2021-05-17  1:42 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: open list:RISC-V, QEMU Trivial, Bin Meng,
	qemu-devel@nongnu.org Developers, Laurent Vivier, Palmer Dabbelt,
	Alistair Francis

On Mon, May 17, 2021 at 4:53 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Physical Memory Protection is a system feature.
> Avoid polluting the user-mode emulation by its definitions.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/riscv/cpu.h | 2 ++
>  1 file changed, 2 insertions(+)
>

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


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

* Re: [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
  2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-05-17  1:42 ` Bin Meng
@ 2021-05-18  6:33 ` Alistair Francis
  2021-06-05 18:59 ` Laurent Vivier
  4 siblings, 0 replies; 6+ messages in thread
From: Alistair Francis @ 2021-05-18  6:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: open list:RISC-V, QEMU Trivial, Bin Meng,
	qemu-devel@nongnu.org Developers, Laurent Vivier, Palmer Dabbelt,
	Alistair Francis

On Mon, May 17, 2021 at 6:53 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Physical Memory Protection is a system feature.
> Avoid polluting the user-mode emulation by its definitions.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/cpu.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 7e879fb9ca5..0619b491a42 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -97,7 +97,9 @@ enum {
>
>  typedef struct CPURISCVState CPURISCVState;
>
> +#if !defined(CONFIG_USER_ONLY)
>  #include "pmp.h"
> +#endif
>
>  #define RV_VLEN_MAX 256
>
> --
> 2.26.3
>
>


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

* Re: [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation
  2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2021-05-18  6:33 ` Alistair Francis
@ 2021-06-05 18:59 ` Laurent Vivier
  4 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2021-06-05 18:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, Palmer Dabbelt, Alistair Francis, Bin Meng,
	qemu-riscv

Le 16/05/2021 à 22:53, Philippe Mathieu-Daudé a écrit :
> Physical Memory Protection is a system feature.
> Avoid polluting the user-mode emulation by its definitions.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/riscv/cpu.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 7e879fb9ca5..0619b491a42 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -97,7 +97,9 @@ enum {
>  
>  typedef struct CPURISCVState CPURISCVState;
>  
> +#if !defined(CONFIG_USER_ONLY)
>  #include "pmp.h"
> +#endif
>  
>  #define RV_VLEN_MAX 256
>  
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

end of thread, other threads:[~2021-06-05 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-16 20:53 [PATCH v2] target/riscv: Do not include 'pmp.h' in user emulation Philippe Mathieu-Daudé
2021-05-16 20:55 ` Philippe Mathieu-Daudé
2021-05-16 23:14 ` Alistair Francis
2021-05-17  1:42 ` Bin Meng
2021-05-18  6:33 ` Alistair Francis
2021-06-05 18:59 ` Laurent Vivier

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).