From patchwork Thu Jan 28 22:41:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 372636 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1668511jam; Thu, 28 Jan 2021 14:54:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHD+AHA8EqNWpHKD1Cq6BTodXnqtyrLzG7zd9SMjTjwpQ5056W+0r6qz+jFWuhCPOhaDr+ X-Received: by 2002:a25:d183:: with SMTP id i125mr1966955ybg.411.1611874472075; Thu, 28 Jan 2021 14:54:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611874472; cv=none; d=google.com; s=arc-20160816; b=CmmrUJmakK01uo4G2Jg0d9zeUspSzRB+31hfMXXcVNXBi3EKlaWauxJWOShVjPmS/e XMteHnU61WKppN5H9vfd/CrCmbS6FDHHr37pWSlWDPcMr6icR1RARY9kOaoWLoIqqRNE l8LLMQkbKf5WRmUVDyFJL8fAozOg3kv9Sy5vBNtEyXwvYAXlLm4/koIWCSUoEnJXzCgc IhE6YBdEg7330QcBHPfDl9/6yPo+woxrhw9TllYXQtU1VKUUNfBVf/UtgTDRTvXkoIqt XqOIFD7UCUBVn2qOH4Lsn7WyYA3afwX6+RJ/32S0Lse9aLpSHoaafp3NsghtHJtEaESa z92w== 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=BPFkHBCfiYE2/tooUwU3w49LVJJCP7NOmKVnwS50G54=; b=v6+a5qNSiDaMPcLnnm6L80s9s+7Zx26ZGug0Y4a1niCMq5v8NRqYGZtuHTxd3yqLPX Pvv9pwSsoXNOg6f+4cge5zNl7gKfmkPxpLJpdwAHEbTQX4aQrErx43yIKET69GsY3UyL B2ysEJp/BipOVAFu3lPzjzqjpYuDHVHbYj56ffTLsDWMzGRczbOx/U58dbj0mj3RSqD1 7mDuGnPMRo/rjJsnaXMVdhxkafrIDR1b7f6Huy/yir8zbucgFqo6C25BjyXkKg71o2eL 8mnmkhlJcS/MPhwb+klF/sitkWnfqJPW6RXzuPP8DjvIe/nVuPsnyrku5X15ao6IpNvm BbSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CvUmxM9X; 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 u5si6708026ybc.46.2021.01.28.14.54.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jan 2021 14:54:32 -0800 (PST) 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=CvUmxM9X; 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]:45670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5GBL-0001XM-HH for patch@linaro.org; Thu, 28 Jan 2021 17:54:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5FzI-0005Va-NG for qemu-devel@nongnu.org; Thu, 28 Jan 2021 17:42:06 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:33750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l5FzC-00085h-5t for qemu-devel@nongnu.org; Thu, 28 Jan 2021 17:42:04 -0500 Received: by mail-pg1-x530.google.com with SMTP id j2so3630590pgl.0 for ; Thu, 28 Jan 2021 14:41:54 -0800 (PST) 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=BPFkHBCfiYE2/tooUwU3w49LVJJCP7NOmKVnwS50G54=; b=CvUmxM9X2eaF8quUW5YzlNRp8TTpeu52G5JY/4/6pNfV39n6Fx0h98IRLTVfoKl99c FBxqV9h/RlS89jjByTZmoOZIfzfT1wwOml2tlNe3Fb1Bpxi7b5aX7+454BhUp0TcPAbE lpGktkMLskmmoEl/JhVcFUO2xmHgsVewQiCjjT/IgRtJ6jlox7bDg4Ruof4Qy6PAGPfB UbcM9laboiga5j85HzUcCLCIYxjOw+Vud4fakXJyJGU4nwdsUxSWI1SWJ4AsPjH+tSyN bt7iO9r7Q59s8UYiSEfORtFmg5d8OFoC5CZMkFq1GO7H7xznkpl5M+nt0gysPF0Ty7Wt VUAA== 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=BPFkHBCfiYE2/tooUwU3w49LVJJCP7NOmKVnwS50G54=; b=MS/6TboEUt7/WL2Tc8iXSbnXqZ6gHiPFcwIDdAtWPxUbF2NRPec6xe/f0yKBe10s/8 Z+qHAFESN+4rG+XEJ2DNCbHzxo+xKlTXWduRd2IYEO5Knkgl/BLLND3vzao+bhqFDDGS rYmhGoghH5ivFx9FVJHiCjFwCb/i064USN5M6IpXm6SGR2MZZOHgJhbuF9nc3vSFMwnQ DTDDywTNYCu6uGgKNDgpjMgyy4D/y41AcRuOpGzA9x1dyagrbxnVLRgfVJBz5c5sEC+S okvTwYCxoBc9fDf8y2gO/4JxXYfdmSXc4jgGmY4KVzuGNpqUOUzdb2xoxmag+N+Al5oi N3eQ== X-Gm-Message-State: AOAM5316O4n+bOF4cmp1RWJscf/ompEcSw+GKsxPOJ84gUDQvx5z0Ex2 sZGrmFx2/jg8mZaAaBva24UVvg6i6/vJgd7o X-Received: by 2002:a62:25c5:0:b029:1bc:431b:6aa4 with SMTP id l188-20020a6225c50000b02901bc431b6aa4mr1414714pfl.58.1611873713096; Thu, 28 Jan 2021 14:41:53 -0800 (PST) Received: from localhost.localdomain (cpe-66-27-222-29.hawaii.res.rr.com. [66.27.222.29]) by smtp.gmail.com with ESMTPSA id m10sm6042358pjs.25.2021.01.28.14.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 14:41:52 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 05/23] exec: Improve types for guest_addr_valid Date: Thu, 28 Jan 2021 12:41:23 -1000 Message-Id: <20210128224141.638790-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210128224141.638790-1-richard.henderson@linaro.org> References: <20210128224141.638790-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no 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: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Return bool not int; pass abi_ulong not 'unsigned long'. All callers use abi_ulong already, so the change in type has no effect. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 3f9063aade..5e8878ee9b 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -79,7 +79,7 @@ typedef uint64_t abi_ptr; #endif #define h2g_valid(x) guest_addr_valid((uintptr_t)(x) - guest_base) -static inline int guest_range_valid(unsigned long start, unsigned long len) +static inline bool guest_range_valid(abi_ulong start, abi_ulong len) { return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1; }