From nobody Tue Jul 25 12:51:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R9H2d0Q9mz4pkgK; Tue, 25 Jul 2023 12:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R9H2c6mT9z3LjC; Tue, 25 Jul 2023 12:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690289464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ynpt83nzbP7WxeQIV2ENmvLpnw52rkKf2wqG6qX7lRE=; b=XQ6gBmyAA9sVFgFqZryNxhoPDI7RWUNDnqZH3DHiHWqyl+BCAopOEyXkIhN9HM/uvHQ1+z tmtZikPyikPkkteE87KkCadev878YYrq2JaldFXyfi1HRLVC8mWpprdD2JEDl++rbb1DCF 3QzyCkj5DrQXO/ATqTrn3HoX1+7gqUgpzpRdzBpgjZum7Z+pXbZg7teJrvUGrOCtnFeV3N p4BHpopjsaQHJyaH8MHSV9ZLM8PDyeG6H2cqlhYOJBaxNe1tatUCjLRAJjZjDEAu0Gvb67 MN0g7iMUCbTyBIVls21AfbW3XoclWwpcm1HmnBkWQcoJ5orJtHivOdEMFPlLNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690289464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ynpt83nzbP7WxeQIV2ENmvLpnw52rkKf2wqG6qX7lRE=; b=x4ZWvU9etUy538NfBmL3QxK4xmiWprDwcczGyhPJVdybTLNL3GpXWcx7/4N8XQo5w/iZgE sRDSAaocUCtdt590FsOkFK1Opl9njJp12nKcW8ZNLy8Xsaa9vuqPNBhnei9phi/a9plGJe ht4DrLUFdTcMJTivoAEIiffuBgAwGqUSQnh9ADhWAVKuZjmnQD4DfwHrqcEOAldDlStILt aiTA/SK800+PxvnoCv280J14RZ60KTtHtzKBRxVz+vx9Oz1qc0anoYCYiP2i9KkwgZyUMv ymiiLqMFn6DEq4vl/Su1fnE9Y+OC4KrX5OrS0bzTDpFI2er6ML2+lSdm2FVflg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690289464; a=rsa-sha256; cv=none; b=snbKLaVSkFFxoBRbYgTIj/rm4Zcam77QuQJE7JvBlxaThiKGD85od+KYdvOKzOSmp2d19O ckMj7qsKbYUEh8U9/vM3a56WyPwAJOed0C1VBkLMI1+H3pwcrPvyvb+HgyKOdDPUIUYzXw I1cMNE0CIPGLoKXEzmnKWvnXwRhNFP9I4WSRbOGEq8p7NcdUCjWSs8nFzWBRuBG2ggjtbc iG+J4qKMBdPuWefTuacBsM1ZNTIKWagHl3/r6exgGrCMrQrEQ9sKE+MZkxs7NMvHOhIGI8 YqahVXpf3DLG8GJjyL0uk/yuFVi2EreGsjtx4rRtlW0GNBYNNwjqnDZe9vxGxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R9H2c5rqjz10wt; Tue, 25 Jul 2023 12:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36PCp4qv080097; Tue, 25 Jul 2023 12:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36PCp42v080096; Tue, 25 Jul 2023 12:51:04 GMT (envelope-from git) Date: Tue, 25 Jul 2023 12:51:04 GMT Message-Id: <202307251251.36PCp42v080096@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: 65f8467e3351 - main - bhyvectl: Add '--get-debug-cpus' command List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65f8467e3351c38a9d57b538b85cf6c5fab5818e Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=65f8467e3351c38a9d57b538b85cf6c5fab5818e commit 65f8467e3351c38a9d57b538b85cf6c5fab5818e Author: Vitaliy Gusev AuthorDate: 2023-07-25 12:03:54 +0000 Commit: Corvin Köhne CommitDate: 2023-07-25 12:03:54 +0000 bhyvectl: Add '--get-debug-cpus' command vmm and libvmmapi already have handlers for that. When adding debug cpus, they were only used for the debug stub. Over time, they were reused by other parts like snapshots or idle APs. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: vStack Differential Revision: https://reviews.freebsd.org/D40804 --- usr.sbin/bhyvectl/bhyvectl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index f723ff1f2e82..d786df44dace 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -190,6 +190,7 @@ usage(bool cpu_intel) " [--set-rtc-nvram=]\n" " [--rtc-nvram-offset=]\n" " [--get-active-cpus]\n" + " [--get-debug-cpus]\n" " [--get-suspended-cpus]\n" " [--get-intinfo]\n" " [--get-eptp]\n" @@ -265,7 +266,7 @@ static int force_reset, force_poweroff; static const char *capname; static int create, destroy, get_memmap, get_memseg; static int get_intinfo; -static int get_active_cpus, get_suspended_cpus; +static int get_active_cpus, get_debug_cpus, get_suspended_cpus; static uint64_t memsize; static int set_cr0, get_cr0, set_cr2, get_cr2, set_cr3, get_cr3; static int set_cr4, get_cr4; @@ -1450,6 +1451,7 @@ setup_options(bool cpu_intel) { "force-reset", NO_ARG, &force_reset, 1 }, { "force-poweroff", NO_ARG, &force_poweroff, 1 }, { "get-active-cpus", NO_ARG, &get_active_cpus, 1 }, + { "get-debug-cpus", NO_ARG, &get_debug_cpus, 1 }, { "get-suspended-cpus", NO_ARG, &get_suspended_cpus, 1 }, { "get-intinfo", NO_ARG, &get_intinfo, 1 }, { "get-cpu-topology", NO_ARG, &get_cpu_topology, 1 }, @@ -2347,6 +2349,12 @@ main(int argc, char *argv[]) print_cpus("active cpus", &cpus); } + if (!error && (get_debug_cpus || get_all)) { + error = vm_debug_cpus(ctx, &cpus); + if (!error) + print_cpus("debug cpus", &cpus); + } + if (!error && (get_suspended_cpus || get_all)) { error = vm_suspended_cpus(ctx, &cpus); if (!error)