From patchwork Fri May 15 14:43:56 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: 186846 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp501543ilb; Fri, 15 May 2020 07:47:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqVNNzP3OaFuTyN1trZIh0FeeHlbGarNLBojh1S7tboRuhH8XqNxkEHddHR57PNcGpbYkO X-Received: by 2002:ac8:34ec:: with SMTP id x41mr833904qtb.238.1589554029184; Fri, 15 May 2020 07:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589554029; cv=none; d=google.com; s=arc-20160816; b=sedYNWGRCE/iyI6He9Qema+jtmo3NLOc896JLhmNwwCuV91Si3RRlGFm0tz2ihFapI zbvLQP135SaGV4tUKbdD0mhmW6d37+XDhAIbrpxjqt7lsTITgyD6gLKYjnhrTyM3yFZA dQMssZr9lqj3iJJjkungnduJjSp+jnPzHGvdXXwNzpqA3PhttxloQhVtIiiD6HA979K5 25EzRvGfqkm5YIL+DVmv9o9ekhxVudqRYZknhhCZaG8gK4smqBSYRFI6wkSnBeOaKXTp /9p89A0XX6Fk8rOPlJdrAf6Kl+xY1uhfpJEQ4Exm9Rf+LXic3lY7Q1jBN5eR8k+EEV3I fN8w== 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=Tj9rf4j5C/bY0s30aa+ssWmiD9kTfC6nQrJXTkeJFZM=; b=nEjzypXNzehnceFy3AV/wsRlikWSpSdL02HrYczj458q8KjF18rv43ZowIPgr0YF/g jQ+U6C82T65pBpQq0bkuztCul0Suludgyh1RqiEoy7/zFWHB+aKb/rjsZDCMnM+TyJah kEbnioIFtWlX8Sc+fiSpzS9mqLlIJiLARH1ARy6Y/9iPDWYQFID2YcEC6XecpSN+8Iv7 gfwUbvIzAf9k88gJWOEWme8+jnu1cFHIpj9kH8zhfQGpG0ww0AQ6FOyKW2Varz7VtI1a aRJHowpw1f8Ed6MDc2ShldN6ZU3vxdd7L4jp1VAu5Ifh6EfNxOI5B/IkI7dtdk4KCdpg aEeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e3qgQf+b; 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 w1si1370801qth.301.2020.05.15.07.47.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 May 2020 07:47:09 -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=e3qgQf+b; 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]:53776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZbcC-0005wq-NG for patch@linaro.org; Fri, 15 May 2020 10:47:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZbZN-0002Bq-21 for qemu-devel@nongnu.org; Fri, 15 May 2020 10:44:13 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:56104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZbZM-0000xZ-5H for qemu-devel@nongnu.org; Fri, 15 May 2020 10:44:12 -0400 Received: by mail-wm1-x32b.google.com with SMTP id f13so2567051wmc.5 for ; Fri, 15 May 2020 07:44:11 -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=Tj9rf4j5C/bY0s30aa+ssWmiD9kTfC6nQrJXTkeJFZM=; b=e3qgQf+bgeq+F1siSNKcaP1T/CJZqYLzjpzrWH+kitXz51bSYaaN0xOFYEzD1ZZNn3 v7ZRa+qpGWPqbgp6ksLGfHOhotq5k91SSQ5jcSTXIeEYlZ+IeWomk3OGpOeVZh/gp0dn BH2B/iVonzfylzBssmPanpMNkL1fr/yYGozcwfDE4J125NQ5gKRxryt/wqm9+Cq65mxN WEfcXB+CIpHb/+9biZFG/YWbJEJv0HzjAJSfK1Bt1DgffUCQjUPB0hUC275jP8wHcjat x8YP/7X+q6s9kJ/QxCAkZa/q+olVjzXqRRnSo+zm7eqno2PbwpOr3V0Sn6MgrTFglNzn Yd/w== 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=Tj9rf4j5C/bY0s30aa+ssWmiD9kTfC6nQrJXTkeJFZM=; b=mSbz7VpqARSz0RUoU23DlHUdJmCMk+vLe9ErbXdTRtmZC5ChEzC6lvODbbI3kLkdCM 5P8IB4g0mJmTWjj+j6Zkg2VUB6GFvfOg3sZnj/+2r7OfSIx0YKj7Vhz1HfY5h9aHQOLs VR6GaOCi6iZsTWg8nx0d1UxbrI27j8viPBhfsKLoJrnTHwqaGTAOdiB1cUULMEjNWG0u mZVYto1UQ7RLDoNvYaA3zQjVI2XraWV7iOofOvMLHIQ9fEUBxrlfiiTwEyf3F11r2Vun 8n0IDrG4QWgIjwV9a1MOEj400pMJdZRDH4fA/TxZs5vgLfegJjKkCA+NB37chDVarr4V DDXw== X-Gm-Message-State: AOAM530mGjdrLTJsCoCIxgOSMJ7riEyVUoOyqDx+x4/ncM+r/xgF3T5G cTxP+uapdr80wIFdBn2tx9W36g== X-Received: by 2002:a05:600c:20c6:: with SMTP id y6mr4280915wmm.131.1589553850852; Fri, 15 May 2020 07:44:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 77sm4266900wrc.6.2020.05.15.07.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2020 07:44:06 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 847271FF90; Fri, 15 May 2020 15:44:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 04/13] exec/cpu-all: Use bool for have_guest_base Date: Fri, 15 May 2020 15:43:56 +0100 Message-Id: <20200515144405.20580-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200515144405.20580-1-alex.bennee@linaro.org> References: <20200515144405.20580-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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 , qemu-devel@nongnu.org, 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é Reviewed-by: Laurent Vivier Message-Id: <20200513175134.19619-6-alex.bennee@linaro.org> -- 2.20.1 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)