From nobody Thu Jan 26 22:11:58 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 4P2w0t67Dlz3c8KQ; Thu, 26 Jan 2023 22:11:58 +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 4P2w0t4wXxz3w2s; Thu, 26 Jan 2023 22:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674771118; 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=XkZaHgElRXOlXftnCfomhBSKnFUXgZLVAZ9fypDGUIc=; b=jqVJt1wB2sphEd/kR3FGK9QjokbWnUEXSk0iFBj5KTCoVU4OJme3cRDzQB6uW/MF4tuZrm 4OUzQDDY9ThXEtWSdOlIKToG428ZTwJsHKwWXDy205E/M6ZMY9kY0p0TJ4lbhKiCfGJHTd tJcbqlYBatqP1tWSx63So7SgXTylQHNRZiHkKgwTv9tGOZ4feuTngFK2UG1G1uboZEhwil xCwqGEXDvtcNYFfG6SWX94BGNn+bwDHezpZh5nym9sBtnCkLqd2vWxxN6YMcf0BPZdu6OY fJ0A0GzdjweMrGuTU3b5MLES7GFbCeIUav0UQFSOGBoG/7kI5OXOx3xotf95Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674771118; 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=XkZaHgElRXOlXftnCfomhBSKnFUXgZLVAZ9fypDGUIc=; b=i0eSzQuOyLV05nBGknE8p6Nxo3CkZ/59RsgtGo5eJGTab4eDFANHiAs8XA4hfF+s+hvM4L EUutn9c5+N9+M09dWmEa1km9ZYSSbt8Lu/qSYGyUVy7THGCmFViBB5Sp1q8a3Aa9Hmn/JF D/NLKkLrGkGpYhPHlRpFl6m5xGOflCZBopk0T4ERVJD+gq4p+G+f+gkrIvtp+PDwNGHlbj cq3Bj2n3vDaDmDU+AOaH/J4mPTIPzSAVyG0JiRWlsLWnT350PFBzJc6UK3nd/bnB7c1FxH nhr/ZXjCtOmj5AqMLwyz8zBaOEWNZhiEdNLd0/eNAzJQMf1QhikGwi0dOS9xZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674771118; a=rsa-sha256; cv=none; b=hX1kJbnDo2l5BhXfkf/ckBkeN7RSOyENO//4SPGL44imWtkZsX9YbyQVds//Yn3oyp1E0p wnV+SbDkDX/6eVmfcNQBSF0KCv9ZYtUsMuEQ9RT4Fz+76z56Eds4qLz7YTDDSrtLD8TTtb JC92+zjFPBbmfUHjDwnWTJFOkf0BCdnAL1a5WPEHwr+1Hp0EkNFNX71QDdfy1oQWdJw+HT fU94UJdoPR+/K0O2X4O2TvC/EiP0v0IWb2oL7zkAnP/w7pTc6pyJu81ODeu5pHQwrrHYZR PkzPkLFOjMRmKjiCuiRiRAizYkqhwBgTXDLRkwLiPZC3hB+ofxZlHAaeHm4KKg== 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 4P2w0t3dx1zlxr; Thu, 26 Jan 2023 22:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30QMBwSV022055; Thu, 26 Jan 2023 22:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30QMBwYO022054; Thu, 26 Jan 2023 22:11:58 GMT (envelope-from git) Date: Thu, 26 Jan 2023 22:11:58 GMT Message-Id: <202301262211.30QMBwYO022054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6325451815cd - stable/13 - vmm: Remove support for vm_rendezvous with a cpuid of -1. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6325451815cdb3f4c551002f7f02bcce193e3422 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6325451815cdb3f4c551002f7f02bcce193e3422 commit 6325451815cdb3f4c551002f7f02bcce193e3422 Author: John Baldwin AuthorDate: 2022-11-18 18:03:23 +0000 Commit: John Baldwin CommitDate: 2023-01-26 22:02:10 +0000 vmm: Remove support for vm_rendezvous with a cpuid of -1. This is not currently used. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37164 (cherry picked from commit 949f0f47a4e774fea7222923440851c612a3f6fa) --- sys/amd64/vmm/vmm.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index d71ebcc116b0..f92b89bbb732 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -1319,21 +1319,13 @@ vcpu_require_state_locked(struct vm *vm, int vcpuid, enum vcpu_state newstate) panic("Error %d setting state to %d", error, newstate); } -#define RENDEZVOUS_CTR0(vm, vcpuid, fmt) \ - do { \ - if (vcpuid >= 0) \ - VCPU_CTR0(vm, vcpuid, fmt); \ - else \ - VM_CTR0(vm, fmt); \ - } while (0) - static int vm_handle_rendezvous(struct vm *vm, int vcpuid) { struct thread *td; int error; - KASSERT(vcpuid == -1 || (vcpuid >= 0 && vcpuid < vm->maxcpus), + KASSERT(vcpuid >= 0 && vcpuid < vm->maxcpus, ("vm_handle_rendezvous: invalid vcpuid %d", vcpuid)); error = 0; @@ -1343,8 +1335,7 @@ vm_handle_rendezvous(struct vm *vm, int vcpuid) /* 'rendezvous_req_cpus' must be a subset of 'active_cpus' */ CPU_AND(&vm->rendezvous_req_cpus, &vm->rendezvous_req_cpus, &vm->active_cpus); - if (vcpuid != -1 && - CPU_ISSET(vcpuid, &vm->rendezvous_req_cpus) && + if (CPU_ISSET(vcpuid, &vm->rendezvous_req_cpus) && !CPU_ISSET(vcpuid, &vm->rendezvous_done_cpus)) { VCPU_CTR0(vm, vcpuid, "Calling rendezvous func"); (*vm->rendezvous_func)(vm, vcpuid, vm->rendezvous_arg); @@ -1357,7 +1348,7 @@ vm_handle_rendezvous(struct vm *vm, int vcpuid) wakeup(&vm->rendezvous_func); break; } - RENDEZVOUS_CTR0(vm, vcpuid, "Wait for rendezvous completion"); + VCPU_CTR0(vm, vcpuid, "Wait for rendezvous completion"); mtx_sleep(&vm->rendezvous_func, &vm->rendezvous_mtx, 0, "vmrndv", hz); if ((td->td_flags & TDF_NEEDSUSPCHK) != 0) { @@ -2579,7 +2570,7 @@ vm_smp_rendezvous(struct vm *vm, int vcpuid, cpuset_t dest, * Enforce that this function is called without any locks */ WITNESS_WARN(WARN_PANIC, NULL, "vm_smp_rendezvous"); - KASSERT(vcpuid == -1 || (vcpuid >= 0 && vcpuid < vm->maxcpus), + KASSERT(vcpuid >= 0 && vcpuid < vm->maxcpus, ("vm_smp_rendezvous: invalid vcpuid %d", vcpuid)); restart: @@ -2590,7 +2581,7 @@ restart: * call the rendezvous handler in case this 'vcpuid' is one * of the targets of the rendezvous. */ - RENDEZVOUS_CTR0(vm, vcpuid, "Rendezvous already in progress"); + VCPU_CTR0(vm, vcpuid, "Rendezvous already in progress"); mtx_unlock(&vm->rendezvous_mtx); error = vm_handle_rendezvous(vm, vcpuid); if (error != 0) @@ -2600,7 +2591,7 @@ restart: KASSERT(vm->rendezvous_func == NULL, ("vm_smp_rendezvous: previous " "rendezvous is still in progress")); - RENDEZVOUS_CTR0(vm, vcpuid, "Initiating rendezvous"); + VCPU_CTR0(vm, vcpuid, "Initiating rendezvous"); vm->rendezvous_req_cpus = dest; CPU_ZERO(&vm->rendezvous_done_cpus); vm->rendezvous_arg = arg;