From patchwork Fri Sep 1 02:23:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 719496 Delivered-To: patch@linaro.org Received: by 2002:ab3:1981:0:b0:23f:8cfb:5ad7 with SMTP id 1csp18083lti; Thu, 31 Aug 2023 19:28:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVPKpFFO1rFNd1sGTcHYBCn2kTwLReV3zU42Lhj/5s7izUngS/B64QsX2ygFCLa/f6YeXj X-Received: by 2002:a05:622a:10e:b0:410:aab6:7f60 with SMTP id u14-20020a05622a010e00b00410aab67f60mr5304065qtw.18.1693535312730; Thu, 31 Aug 2023 19:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693535312; cv=none; d=google.com; s=arc-20160816; b=F011yU4CwqgDibPD63cLFGt8y5xfhGmC5Gj5+5p950QvcGbO733nfSMCFSuVW4X4Jc Bq6JzlQU3iHmoxeY0vdMiEUKpuxgJrOSWMnS/NARFkPfapt4hFtEOBnRu2y8rrWtS/WU hQQ9yew3Yx2hh5jP3qhT/rYj4cdJV4naiNodjDhq3IClekTJIopVqcr/onC2QF2ujxei JNGaS5ji0Lzz9hbwVm6cnf6ipTD7ZhCNytqiTImK1j8V9eYRne36aUz0LVrXl0StD/Bm kcFCC027gjX+7FP8iGdanYGbnfxAKGqOjJqY4ssr6t5a+U6yWNe8Jo3c7CpeqK/5o3SF 8ldQ== 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:cc:to :from:dkim-signature; bh=RG0I5fdtJkgseX4CxGvr61fKZ2D6UQ2yfGBN0aVfn4c=; fh=r1cPj2GlTGSV4V8jQu3jfCKsZwpJ5ktYEUy+P7GD/+s=; b=aYrNRKT+KRUAZIATTHz1HEokPdEiXrIBwJn2Q/mGWQ3Z06LoQU/UYm+7Ct2pt09rwz MGN73VBwmTQdrs1afHzt2dDT/JUfAi2o644JxPTMRGoHoiu4AAKWAJ+8lBAO18Q9PvQ3 0lYp6jmy5NU68SYUfYHnV3GYTbhZyxjhUUuodw/PovQb6AyddXz3JkHZPT0IejNSFXNh rBXWDQTJyuv3VXG5rlgeOqefuzw/hI5UUSGcvk40MEMGNZerlIb18KsDAEeDm6FTuI5y dxUciZ03bfETfeW6IUczl0RULryprDB298EoeKweCtEiqzFHKjpo8pnyquDneCE76nZP j4WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OaqZ7Rvd; 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 c17-20020a05622a059100b0040c34202141si1713622qtb.504.2023.08.31.19.28.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 19:28:32 -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=OaqZ7Rvd; 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 1qbtp6-0006X5-Bw; Thu, 31 Aug 2023 22:23:48 -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 1qbtp4-0006W6-V3 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 22:23:46 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbtp2-0001Q1-Ov for qemu-devel@nongnu.org; Thu, 31 Aug 2023 22:23:46 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5657add1073so949916a12.0 for ; Thu, 31 Aug 2023 19:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693535023; x=1694139823; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RG0I5fdtJkgseX4CxGvr61fKZ2D6UQ2yfGBN0aVfn4c=; b=OaqZ7RvdwfUgVnBPAXgX2gbRR5X20w33zuXsfwfhRYKEnf9q+OMFWmuGWs3M45swX0 TxC7P8woxBI2S73dvbSJAtkiak6yyhUj08CDFFFGTJ2jgrzE/5jrmSeGfla5O7jjSfAt TraQbnqswZTWWPOtzC4m+IK0RwOaFU3BKWptYwYrtNIzI2iGlw9cSQ1jsSD+ynpwbVfd wGN5VaLs48SW/2TlvfTyl0DTJhZiVA0a1nHN76bahaPQtiru9fARjabi3Jjyf8rfcv4h eScrKewSSlf//kevFCdqr5XuhpzYxV0huYyQH4gXYp2S5Z0xruHbWHkPWsgddJ2XBVSi iGPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693535023; x=1694139823; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RG0I5fdtJkgseX4CxGvr61fKZ2D6UQ2yfGBN0aVfn4c=; b=gVa0j75EOcBkpVe8L4+HJ8hxKTGw+SuEZlKZKaIL57Bb6J+IMJi0FPQbD3TUmyKIVC /GlFaKp8yDZIkK1aBn5iorRIIaEfYXIDxa9xuvfo50HNFQttZH0+3cK3uoPjC3OU1Z0I 5bZYOtXLRKpcrlR2B4hnDCovfVRcC6zp66G7jXr2osCWh0JuvpPFlqvAmUwo3iujk+C1 I2gafRq1Mx7k7AoWUMtJLu/vnhs2gq3xEnF3fWajvEmXV74SvfYZuzEMtzg7EyjFrXwq rLTTRAPnkDq7gMY6G+keJtHLY1GODUXi2/aGGYj/2BEDOp4lVxK3jRI1heE5kna++n4A FY7Q== X-Gm-Message-State: AOJu0Yz1ex+7MO6LsymFcQ6fG0XoQOdJ6/BAthTCoTegsd06BC86W2rQ nYbvQG28R4/mvVDOiLk9dte6Ddwc05o1zzhSs3c= X-Received: by 2002:a05:6a20:1451:b0:13f:de94:fb97 with SMTP id a17-20020a056a20145100b0013fde94fb97mr1798744pzi.27.1693535023497; Thu, 31 Aug 2023 19:23:43 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id c25-20020aa781d9000000b0068a54866ca8sm1906977pfn.134.2023.08.31.19.23.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 19:23:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, alex.bennee@linaro.org Subject: [PATCH v2 13/33] softmmu/physmem: Remove qemu_host_page_size Date: Thu, 31 Aug 2023 19:23:11 -0700 Message-Id: <20230901022331.115247-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230901022331.115247-1-richard.henderson@linaro.org> References: <20230901022331.115247-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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 18277ddd67..6f963ea127 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -3472,7 +3472,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