From patchwork Fri Aug 18 17:12:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714653 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp628754wrs; Fri, 18 Aug 2023 10:14:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4eIJsZ5mm+dh1Bibu//rexKT9lah8w2U4D+mBPtXpQFkm9+TQusWlx3koBk/YOsu52Gt1 X-Received: by 2002:a05:6102:c4:b0:444:c7fa:1aad with SMTP id u4-20020a05610200c400b00444c7fa1aadmr3779066vsp.17.1692378884901; Fri, 18 Aug 2023 10:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692378884; cv=none; d=google.com; s=arc-20160816; b=N9awon7WH9n8dQoKK5ZzOGYSTeYbggtkiQR9aqEn/DnPh7dH9MHk5eWFAw/EjeDcLh HU908DIrXQbmXTAR5L0tRStVrqnlpPzyIaAT8cjUlJlZ3H6O5ULozulojjDIS4I1JWJZ 7Y7zxD/fDzDiTJsHEsjjb1J+i4QTzMcE29Rm+zO/1LO9pC+/UFbyqA6qmatAtQRvmbwY puoOAEWhkRALiDhE+kXVnr7lcWyy9485H45P7KRCRJ9xyD6ywMmGOvC/aHNLGULR5LBL 0WmOB0yyXhlnlX04+xry6aKHKiw+umeUeAGdxL+xax6NrVkggtdpIqEMS3r22KO8Z0gI TgRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=VPyTBROSdONEOHmOwoKlD5YWMd2vd+yZCLBm/BBj1es=; fh=oYAd+8Lj9FKlReeF9hgENQXa3P4LhBP5C4njRBbobDA=; b=FFoEAWZwB382jtMX+XB9eCucbYnvywcCe6wsNae6zWJMXvY4ieP/Lj/DjKAt7olyLn UtakEFvKRxzVeFBvCqPj3sIxRvzEqNAPGNeFEa5tpdoPYHmgcupcwN3EbtSE9OwXjLZE TXy5aNktSb+GsxW3TeP2xMuqZW/5l9OTdnIPaMJ6vznQ8c9e3rC3nNy8NIn01gcERtoQ HqN4z96IB7MKkmPnC2MeqpeGkImW6o6o9OqBUa6Z25iwvqBv9igHFBCFMB0Zapf0L0LU 1pnCCdu5VQwulWiiEwHqGmeRFM6t0CqABFjdyrm17doWirSOr0/P9cyEfwFHQIvZSfEx I+jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=opMjJ9ni; 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=pass (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 i10-20020ac85e4a000000b0040354d7e33fsi1569779qtx.87.2023.08.18.10.14.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 10:14:44 -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=pass header.i=@linaro.org header.s=google header.b=opMjJ9ni; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX31m-0008G5-Pw; Fri, 18 Aug 2023 13:12:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qX31l-0008FE-0P for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:49 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX31i-00082U-UU for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:48 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1bee82fad0fso8783225ad.2 for ; Fri, 18 Aug 2023 10:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692378765; x=1692983565; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VPyTBROSdONEOHmOwoKlD5YWMd2vd+yZCLBm/BBj1es=; b=opMjJ9niRwLnvknf2vtrfjkO4b69llRXHvsFi8eORMeRtB44tZ21JWH+GrCeL8onSr WzYdpTZTKnX0bA2UxLX8HQoY18ZhYKeGW1GTPMgul/WbyKGh4HIIxePlMW2S6+yUQdi2 zYdeFzUhZVmNJRGkSICSuZ2G7/og0aHB45BtCa4zq/VmWsbvNKjQVnfXgyEp+ItdPO0m hHGdd3IuATE9yRtsfUFqysLjDb6Si1xncL8wAh1vY6pt+mJXPThuXLZDRuNxGbFzpJ5K eFW5SXQdwiQ+oE2DQBZsIwN+4R9wsDf5lWyrXk27L11hTWDM44HX3zxJ+05wtTmh80An uNLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692378765; x=1692983565; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VPyTBROSdONEOHmOwoKlD5YWMd2vd+yZCLBm/BBj1es=; b=CwL2l8BpNxBWmYNYzBa9DSbFC6nVI+0jfBKO0vm61jLFm+RkvpERr4jFQsEe+XiMnT oeYo9r5wUFLbLtP5K+/gSzJzU+slQw54+/7wN3MIl0JFFWWFH3g7BOzR/mRKdNTIYirT FG+T7mb0/umNW3fU01c6BRC7GTtkntYNoG+Wig44VGTgLpVgWljKIFHWLgPofJt5mrI1 pKDKuoldpg+NjoPGmkPFO9KI2OKl67ZunsX0ez/7JFlmOdEjr4JG6mb4YvXtUvq7Fu/f MAsYxVgENVDMk2BygAmJpcvcRNuRCYpTWnfzhxM4opCPl3MthqHaLdUW5LYxcIyoRKpk u+Iw== X-Gm-Message-State: AOJu0Yye/ZPoOeyPX7HRb/JVdGiC4paRr6/iWBRNpkbsRac0gQY6JinS yDaXcC3raOXPfsRZrF2P2+OzKUTKw5mQBc+b5P4= X-Received: by 2002:a17:903:124b:b0:1bb:c87d:7573 with SMTP id u11-20020a170903124b00b001bbc87d7573mr3510483plh.46.1692378765355; Fri, 18 Aug 2023 10:12:45 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:cf24:6daf:2b9e:7972]) by smtp.gmail.com with ESMTPSA id jw24-20020a170903279800b001adf6b21c77sm2020025plb.107.2023.08.18.10.12.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 10:12:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 13/33] softmmu/physmem: Remove qemu_host_page_size Date: Fri, 18 Aug 2023 10:12:07 -0700 Message-Id: <20230818171227.141728-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230818171227.141728-1-richard.henderson@linaro.org> References: <20230818171227.141728-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use qemu_real_host_page_size() instead. Signed-off-by: Richard Henderson --- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 3df73542e1..6881b2d8f8 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3448,7 +3448,7 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length) * fallocate works on hugepages and shmem * shared anonymous memory requires madvise REMOVE */ - need_madvise = (rb->page_size == qemu_host_page_size); + need_madvise = (rb->page_size == qemu_real_host_page_size()); need_fallocate = rb->fd != -1; if (need_fallocate) { /* For a file, this causes the area of the file to be zero'd