From nobody Mon May 13 03:27:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1710952908; cv=none; d=zohomail.com; s=zohoarc; b=C1HzyZAtVRAGzZYO6w9En9xICJNuiDoSgdQ9o1jCdA3ixXsdPAkG8Cl74VaGUBqgYCmSeL+JPw3aI8pBLKrCReT09nnA6/F9MCGl+IfCCJrwYj5TpC88MBiXlH/k249qOHggk4DEovlqyXlJWY/6sZ5UM9gd+H6bZQlesQtpSys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710952908; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uBipDkgk2OtHXrYLE6niKLfwVNhjxBZzSEhQS339zKI=; b=cUj1GGJYU007Cmf/AO5YngwjoHayI16nxwIzRP2L3pYGzYaoFjRaiulxyDwlAj6cbF3z36/rW/oR0DRDZWOFbMwkn1gAOT5LrfmJn6ERgCmqIvBPx8x3xU0kiOaXibshRgpcdb9To+sdzFoTjaTlL3//lk0Vdq1o5n/K4yxv+mg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710952908041202.0843328886897; Wed, 20 Mar 2024 09:41:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmz04-0003Da-2G; Wed, 20 Mar 2024 12:41:12 -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 1rmz03-0003D3-5w for qemu-devel@nongnu.org; Wed, 20 Mar 2024 12:41:11 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmyzy-0008QK-Pc for qemu-devel@nongnu.org; Wed, 20 Mar 2024 12:41:10 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-512bde3d197so72985e87.0 for ; Wed, 20 Mar 2024 09:41:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.156.105]) by smtp.gmail.com with ESMTPSA id fs7-20020a05600c3f8700b00414038162e1sm2668663wmb.23.2024.03.20.09.41.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 20 Mar 2024 09:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710952864; x=1711557664; 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=uBipDkgk2OtHXrYLE6niKLfwVNhjxBZzSEhQS339zKI=; b=ohFmiGS2BY2CP1/yiDcGfK/3+rp8rXqWXvA9w4csDmzV5SZGLi+MUYXypMbGjX7Mdi MawWrg/CBtwNe71+lbNvnxKpa/cslw91/G/lHCCW+20cMBxW15FJAUTlK/xS6gW3S6Ie FM+OlQQYkYl6uKdJae04TMNrstnqc3QhD4eD3aZqksplweVoXmuBasB5zP7Gp/xjkaCu Vd+iMYDsi1NYyOHmk9Srl9pPTA0ReHz47xnKYP13w9pCr6wFSFRsvkEfAamjd8LwNTnK UydnGDx7SX/KazDiR8gScP59i5eNxrSWeDbil9nWfWpazNiTQLD3muIUFL846Tm7C/BE lPaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710952864; x=1711557664; 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=uBipDkgk2OtHXrYLE6niKLfwVNhjxBZzSEhQS339zKI=; b=IUqLYEtmZ9VZ4EqjiUUPjoFWt29sAryzydhdp8zJLhz4lLM2shcMkTS+fnWn32CIOk 8QdWxD03UVrZFQ/E3G4S5aA1ZYjqcrdNDaceQsyEL982Ll/kYXlIuxZJ8fpwn20QTihu I9RZJYUd/DV7IRlWEZ2KxZ8PKBGYyvGQZ+VFPC8mWG5cDVOWnKKRrQXLiGDntONGAOX3 IOD1ZXNI9iqXKys/HV+EdV0M/LyoHAveFczma6rjjf9BE186hFY3y5ncAptTzxd/0MkA eAp7k81Y5ngoyPE13qch9gVMFLEmTrsLbJTGwdyq/BZxMEEoC8yfOD83yjJ0cjtAFTu2 MONA== X-Gm-Message-State: AOJu0YzNna01tjhWalA3Cb8HdG5scq3vtO3APBGhwwiT8qTrQylvFv3f 7HfZmXTZ+yq2Gz1j7Jb5rByGfvmE7n38+z9zCcstlXC05x8IZEdYUyuFRSo9F180VXGfDDH2RsM 0 X-Google-Smtp-Source: AGHT+IHtrf4rG044ck65QzHkds4K+JnxF6D35WRfN/7fWRlib9Sk+BwJCK0bTKXtEX22KIpSpz+E1A== X-Received: by 2002:a19:770e:0:b0:513:e47d:614d with SMTP id s14-20020a19770e000000b00513e47d614dmr4932908lfc.37.1710952864623; Wed, 20 Mar 2024 09:41:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Richard Henderson , Peter Maydell , "Dr. David Alan Gilbert" , Manos Pitsidianakis , qemu-ppc@nongnu.org, Thomas Huth , devel@lists.libvirt.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 1/2] target/monitor: Introduce 'info mmu' command Date: Wed, 20 Mar 2024 17:40:54 +0100 Message-ID: <20240320164055.60319-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240320164055.60319-1-philmd@linaro.org> References: <20240320164055.60319-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710952909376100003 Introduce the 'info mmu' command. For now it only forward to the 'info tlb' and 'info mem' commands, which will be deprecated. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/monitor/hmp-target.h | 1 + monitor/hmp-cmds-target.c | 37 ++++++++++++++++++++++++++++++++++++ hmp-commands-info.hx | 14 ++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index d78e979f05..2af84b1915 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -44,6 +44,7 @@ int target_get_monitor_def(CPUState *cs, const char *name= , uint64_t *pval); CPUArchState *mon_get_cpu_env(Monitor *mon); CPUState *mon_get_cpu(Monitor *mon); =20 +void hmp_info_mmu(Monitor *mon, const QDict *qdict); void hmp_info_mem(Monitor *mon, const QDict *qdict); void hmp_info_tlb(Monitor *mon, const QDict *qdict); void hmp_mce(Monitor *mon, const QDict *qdict); diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 9338ae8440..71bce4870a 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "sysemu/hw_accel.h" +#include "sysemu/tcg.h" =20 /* Set the current CPU defined by the user. Callers must hold BQL. */ int monitor_set_cpu(Monitor *mon, int cpu_index) @@ -379,3 +380,39 @@ void hmp_gpa2hpa(Monitor *mon, const QDict *qdict) memory_region_unref(mr); } #endif + +__attribute__((weak)) +void hmp_info_mem(Monitor *mon, const QDict *qdict) +{ + monitor_puts(mon, + "No per-CPU mapping information available on this target\= n"); +} + +__attribute__((weak)) +void hmp_info_tlb(Monitor *mon, const QDict *qdict) +{ + monitor_puts(mon, + "No per-CPU TLB information available on this target\n"); +} + +void hmp_info_mmu(Monitor *mon, const QDict *qdict) +{ + bool tlb =3D qdict_get_try_bool(qdict, "tlb", false); + bool mem =3D qdict_get_try_bool(qdict, "mem", false); + + if (!tcg_enabled()) { + monitor_puts(mon, "This command is specific to TCG accelerator\n"); + return; + } + + if (!tlb && !mem) { + tlb =3D mem =3D true; + } + + if (mem) { + hmp_info_mem(mon, qdict); + } + if (tlb) { + hmp_info_tlb(mon, qdict); + } +} diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index ad1b1306e3..e31f2467fb 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -208,6 +208,20 @@ SRST Show PCI information. ERST =20 + { + .name =3D "mmu", + .args_type =3D "tlb:-t,mem:-m", + .params =3D "[-t][-m]", + .help =3D "show virtual to physical memory " + "(-t: TLB; -m: active mapping)", + .cmd =3D hmp_info_mmu, + }, + +SRST + ``info mmu`` + Show virtual to physical memory mappings. +ERST + #if defined(TARGET_I386) || defined(TARGET_SH4) || defined(TARGET_SPARC) |= | \ defined(TARGET_PPC) || defined(TARGET_XTENSA) || defined(TARGET_M68K) { --=20 2.41.0 From nobody Mon May 13 03:27:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1710952915; cv=none; d=zohomail.com; s=zohoarc; b=lGnTUjuw6Ver83ibOyMCh1arHZsHkH1+ySQyZP9E3dBOP/PBOiu8YOTAd1P4RCm4V6i2DtXNMVPxfw49ejHYsLL3GNTQddAGuuodxYnx2JxsH/4qHA9p5W97zkHv4ySTOaQGLBpTlc2OeLzM69Fb1AyW+Ag4gcZ3jKmXtkk7ws4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710952915; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+MGzMRq8+oQNHPDVeF5CNwlMfCJsHa78ZS0ftBV8+1s=; b=I3bNLgpKVLWKA0Y8dGS2frNs7N89XaBBdI8ZbyaGJBaZBdLIXbXK6lF7jTUGVZp4zG/msuurvMiExw1P1NELu8oA+ftMvKmdJ7lc3G8gDR/QKTZP8u4xdy9EpEh1g3+0VaHnqh+9OjX9l3FZXc6lG21Qj+VKKX7UZV/a7L1XDEs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710952915837562.7490622039331; Wed, 20 Mar 2024 09:41:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmz0G-0003MY-K2; Wed, 20 Mar 2024 12:41:24 -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 1rmz0E-0003L1-Bj for qemu-devel@nongnu.org; Wed, 20 Mar 2024 12:41:22 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmz06-0008RQ-Kw for qemu-devel@nongnu.org; Wed, 20 Mar 2024 12:41:22 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-513e10a4083so86550e87.1 for ; Wed, 20 Mar 2024 09:41:14 -0700 (PDT) Received: from m1x-phil.lan ([176.176.156.105]) by smtp.gmail.com with ESMTPSA id x11-20020a5d60cb000000b0033eca2cee1asm15131511wrt.92.2024.03.20.09.41.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 20 Mar 2024 09:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710952872; x=1711557672; 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=+MGzMRq8+oQNHPDVeF5CNwlMfCJsHa78ZS0ftBV8+1s=; b=gfRAEVYkeMTqL3YEGlzNlTGYXSkLeHDKHwTx61+Q5TTtUQrMf5BlPuLCco9OXWAD+r uUC96TE2HowH902/0AdA/BhyV7Jul61MIp5AB2mMKROsxBRZbJGSVPLYC6EqTCO529Il tDfOQEwxWtlgxRNFNzJdVhVG34T5ElawQLrQ8NyapJVkkXXALwZLo2tGAiDbVUbw0DbA GwEfApFIzXS895tkXyx7OJ2w8HY+9Ixxc1qVgueGYQX1uTmFfL2TgF2xeiWNFzVoRWDC RR2IY+9MYZRNd5Kil+cgAwEzk6jmFYdt+0bStECm3dZkwpbvKccErIqstQR5CTUg5eW0 JO+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710952872; x=1711557672; 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=+MGzMRq8+oQNHPDVeF5CNwlMfCJsHa78ZS0ftBV8+1s=; b=fYBCAYUb6Zof+yVQdiDkQSqYfehEXua/9xcnAHVcTkMymzKMZvWrz37pURic5hvoKu 3iMx7Wvtn+xd8xyOmSABRSenv2vvDcA2bL+5CNust0rVjds5rkm0fXOZJbjezq6BTf+m Ggynpuo+EBWbG1lRt/amkyoEbbrOp5MNNX9kQDtuLuXrIm7vPqMz0hl1QcdOM8NGZqzJ zHSXb0L0pbnSiL6rglFdW8qXnjpGpS6Ojl47gn+Z1CjCcOeCmdVwmKVeKIKhwv7il17m Jdaqf2QwE7++A9A63w+XWkk9kpN5Gh0lO+RiQnnr0TTmqRqIldFwx/XSacVRMxiauQOz 8Osg== X-Gm-Message-State: AOJu0YwUQTBGoQ9xJYEjezxZHq2rgAJuSPbmkyVmj5Rm2LKfuluc/7C+ JESWz5E33YppEWacTvCuSjcMWh2JpsuRl6hKWIyjW9hw+AY7ZHRxLA5GpCA2sYcZnQG8oGGh2O/ j X-Google-Smtp-Source: AGHT+IGyIcGj6kJEYwSOFV207y3u8LtBd+6FQA7rHX4T0Ccn2tiB/M1/bssgAa0PLO1UIhpWj86oAw== X-Received: by 2002:a05:6512:3687:b0:513:b1d7:6d07 with SMTP id d7-20020a056512368700b00513b1d76d07mr11689233lfs.58.1710952872399; Wed, 20 Mar 2024 09:41:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Richard Henderson , Peter Maydell , "Dr. David Alan Gilbert" , Manos Pitsidianakis , qemu-ppc@nongnu.org, Thomas Huth , devel@lists.libvirt.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Chris Wulff , Marek Vasut , Nicholas Piggin , Daniel Henrique Barboza , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Liu Zhiwei , Yoshinori Sato , Mark Cave-Ayland , Artyom Tarasenko , Max Filippov Subject: [PATCH-for-9.0 2/2] target/monitor: Deprecate 'info tlb' and 'info mem' commands Date: Wed, 20 Mar 2024 17:40:55 +0100 Message-ID: <20240320164055.60319-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240320164055.60319-1-philmd@linaro.org> References: <20240320164055.60319-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710952917434100003 'info tlb' has been replaced by 'info mmu -t', and 'info mem' by 'info mmu -m'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/about/deprecated.rst | 10 ++++++++++ include/monitor/hmp-target.h | 2 ++ monitor/hmp-cmds-target.c | 20 ++++++++++++++++---- target/i386/monitor.c | 4 ++-- target/m68k/monitor.c | 2 +- target/nios2/monitor.c | 2 +- target/ppc/ppc-qmp-cmds.c | 2 +- target/riscv/monitor.c | 2 +- target/sh4/monitor.c | 2 +- target/sparc/monitor.c | 2 +- target/xtensa/monitor.c | 2 +- hmp-commands-info.hx | 8 ++++---- 12 files changed, 41 insertions(+), 17 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 7b548519b5..4f5f4becbe 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -158,6 +158,16 @@ points was removed in 7.0. However QMP still exposed t= he vcpu parameter. This argument has now been deprecated and the remaining remaining trace points that used it are selected just by name. =20 +Human Monitor Protocol (HMP) commands +------------------------------------- + +``info tlb`` and ``info mem`` (since 9.0) +''''''''''''''''''''''''''''''''''''''''' + +The ``info tlb`` and ``info mem`` commands have been replaced by +the ``info mmu`` command, which has the same behaviour but a less +misleading name. + Host Architectures ------------------ =20 diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index 2af84b1915..057f7c6841 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -46,7 +46,9 @@ CPUState *mon_get_cpu(Monitor *mon); =20 void hmp_info_mmu(Monitor *mon, const QDict *qdict); void hmp_info_mem(Monitor *mon, const QDict *qdict); +void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict); void hmp_info_tlb(Monitor *mon, const QDict *qdict); +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict); void hmp_mce(Monitor *mon, const QDict *qdict); void hmp_info_local_apic(Monitor *mon, const QDict *qdict); void hmp_info_sev(Monitor *mon, const QDict *qdict); diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 71bce4870a..086b58b8d6 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -382,19 +382,31 @@ void hmp_gpa2hpa(Monitor *mon, const QDict *qdict) #endif =20 __attribute__((weak)) -void hmp_info_mem(Monitor *mon, const QDict *qdict) +void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict) { monitor_puts(mon, "No per-CPU mapping information available on this target\= n"); } =20 __attribute__((weak)) -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { monitor_puts(mon, "No per-CPU TLB information available on this target\n"); } =20 +void hmp_info_mem(Monitor *mon, const QDict *qdict) +{ + monitor_puts(mon, "This command is deprecated, please use 'info mmu -m= '\n"); + hmp_info_mem_deprecated(mon, qdict); +} + +void hmp_info_tlb(Monitor *mon, const QDict *qdict) +{ + monitor_puts(mon, "This command is deprecated, please use 'info mmu -t= '\n"); + hmp_info_tlb_deprecated(mon, qdict); +} + void hmp_info_mmu(Monitor *mon, const QDict *qdict) { bool tlb =3D qdict_get_try_bool(qdict, "tlb", false); @@ -410,9 +422,9 @@ void hmp_info_mmu(Monitor *mon, const QDict *qdict) } =20 if (mem) { - hmp_info_mem(mon, qdict); + hmp_info_mem_deprecated(mon, qdict); } if (tlb) { - hmp_info_tlb(mon, qdict); + hmp_info_tlb_deprecated(mon, qdict); } } diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 3a281dab02..5da77b6b22 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -217,7 +217,7 @@ static void tlb_info_la57(Monitor *mon, CPUArchState *e= nv) } #endif /* TARGET_X86_64 */ =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env; =20 @@ -545,7 +545,7 @@ static void mem_info_la57(Monitor *mon, CPUArchState *e= nv) } #endif /* TARGET_X86_64 */ =20 -void hmp_info_mem(Monitor *mon, const QDict *qdict) +void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env; =20 diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c index 2bdf6acae0..ea303805c4 100644 --- a/target/m68k/monitor.c +++ b/target/m68k/monitor.c @@ -10,7 +10,7 @@ #include "monitor/hmp-target.h" #include "monitor/monitor.h" =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); =20 diff --git a/target/nios2/monitor.c b/target/nios2/monitor.c index 0152dec3fa..2e4efee1aa 100644 --- a/target/nios2/monitor.c +++ b/target/nios2/monitor.c @@ -27,7 +27,7 @@ #include "monitor/hmp-target.h" #include "monitor/hmp.h" =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); =20 diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c index a25d86a8d1..891fdc44ef 100644 --- a/target/ppc/ppc-qmp-cmds.c +++ b/target/ppc/ppc-qmp-cmds.c @@ -80,7 +80,7 @@ static target_long monitor_get_tbl(Monitor *mon, const st= ruct MonitorDef *md, return cpu_ppc_load_tbl(env); } =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); =20 diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c index f5b1ffe6c3..00f2a22f11 100644 --- a/target/riscv/monitor.c +++ b/target/riscv/monitor.c @@ -208,7 +208,7 @@ static void mem_info_svxx(Monitor *mon, CPUArchState *e= nv) last_paddr + last_size - pbase, last_attr); } =20 -void hmp_info_mem(Monitor *mon, const QDict *qdict) +void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env; =20 diff --git a/target/sh4/monitor.c b/target/sh4/monitor.c index 2da6a5426e..ad6f21defe 100644 --- a/target/sh4/monitor.c +++ b/target/sh4/monitor.c @@ -39,7 +39,7 @@ static void print_tlb(Monitor *mon, int idx, tlb_t *tlb) tlb->d, tlb->wt); } =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env =3D mon_get_cpu_env(mon); int i; diff --git a/target/sparc/monitor.c b/target/sparc/monitor.c index 73f15aa272..95e6217568 100644 --- a/target/sparc/monitor.c +++ b/target/sparc/monitor.c @@ -28,7 +28,7 @@ #include "monitor/hmp.h" =20 =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); =20 diff --git a/target/xtensa/monitor.c b/target/xtensa/monitor.c index fbf60d5553..92bfad8129 100644 --- a/target/xtensa/monitor.c +++ b/target/xtensa/monitor.c @@ -27,7 +27,7 @@ #include "monitor/hmp-target.h" #include "monitor/hmp.h" =20 -void hmp_info_tlb(Monitor *mon, const QDict *qdict) +void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict) { CPUArchState *env1 =3D mon_get_cpu_env(mon); =20 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index e31f2467fb..0066b49ceb 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -228,14 +228,14 @@ ERST .name =3D "tlb", .args_type =3D "", .params =3D "", - .help =3D "show virtual to physical memory mappings", + .help =3D "deprecated synonym for 'info mmu -t'", .cmd =3D hmp_info_tlb, }, #endif =20 SRST ``info tlb`` - Show virtual to physical memory mappings. + This is a deprecated synonym for the mmu command. ERST =20 #if defined(TARGET_I386) || defined(TARGET_RISCV) @@ -243,14 +243,14 @@ ERST .name =3D "mem", .args_type =3D "", .params =3D "", - .help =3D "show the active virtual memory mappings", + .help =3D "deprecated synonym for 'info mmu -m'", .cmd =3D hmp_info_mem, }, #endif =20 SRST ``info mem`` - Show the active virtual memory mappings. + This is a deprecated synonym for the mmu command. ERST =20 { --=20 2.41.0