From nobody Fri Aug 18 07:18:49 2023 X-Original-To: dev-commits-src-all@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 4RRtX962tYz4qq32; Fri, 18 Aug 2023 07:18:49 +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 4RRtX94Yv9z4fBB; Fri, 18 Aug 2023 07:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692343129; 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=0PdCezLeZANGrksxA6NZCbHO58IM6FZDbVAOpzoDGOw=; b=hyQXPDv+JtX1upvcb+IsIrFKEYprbElKHxK6vki5cWYvi4UdUh74BH0xqCu5gA2nd949nN ZyDgqJjE+fcSmRwzFvRtaOPURnrei7YQKh2TPjuvuL4C3elb9BfTv6HCtmNCtM4CI5zgDD rq4/mfTR3nqvh/nXsIwb+BFUMdWsfHXUhh86K6rNMxoSNfCkGhmyOb32g1YY60fN6GcEUR lB0YFEFvAD6iB+k8vWDEDqF7V499pDK25UsDECDfBxo14xXNIIrTIVcvWmzM/AgHnnYL0I xrvR69McvSxDQOnW3pdvpEjXN/lwaFKqS1Ev6LFCTyhdemdDIAWPZ5GLkvCriA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692343129; 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=0PdCezLeZANGrksxA6NZCbHO58IM6FZDbVAOpzoDGOw=; b=a7Mh0GUCr18GuJSozt1iz1r6sja5SO7SUUR3eOY/uzOnkF0znR3gKN5zfnsKj7g3ktjJn5 /sxDsoPiBTv5Ipj8viWNSRTlFFkdUF1X4YDSmmBytmOCrvrKo5t0tx2yH14QkEl2ozlpNG mRfxFOrZAnHLXZl+ycV09p/p2jwkXzw52NMVNYwKpE+NU2MAsXGge36lXbIZ4IcM6kT9uL T4/mQylxrX61iYzVfs4Nz1Bd/wVcR/Tct81j0r5FcN/1nSVRo9EldcKrFOEmQ67THN3gQM GqYYjt/BzqwW7aYLp1/m99k6cY3MP2VbCF63+LBzI2tcGcgI/dumY1VPTphFCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692343129; a=rsa-sha256; cv=none; b=UPa99R4QeNm878KNYq37jCD2U4UZrL2Y2XCeVRFuFuE1jQlMoaF6tYW2gzE6oXpVpgIWNx LeJlyY+49nF0sYdTy1mp4sbpYTfkz/RbyxWS/+eDGrW4xJPPDNsWat/onuDgh2MguHg+DV 6Uol81sDgADvkZi9GTmPqDSvqmYbipQw1lTXaiEVx+SSTVL/eFdVqPU1RST4H0Y4albZ8k J6xDXwArAJeUpmMwbtBnKUfzsFZh2zcl0p4WzA3/hGeYwkwqMhzyuvMFfdW2Dq1e0VTW+w KcobYJZcsAFG+9eYDRT2gZgY+Ebdbdhs5UVDg1AHkvbdLElrRPCj7aaj+f+tdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RRtX93fmcz16Sb; Fri, 18 Aug 2023 07:18:49 +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 37I7Inn0017752; Fri, 18 Aug 2023 07:18:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37I7In4P017749; Fri, 18 Aug 2023 07:18:49 GMT (envelope-from git) Date: Fri, 18 Aug 2023 07:18:49 GMT Message-Id: <202308180718.37I7In4P017749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 8caac07ce933 - stable/13 - bhyvectl: Add '--get-debug-cpus' command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8caac07ce933a5d8c3a57e12d6b1537c6235d712 Auto-Submitted: auto-generated The branch stable/13 has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=8caac07ce933a5d8c3a57e12d6b1537c6235d712 commit 8caac07ce933a5d8c3a57e12d6b1537c6235d712 Author: Vitaliy Gusev AuthorDate: 2023-07-25 12:03:54 +0000 Commit: Corvin Köhne CommitDate: 2023-08-18 07:04:26 +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 (cherry picked from commit 65f8467e3351c38a9d57b538b85cf6c5fab5818e) --- 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 2a022c550d54..dfa523ea16c8 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 }, @@ -2324,6 +2326,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)