diff mbox series

[02/11] sysemu/accel: Restrict machine methods to system-mode

Message ID 20200509130910.26335-3-f4bug@amsat.org
State New
Headers show
Series exec/cpu: Poison 'hwaddr' type in user-mode emulation | expand

Commit Message

Philippe Mathieu-Daudé May 9, 2020, 1:09 p.m. UTC
Restrict init_machine(), setup_post() and has_memory()
to system-mode.

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

Comments

Edgar E. Iglesias May 11, 2020, 9:54 a.m. UTC | #1
On Sat, May 09, 2020 at 03:09:01PM +0200, Philippe Mathieu-Daudé wrote:
> Restrict init_machine(), setup_post() and has_memory()
> to system-mode.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>


> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  include/sysemu/accel.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
> index 47e5788530..e08b8ab8fa 100644
> --- a/include/sysemu/accel.h
> +++ b/include/sysemu/accel.h
> @@ -37,10 +37,12 @@ typedef struct AccelClass {
>      /*< public >*/
>  
>      const char *name;
> +#ifndef CONFIG_USER_ONLY
>      int (*init_machine)(MachineState *ms);
>      void (*setup_post)(MachineState *ms, AccelState *accel);
>      bool (*has_memory)(MachineState *ms, AddressSpace *as,
>                         hwaddr start_addr, hwaddr size);
> +#endif
>      bool *allowed;
>      /*
>       * Array of global properties that would be applied when specific
> -- 
> 2.21.3
>
Cornelia Huck May 11, 2020, 10:17 a.m. UTC | #2
On Sat,  9 May 2020 15:09:01 +0200
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Restrict init_machine(), setup_post() and has_memory()
> to system-mode.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  include/sysemu/accel.h | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
diff mbox series

Patch

diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
index 47e5788530..e08b8ab8fa 100644
--- a/include/sysemu/accel.h
+++ b/include/sysemu/accel.h
@@ -37,10 +37,12 @@  typedef struct AccelClass {
     /*< public >*/
 
     const char *name;
+#ifndef CONFIG_USER_ONLY
     int (*init_machine)(MachineState *ms);
     void (*setup_post)(MachineState *ms, AccelState *accel);
     bool (*has_memory)(MachineState *ms, AddressSpace *as,
                        hwaddr start_addr, hwaddr size);
+#endif
     bool *allowed;
     /*
      * Array of global properties that would be applied when specific