qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

exec/cpu-all: Use bool for have_guest_base

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200513175134.19619-6-alex.bennee@linaro.org>

authored by

Richard Henderson and committed by
Alex Bennée
e307c192 ee947430

+5 -5
+2 -2
bsd-user/main.c
··· 42 42 int singlestep; 43 43 unsigned long mmap_min_addr; 44 44 unsigned long guest_base; 45 - int have_guest_base; 45 + bool have_guest_base; 46 46 unsigned long reserved_va; 47 47 48 48 static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; ··· 828 828 } 829 829 } else if (!strcmp(r, "B")) { 830 830 guest_base = strtol(argv[optind++], NULL, 0); 831 - have_guest_base = 1; 831 + have_guest_base = true; 832 832 } else if (!strcmp(r, "drop-ld-preload")) { 833 833 (void) envlist_unsetenv(envlist, "LD_PRELOAD"); 834 834 } else if (!strcmp(r, "bsd")) {
+1 -1
include/exec/cpu-all.h
··· 159 159 * This allows the guest address space to be offset to a convenient location. 160 160 */ 161 161 extern unsigned long guest_base; 162 - extern int have_guest_base; 162 + extern bool have_guest_base; 163 163 extern unsigned long reserved_va; 164 164 165 165 #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
+2 -2
linux-user/main.c
··· 59 59 static const char *seed_optarg; 60 60 unsigned long mmap_min_addr; 61 61 unsigned long guest_base; 62 - int have_guest_base; 62 + bool have_guest_base; 63 63 64 64 /* 65 65 * Used to implement backwards-compatibility for the `-strace`, and ··· 334 334 static void handle_arg_guest_base(const char *arg) 335 335 { 336 336 guest_base = strtol(arg, NULL, 0); 337 - have_guest_base = 1; 337 + have_guest_base = true; 338 338 } 339 339 340 340 static void handle_arg_reserved_va(const char *arg)