From patchwork Tue Jan 14 11:38:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857252 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp1874858wrc; Tue, 14 Jan 2025 03:48:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUldm7uoYiGKFfPfMUQDJXYCadfeJcxAJUOr5rYn4dN9vnYnYSTrCdfHI0p1JQoD+fkeoohTg==@linaro.org X-Google-Smtp-Source: AGHT+IEnnbXRk6jAPvH8jpEuSb15ls5bjkfJONYsf/m9N+0qLDm90t+ljNLgShk9zRYdfdkdp1HV X-Received: by 2002:a05:6214:234f:b0:6cb:edd7:ac32 with SMTP id 6a1803df08f44-6df9b1ee81emr343011056d6.12.1736855315804; Tue, 14 Jan 2025 03:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736855315; cv=none; d=google.com; s=arc-20240605; b=DX2c6QBUL1Z5PlO4lXb91XgksTd9dqpl7dm54eqeXqmmSc+DTpReHNRVQgBsdD8fgG 7ktzR4Ov8tiqoSApkDIyhEJGp3j7i1hM62DMurmBqprh6QkiQMLvw1VwLbuYjDtd22kT PEplm4H+odY7I5B8+7yPWZP2DuLYC1PlrK1DL/DqVuw2/APUIjKNecU78e0ZCf/31hbz fQuaowNa1wtO3ROmTNdh94O45UzpATefV5iWRzlX2uzRe2NiHOdFNXqOmQzHKWoH0coc OwvjZhq7YvEKEYt+8kAu07BbYR/eWT6fS3CPM35fZaZMP7odNQal9L7lnJ9dS60rmZFJ lSRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; fh=kybcMgHu6G3G1kz+Iwx2Y7lVQ4lMSqWHrwHMI/PcVVA=; b=g/ehl1KyU1I9KIwd5uH1gL5xJ7zkJc94+b5asIkdElQDXRQcoUwEQQnZelveFbE/KS FLXPyDIY5OUPs1oyQ2/bT9Rc/wR1c5lBIf7ZPPJGganm2GiVvDf2zU8ZSyPZ2FbUppcw GdL+GCqQ5pAw6Pzv7qIEh4woOxzmds9+53VDQHa5jBwBqes/nxP8orWOry8XZzZkjsGR HJ/0WhJK5w39nqo1TgSCQy5V34U0y8RGq3KMKCkxaBYFxfV065E7r87FHkWN8SIVU3ib cXuerp7nGk0JHI3ohSRUP0PvPf8Y4cyfBCWMGkwZvWBaZAUeWwyaN6QK7UIiUVk478Ik mXcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vijrYlpr; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dfade94ed5si115226756d6.235.2025.01.14.03.48.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jan 2025 03:48:35 -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=vijrYlpr; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tXfOL-0004RD-Qt; Tue, 14 Jan 2025 06:47:30 -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 1tXfNu-0004LO-HM for qemu-devel@nongnu.org; Tue, 14 Jan 2025 06:47:05 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tXfNr-0006fH-P0 for qemu-devel@nongnu.org; Tue, 14 Jan 2025 06:47:02 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4364a37a1d7so55744465e9.3 for ; Tue, 14 Jan 2025 03:46:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736855217; x=1737460017; 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=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; b=vijrYlprhGqX1iu7WH3ORyZsxOOWHG4e9/efInhI+NYED4kmwpYMnDzXzXYLm+9PIE XxW+MQ5tLr0TImb+dkhkB8Lzz8GCZ5wPHmRgI8xrgntEtziJHQYOlcMqgS3XtRoJXdPD GFoOc/a8RWQ39d8b6duNH09vl9r/xprE8fSp/HCT/igOx+4f1zJZxc1EjFdvxCfspT11 q6USTQFHHHxoORCRgqZvrmdY+2h/PSCvxk61wL1SooB/fo3vZYLPr5JeQpTIzp1NYiu4 Wu7pfNeUocE8wCpkH6XcDTud5oCUMWDylSJUiXxpGwrguDp9PRrEtWSFKN/w9liFtQvL 6Awg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736855217; x=1737460017; 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=pERnavJS02WsVkpfgEIKcxRU3EPSk+CF5JdtAAMvhiw=; b=xQDOBxI+vYROwtkzeRGOE+EjOEnwkpjE20rK8Co1qRPrO+CRjtKGWvw0ZX3lkHAA1I 6CUI+R2f2MvdkkArhgHGmthbjw27RC330khMFobWMYBM74kINsZmjBo4AaLNM5HykUJe CYpDgRwOEtw0w0+x54ZzvvRe6Mz8Fyx6AbsNP+AbhBFyVMcBzzwDV9VU6qEjBz/K2zlJ 9CmfrCbwBO0YXofFaU6pCIla5TAs3S12bvC2SrW6Y9z23yuVI9zl/MgG3zsvWIvEcOZ/ E73fH25mNEv81w8kNrbBKB1xVWO4O8a64wf8a2WfRZOwtRLRbvxIFuGdSdqvefxzWe/K YZ/w== X-Gm-Message-State: AOJu0YxLDgPZoRfJEk+SGH0l6FZfVhhR+HVPQOQNjPPrq1WP1PXcJ5lH lS9FzYEA/Ax1Bi2eJqC98+kE7HxXtkBrfUzGhsBPSytEBr6qwuaZdkpfWuQZ6UQ= X-Gm-Gg: ASbGnctnxG5uUOvUAwaJ7p2oaql1ZLALnZ/AjOX1ZMZaBO7zQvRioc0ZgF8iGvLdSa7 ZdBKBhIc6z2cbBoPStVOfZHnfBZ2W79HangA8TXiEKh1L0XTqAy9K5zUD80Sj6ES9LpKkVV6A7f Z8B1RWf/ylr45zaUMhAwtFiytmeTG2Wyd5L2So1YQPV4A30e1p6f+gYoPbyCyIEOuy3RVJxMTBB oeHdwOK0AWfVmzl+YEhm36RgLD4JQuJ7GKrVzGygwY5nG9CXtBNids= X-Received: by 2002:a05:600c:1e09:b0:436:e751:e445 with SMTP id 5b1f17b1804b1-436e751e61fmr232295415e9.5.1736855217542; Tue, 14 Jan 2025 03:46:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fc5csm173943915e9.2.2025.01.14.03.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 03:46:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A20F45FA1B; Tue, 14 Jan 2025 11:38:23 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Weil , Pierrick Bouvier , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH v2 20/37] contrib/plugins/hotpages: fix 32-bit build Date: Tue, 14 Jan 2025 11:38:04 +0000 Message-Id: <20250114113821.768750-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250114113821.768750-1-alex.bennee@linaro.org> References: <20250114113821.768750-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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 From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20241217224306.2900490-11-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c7..c6e6493719 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -103,7 +103,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { page_mask = (page_size - 1); - pages = g_hash_table_new(NULL, g_direct_equal); + pages = g_hash_table_new(g_int64_hash, g_int64_equal); } static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, @@ -130,12 +130,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, page &= ~page_mask; g_mutex_lock(&lock); - count = (PageCounters *) g_hash_table_lookup(pages, GUINT_TO_POINTER(page)); + count = (PageCounters *) g_hash_table_lookup(pages, &page); if (!count) { count = g_new0(PageCounters, 1); count->page_address = page; - g_hash_table_insert(pages, GUINT_TO_POINTER(page), (gpointer) count); + g_hash_table_insert(pages, &count->page_address, count); } if (qemu_plugin_mem_is_store(meminfo)) { count->writes++;