From patchwork Thu Feb 22 20:42:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 774886 Delivered-To: patch@linaro.org Received: by 2002:adf:a356:0:b0:33b:4db1:f5b3 with SMTP id d22csp42781wrb; Thu, 22 Feb 2024 12:44:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXDZkYruMVNWsFr3YPZ69nKTtO55O+cX3zI0147mgCcYRMq/5Jw2V70Uf1Iv0tFLAY5hx52PGQH5EARWSXApfT4 X-Google-Smtp-Source: AGHT+IH7zqbbvAWlzytFa1LHHw938x6ZF0AQ/aLt1LuGucu5cPTs0siVm5aHtcxj9H3DkMhaChyL X-Received: by 2002:a05:6214:3288:b0:68f:c83f:a5c8 with SMTP id mu8-20020a056214328800b0068fc83fa5c8mr3227535qvb.2.1708634679104; Thu, 22 Feb 2024 12:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708634679; cv=none; d=google.com; s=arc-20160816; b=gBbYTG8OYetV/PGguFXJ8GXLv/PDYOqAhUGSzZMZbQjfszDDpdyEyNmkUDN05rpeDQ 33tUJkuj0TooaRzMWjL8WOfZl/IcvT0ahflcV3ZmJ96wOlrRgB4VfyrvryLi0/Ty2nnG p9L0fKJvhl4WB4QOX3jqlgwSAHGzjtuaZI/iHWSiJXG5bXD6Ux0z7GBvgDWlJFSW7QXA xJOsetyDmZjUC3Wicu1YMXEg0w6nQJMK6nZ4wy5NNn/AUnoZehp5CVjiHkilK6Z3TyQC ExIReMiickbgEY4Vtljmc7t/zAxsDanKyImRBWxbUAc4o3rj34K+1R/lGsah9x24s/O7 G62g== 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=Bhq/S13VfihOVnnYi8cdcfrHcq4G1EwJdAWP437jNUw=; fh=v7v6q89OJlq+NxHejbJ/ziw7VE+fSww09twjGPM2dQM=; b=uiiN7e/7d+sA6EXlWo0PE1BGJpKCGQKiit0LuXqQlga726riTtpjDWFkTmrpZ3WiHI nLmApP3yrtZinh7pCeTKKB6D+YAcovSYlhOlSAFDypIvKDr0kdEKTubi4VWancKR6ded C3htpG8pU1CnsY45F6PDy73ILdJTukyit0bzmMQT3r/y8zLyRl2+uwJPsT77pGy1zgMR snJ8fDtEnZvK7INL+Rq2pFv4xafvzsoRxLE41A4YPi4KKblB7E4si9oqbiMKAAxCniR5 mRahll36ktNqEwvIOjIzkTsFD5OkOBKcXv1mLmd/FUJ1GsmBEl8Zq8TXclwUl8PBcaY9 ZRsw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aPLPVX+N; 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 jp15-20020ad45f8f000000b0068fb7169ba3si2599142qvb.559.2024.02.22.12.44.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 12:44:39 -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=pass header.i=@linaro.org header.s=google header.b=aPLPVX+N; 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 1rdFux-00070K-G6; Thu, 22 Feb 2024 15:43:43 -0500 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 1rdFuu-0006zU-4m for qemu-devel@nongnu.org; Thu, 22 Feb 2024 15:43:40 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdFus-0002cL-J6 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 15:43:39 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5dc20645871so143271a12.1 for ; Thu, 22 Feb 2024 12:43:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708634617; x=1709239417; 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=Bhq/S13VfihOVnnYi8cdcfrHcq4G1EwJdAWP437jNUw=; b=aPLPVX+N+7Whu647T+22YnYcLbBdXxwug5fBZiGehhqN5DuNOjRK+MyvykEdy2PV9Y dYWiv1JhnRSnSC/OWfYL/uyDDaIDfVJ9psY32YAr+amyXyOk82qORTgOD3LI6l6s8pDa p9cCI1MY/3J3zQ9KRdI0upMjbIr2uX7gIYfCj8FduObfqxXZxi6dWsa58cvtVnj5pKRT KetRwCj0MmVfTywSc0fI/QbzPI/k4nYqAYLAa9GbV48ZAUfRBxINgXvhwTofaTxXlZeq e74Deu8r2mtweCyEtZ99IhjAjjUAs8ic6cEcHMKCzAOU+UcOr0QmOU5NYiHOSn47mQfz i7kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708634617; x=1709239417; 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=Bhq/S13VfihOVnnYi8cdcfrHcq4G1EwJdAWP437jNUw=; b=PKH7l34bl7+siozkVQy2vJkDXoXc2GJ3uG1L40jN58VzFo6JwepYOnSwhdLreO0tSA qN7ieEUcIjKNNJ8A96jxxFWvcdEx/RgqTfhmZVG6DetZDWmi58pQL8lQCg5R3hdnBz+y BxW2UaJgduWgmoiDUaqi3/3a96TUnmCJPuNxGzqIuIcWWg49L1kCidjqP28XAuM+C86N annuS8WecZqj8YqPLLO76Pv2haW47NO5ACKM91bC61ExRW0w9C1PBpBtVE5JdqegDZ2x htkml6o+vYgeaeFRHC52Z900fbduIcrtXgTq6DLx7i6vj/4F4LWj+7qN7w/zBdUUkitQ r2OA== X-Gm-Message-State: AOJu0Yxqh6W6aLK6ORe18+32v01TBrBIeKTzzmVUH5QYS6/a0oGf7/Op zHUvFlzt2rwWl9lzBLIGqbU3H/kZxyWi51debBlBwvyA0jajLPvJsMMpEkMqqkN6VATAf5ogqvj B X-Received: by 2002:a17:903:1cd:b0:1db:beac:61af with SMTP id e13-20020a17090301cd00b001dbbeac61afmr270755plh.0.1708634617006; Thu, 22 Feb 2024 12:43:37 -0800 (PST) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id l12-20020a170902d34c00b001d8f81ecebesm10275500plk.192.2024.02.22.12.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:43:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich , Pierrick Bouvier , Helge Deller Subject: [PULL 07/39] linux-user: Remove qemu_host_page_size from create_elf_tables Date: Thu, 22 Feb 2024 10:42:51 -1000 Message-Id: <20240222204323.268539-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222204323.268539-1-richard.henderson@linaro.org> References: <20240222204323.268539-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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, T_SCC_BODY_TEXT_LINE=-0.01 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 AT_PAGESZ is supposed to advertise the guest page size. The random adjustment made here using qemu_host_page_size does not match anything else within linux-user. The idea here is good, but should be done more systemically via adjustment to TARGET_PAGE_SIZE. Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Acked-by: Helge Deller Message-Id: <20240102015808.132373-5-richard.henderson@linaro.org> --- linux-user/elfload.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index e84a201448..dfb152bfcb 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2679,13 +2679,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, NEW_AUX_ENT(AT_PHDR, (abi_ulong)(info->load_addr + exec->e_phoff)); NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof (struct elf_phdr))); NEW_AUX_ENT(AT_PHNUM, (abi_ulong)(exec->e_phnum)); - if ((info->alignment & ~qemu_host_page_mask) != 0) { - /* Target doesn't support host page size alignment */ - NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE)); - } else { - NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(MAX(TARGET_PAGE_SIZE, - qemu_host_page_size))); - } + NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE)); NEW_AUX_ENT(AT_BASE, (abi_ulong)(interp_info ? interp_info->load_addr : 0)); NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0); NEW_AUX_ENT(AT_ENTRY, info->entry);