From patchwork Wed May 13 17:51:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 186676 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp669464ilb; Wed, 13 May 2020 10:52:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkayNepiTZ5g8FBj8WOml3EXJvTSb4mIjtzGyq+boL/SXtM6T2vcs6jdjWPQzgafmjwjcq X-Received: by 2002:a37:c20a:: with SMTP id i10mr874602qkm.29.1589392351093; Wed, 13 May 2020 10:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589392351; cv=none; d=google.com; s=arc-20160816; b=g4XPkSUlFpAcofmj6OIw1KwHx1jwpb6UwjWz0MzliLpzJpNWVQPX3dNyxWaP962CtQ dvCVb7MnLZVGTyDmSDc6IbxGtoxG8kcdWFuldzX2fg/aSoT7tjPDseaklQa4mpALvuAY OjkPoNJeuhKWmF3fPGmabHsQWYNgnCzSsZiycfoDsRFspvd5cT00p5w+8LhpS8YDNBip hyQeB0xoBRuTT9T4UzjACMbO6rZHBqXTv0OPqb0t6BCiBcURIBSam/AFf0uDtCwYrn2O PwHAePEv99k5ygs+Vt3fnffwmfaFx6MmVtVz+LGCVuF8FGPHKVV3w/EAY0VsP1ewLoir QKtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=bhfhYkItu0rqms7vA34WYfwwnNQGZCVSd2qUpQYXdFA=; b=gKzCGdDJIf1A6gAg6CxENKMVhhbZCrXJKjS/jXKIB98WzZ3r/DIIeYOkzi2wIx1MsR Bp3kM9vBezdaZ3yqsIJ4PnnVu4n9HqcSO1IcSMZClOOH1VQpsH8AKRiGCIwqoj/61oVY ZkHIfuvxhxRl3CKxMyWAy/Bfcsn7LQZ9Fr3+WqdZsGMdAr8RTwLQfZgXTOGM7+ly04bS xH/UjleYsW9syBz5s2oQ2REb5Gr3LbkzNLJnVtNgDLrjyMsOp7afvDrd7WW8E+vxh4Jf xUNy1vicIsEihlukHoEPdWGaDAU0at6qxW4m7usRc69kfHcEg3hwsTwQfZ2qUeQP+DR4 4spQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Za6nCZ2Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 22si91934qkj.288.2020.05.13.10.52.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 May 2020 10:52:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Za6nCZ2Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvYU-0000tE-IL for patch@linaro.org; Wed, 13 May 2020 13:52:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvXl-0000qK-Dy for qemu-devel@nongnu.org; Wed, 13 May 2020 13:51:45 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvXk-0004yO-2a for qemu-devel@nongnu.org; Wed, 13 May 2020 13:51:45 -0400 Received: by mail-wr1-x441.google.com with SMTP id i15so497294wrx.10 for ; Wed, 13 May 2020 10:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bhfhYkItu0rqms7vA34WYfwwnNQGZCVSd2qUpQYXdFA=; b=Za6nCZ2Z4dF899st7vJkN/HoIC7eG9JHSqVaZIIJTwBLf+ns3fszMWEEDzckl2v5Fh 0zUwDlPDdRk8UE1/GMoxgLa7Il8k8vktCJwT7B6PBxVi9GGwNcSEgVwMbsPdsv7Wpang x6i6913KTew5J99MVfSOjFkikcGB2bw2Gb3EyDlbm4rdyVv7TdUOwKz403ysXc+4Hmo4 lnJVC3LwTQ+vWKGy/WunbQRoLjBF6jXQeKUyB1XB7Lk9Vw9EBrOmmslfqXfQooVMObCx KLiUAXKe6c6+lJJZ/tGapoxoBKFPet6vsJ8hykLVyLYQHXLKQ6Tp1nN+J7XuZ8eqZGyy P45A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bhfhYkItu0rqms7vA34WYfwwnNQGZCVSd2qUpQYXdFA=; b=MgxPIoZHc3OvWUQhuBN0abdH0taCm6VU26nUw94uHtrByO+iVxlcGL92UGUUuUDWR3 lUhAp861ID7XhTmdqkFPWXwAW0xNqXS+df+LOZMSCst84WlwvIf8rbYmT0C+RHmFyv1a T+PfwuRDjsS1mf6eG1iFdIkEAgiLTwcKvf4dMn29Eb+r0n5J7xOsy4sUzYFLOL0tIpW6 zl5i1Yu9kqWwwLJ//r8b9rTfMih5Gcahl+kFspN1XcivxLHpEy9DgEEwCvEvAUe4qXOt 133NkjRqOZpoU0xVVoBMasn7BDIk2S+1aw0qlg+Ixj3gK6wuFVq6zDKi9PIyOSyPC+40 vC2g== X-Gm-Message-State: AOAM532z2rr+Vn7ytIxeXltBNw/w0TMhhCJM2GdGvwwIcldJCLxDkedP +Sk5cjly8qtfS7vf/cVYPUkMaQ== X-Received: by 2002:a5d:604b:: with SMTP id j11mr483272wrt.193.1589392302566; Wed, 13 May 2020 10:51:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r9sm19625722wmg.47.2020.05.13.10.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:51:39 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5078A1FF91; Wed, 13 May 2020 18:51:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 05/10] exec/cpu-all: Use bool for have_guest_base Date: Wed, 13 May 2020 18:51:29 +0100 Message-Id: <20200513175134.19619-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513175134.19619-1-alex.bennee@linaro.org> References: <20200513175134.19619-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 2 +- bsd-user/main.c | 4 ++-- linux-user/main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 Reviewed-by: Laurent Vivier diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 43ddcf024c6..0895a57881a 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -159,7 +159,7 @@ static inline void tswap64s(uint64_t *s) * This allows the guest address space to be offset to a convenient location. */ extern unsigned long guest_base; -extern int have_guest_base; +extern bool have_guest_base; extern unsigned long reserved_va; #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS diff --git a/bsd-user/main.c b/bsd-user/main.c index 28f122b80e6..0bfe46cff93 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -42,7 +42,7 @@ int singlestep; unsigned long mmap_min_addr; unsigned long guest_base; -int have_guest_base; +bool have_guest_base; unsigned long reserved_va; static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; @@ -828,7 +828,7 @@ int main(int argc, char **argv) } } else if (!strcmp(r, "B")) { guest_base = strtol(argv[optind++], NULL, 0); - have_guest_base = 1; + have_guest_base = true; } else if (!strcmp(r, "drop-ld-preload")) { (void) envlist_unsetenv(envlist, "LD_PRELOAD"); } else if (!strcmp(r, "bsd")) { diff --git a/linux-user/main.c b/linux-user/main.c index e18c1fb9523..3597e99bb10 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -59,7 +59,7 @@ static const char *cpu_type; static const char *seed_optarg; unsigned long mmap_min_addr; unsigned long guest_base; -int have_guest_base; +bool have_guest_base; /* * Used to implement backwards-compatibility for the `-strace`, and @@ -334,7 +334,7 @@ static void handle_arg_cpu(const char *arg) static void handle_arg_guest_base(const char *arg) { guest_base = strtol(arg, NULL, 0); - have_guest_base = 1; + have_guest_base = true; } static void handle_arg_reserved_va(const char *arg)