From patchwork Thu Feb 23 23:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 656014 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp600870wrb; Thu, 23 Feb 2023 15:18:53 -0800 (PST) X-Google-Smtp-Source: AK7set+Vj5D+OXI3VUna+eBVb5Loss3clS2uFZk5/tvAuWVWJiqSTlXYv4ahaCsObzmPno2puIzV X-Received: by 2002:ad4:5cad:0:b0:56f:fe48:682b with SMTP id q13-20020ad45cad000000b0056ffe48682bmr26711496qvh.15.1677194332881; Thu, 23 Feb 2023 15:18:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677194332; cv=none; d=google.com; s=arc-20160816; b=dVQE9Ue7Y2JnZbSmsxGZOBHxaNS63+yx7zFbU8QEeJvNPUnnI2yGVxdJaHJ/R3TGa2 RlR4Q016xGPLLXXywkd0JoIeC3aSBBcm0eOi60VNsnPnIYCRKNfWrP+MMMV4kwDTjj4T aameiMHpeAPYtMAqQtal4rfGKuZbJXoZaC5R/wQC4ygzTJvxLXXDyJUX1hSWq9/BFwA3 hLLPrHcJNRTPkf2I7ogx90xVQspoldkRM+tD1EOPgpfPO0Og/+W8jg/eCGAsSjMihlVf 74dZa6vmCXf7PnBaWPNacQtLDILoI57uufZFNp6y95OEwB77XFT8joRVMWTmNOwHXg7F UI8A== 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=A3Lx/mtOBWkhA4XGJqZifqoY0L2i4FrcNzgDZGb4hiw=; b=MyOGnYNI+61kPHoMCQj2Oyvsl0SLTfAXs9qcfvjvWTlKX3OnFf68Jh01BaQenYYS6W PRWRg9VLdXKBmJ0AEfWxMGdquSYkjgE41qDncNfMx+RoliIYVdlbZJhaWf5rX4tcgGEk fT/Qe8N6C4D0AQCBAUV9uTPW2eyoHXgO5d9YOHiXua6T3hgGPgu9xZNSCtEgsp4NEjT5 zVupKT2RqWoKqu9r5NOLZh6Z4PNlQ8xwzA/cZaWGAh7S5TC/KDL8GHjZnzTHMSwqigGd WBXtfAG0Dvfyw/7POA2nt+GfJ00rIzg2/Rpcn//BTUNnNIXkhUVWIcwMpQag6qIWSxbt PQCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kMTb0RUt; 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 n5-20020a0ce485000000b0056c25e77091si3651902qvl.21.2023.02.23.15.18.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Feb 2023 15:18:52 -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=kMTb0RUt; 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 1pVKqr-0008Vy-TJ; Thu, 23 Feb 2023 18:18:13 -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 1pVKqp-0008Vj-IA for qemu-devel@nongnu.org; Thu, 23 Feb 2023 18:18:11 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVKqn-0000T0-Vy for qemu-devel@nongnu.org; Thu, 23 Feb 2023 18:18:11 -0500 Received: by mail-wm1-x32f.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so857493wmb.5 for ; Thu, 23 Feb 2023 15:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=A3Lx/mtOBWkhA4XGJqZifqoY0L2i4FrcNzgDZGb4hiw=; b=kMTb0RUtsQU4GqDDSpGtidlgHuVx8RX/IY30nkhnHgrJ0lJjVBEhlJyXuAvGZU134K rtnhiHo4jIJqTlE3HL/6as8Uaq4kEhA6B6bNNLPN8I/vqIIC9sBvfL9Md/2lRZdZN8qI JqiD/pLhp1UTHP7elxg5o+JQ/Jqg1w07WFH1AA+uXcu4BqHR1c2VIjqLRGOJBZAOMaYC vBzZDvRFD6mY4ztsxGpMh4LbN22LZ3GFkV1U6fim2KlWa19l6HNsPyHb5g5jyf9D/zYf rLaU+S8tJtapqCYFQaaI7xaIs50JTrsyHP0mpLjQKZbOGMNqSFCuBufSeh5yIVzICpGx Q5Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=A3Lx/mtOBWkhA4XGJqZifqoY0L2i4FrcNzgDZGb4hiw=; b=qbUeBaC1OND49vyhXKlWAdTOiuAN/yu0kPLzwrCMPGKF5+aMJrzWWwBlnbtFmnR6nq 3d/iC9ab9DYAMlDabkN3zGhEkrHTghOzzSskaNdtZN0Kgbr+P1CkNTK/TeVaIkNqHHfx XwxqRfn/EqSPLlNuNoFztQ+WTgjHHJqx66YXKwp+cvD73noUOrtf3CymfNTwGNT2obCp m3cI1auKIykxauVqi9ePyYOc9dnZsHnBu7G0aWODtUYPPu61V3oJPZck2UHt5z9rkIkA bYLnUuX0JPtaQO0AeO5s/DWL1O4AuX53sUF5eSLd+J8bbASQkPKlHD2sGRHzLMcuFY92 U8hw== X-Gm-Message-State: AO0yUKWEaS1U7+n17wJrpDJgtKjR7J4p9ylxFp7myd15Bld3+Tccq1qV 7YJuzQwYhoK8E6ASa1TH6sYuMpO7apA/ufVf X-Received: by 2002:a05:600c:810:b0:3db:2e06:4091 with SMTP id k16-20020a05600c081000b003db2e064091mr10609938wmp.37.1677194288110; Thu, 23 Feb 2023 15:18:08 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id v22-20020a1cf716000000b003e1fee8baacsm758351wmh.25.2023.02.23.15.18.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Feb 2023 15:18:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Janosch Frank , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 2/7] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size() Date: Fri, 24 Feb 2023 00:17:50 +0100 Message-Id: <20230223231755.81633-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230223231755.81633-1-philmd@linaro.org> References: <20230223231755.81633-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- dump/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 7101169ecb..3784a9054d 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -15,6 +15,7 @@ #include "qemu/cutils.h" #include "elf.h" #include "exec/hwaddr.h" +#include "exec/target_page.h" #include "monitor/monitor.h" #include "sysemu/kvm.h" #include "sysemu/dump.h" @@ -1859,7 +1860,7 @@ static void dump_init(DumpState *s, int fd, bool has_format, } if (!s->dump_info.page_size) { - s->dump_info.page_size = TARGET_PAGE_SIZE; + s->dump_info.page_size = qemu_target_page_size(); } s->note_size = cpu_get_note_size(s->dump_info.d_class,