]> git.proxmox.com Git - mirror_qemu.git/commitdiff
sysemu/accel: Restrict machine methods to system-mode
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 26 May 2020 17:24:21 +0000 (19:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jun 2020 15:12:44 +0000 (11:12 -0400)
Restrict init_machine(), setup_post() and has_memory()
to system-mode.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200526172427.17460-2-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/sysemu/accel.h

index 47e5788530cd80c3692407a03e171f75f68dcd27..e08b8ab8fa32aeaa85d7197c340ce3eeaec45a93 100644 (file)
@@ -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