From patchwork Fri May 1 14:57:07 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: 186029 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp701233ilf; Fri, 1 May 2020 07:59:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKpSzFqhUJry96NjzBGV3XX04Wq5Qg/JLb/bt0uRNB2xfHgdlp8lmcDDO6d9cVgS+i7QZw4 X-Received: by 2002:ac8:6f25:: with SMTP id i5mr4238937qtv.240.1588345197736; Fri, 01 May 2020 07:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588345197; cv=none; d=google.com; s=arc-20160816; b=tFrBjGtHi25XaiJDyMaZjcRqQjCRhSktgOqNy/TGQPXOr1s34aUUJ5suuAg3aVdXsq RT0B/567kP9ZTHW5s1YJI58wlpUGNPElBlX7hZse+y1wyQpxb4G4O4o8rPJxB1DusjI5 bh2epnxrKvYxtpoYONz1bpjkbwgFNFFgbNQO8WZDuaQUCsI1CxR53VJAlpiFXyGE/dML N9F09xVWsrja2EmFOiHoIYBFhb530D/cDzYvgYxS9St5Zfl3zB2TvuGqscI7h2SxPKr9 4BamdnlyKlFcrI02AEPmnWUcGPnOuxfh4K8XJ78GXhppwcQDCvo2lcxPLx/0nVheQVhL iTxQ== 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=Rec4lCI7C2I9ftVXhw3jnhwwniJ/OyIiNlpjw4I33hQ=; b=SrIaWzPOoFWedXaiZ0bcBj96A46AJMvSaIQqMci1AXSnmzFf4jfewRvaVTmb6CT9EM M28nXupoxq67jdm5/6ulJfrvT+1AixrJzpgKHSAX/f6uo8+XTxFLEsAZqxu1yRyOgwaX zsEVxgW+RgTevIcpOLy0DQQ47A2aCcYth0edIYGMr1Bwmca6qZtubATTintZVRW1NaHc cNc5aI05saCZ6sZG2MT6EfvK+NFo1IcwZmdjcbbgoavHZdceP5N3q5yt8lQ2L2AUfIl6 6L9TOEXCAyaVPtdoXg2LBPN4kZJsxuSZKcEpqE4S+eubMA8R6OiFhDzr6N0vmos4OmAU JYJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QCBzWTKI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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. [2001:470:142::17]) by mx.google.com with ESMTPS id o18si1804191qkh.264.2020.05.01.07.59.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 May 2020 07:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QCBzWTKI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::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]:59872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUX8v-0006KZ-6y for patch@linaro.org; Fri, 01 May 2020 10:59:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34244) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUX7M-0004rv-1A for qemu-devel@nongnu.org; Fri, 01 May 2020 10:59:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUX6M-0007qX-7Q for qemu-devel@nongnu.org; Fri, 01 May 2020 10:58:19 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:40392) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUX6L-0007nv-Pl for qemu-devel@nongnu.org; Fri, 01 May 2020 10:57:17 -0400 Received: by mail-wm1-x343.google.com with SMTP id u16so6573200wmc.5 for ; Fri, 01 May 2020 07:57:17 -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=Rec4lCI7C2I9ftVXhw3jnhwwniJ/OyIiNlpjw4I33hQ=; b=QCBzWTKIZ6i1bqEUk+0sAgo+cfTpLNxKV3RzrG+1hwaJXmxcirgXUoE+RwsLgTHHgw jEKvHtZPIbyFLMXu2Wgdm5pAJPLvp8CuAS51BI4OWqcECJEI7ab50iriC5iBaM5IQVxi oLQvvaxh4xcNKgEhFUghRmSZUUkezF7Rfv9EK+4IujEWt8yFy93eY/EPvt5ZY8qrJpL5 A12BmGdnRoA/3xmzTwkb/NHWdpRPUnEbcF4UEky+cayhthHayWGraIYAhuW+eC1JBTqR rurZ5RW7VmXApbl/+KjnrrDnICO1FT0tge8XueNq95J0SKitSHZN8Rc3MgpYydikvdrf NX2Q== 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=Rec4lCI7C2I9ftVXhw3jnhwwniJ/OyIiNlpjw4I33hQ=; b=XwaX8y6XWKsYQm+gQceT5qj/b2GYdL/4vuGlMZ0PufOhc/GkBjeTyam9fK19czEWsj LHTS9ONOxinQ5JjernsUiehWFNzFI9cQTAcSZlb4Dx8XVkGaxCQaSux1tEDsaPPAS3wx lzMryblT13h/G4suZ9PNm07tdqnGhLpG1Ji/Sp9CGizLA2JoBJpPGsOOKMhrVTLkjBgz JwKfF/lhX38jDbNv015ykFjl0tc4xGGJVLouHReDp073axGrA9x1q+xD/CdwMZFCUk6g LL+GTtltC7HY5tpnnKzaCtKBodN1ssXh8Aaj864TPbT+pPgqOFT7pqPeZ/e7n/1SnEHJ S1uA== X-Gm-Message-State: AGi0PuYNBzSZPqYKoGPpME9Py1hP0rcvSqqPNbA7GZrYjRa/dXUBR6De LK06cdTgY5V9EWXFhkzFRthkaQ== X-Received: by 2002:a1c:2392:: with SMTP id j140mr4339640wmj.136.1588345036002; Fri, 01 May 2020 07:57:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s24sm4421887wmj.28.2020.05.01.07.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 07:57:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 41F371FF8C; Fri, 1 May 2020 15:57:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/7] exec/cpu-all: Use bool for have_guest_base Date: Fri, 1 May 2020 15:57:07 +0100 Message-Id: <20200501145713.19822-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200501145713.19822-1-alex.bennee@linaro.org> References: <20200501145713.19822-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::343 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@iki.fi, richard.henderson@linaro.org, laurent@vivier.eu, 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 diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 49384bb66a..b4fb5832c4 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 770c2b267a..aef5531628 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 1d20a83d4e..90ad365b43 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)