From nobody Tue Jan 07 02:19:37 2025 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 4YRvrV0pfdz5kctl; Tue, 07 Jan 2025 02:19:38 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YRvrT5Hf2z4Lmb; Tue, 7 Jan 2025 02:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736216377; 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=0LngD/dh5DxEG1Tv1noB4MMZSPpo5UJSVBcoSo4pEs4=; b=UNYlF75Grg5V3Ez3up84MhGvx9OryGs9NtWt+VrprYBUwTqyAS0uN/QPk2Gp/RSUimbN8z A6aIU7jV5boRSNHDKqJyEUk5nBWE5B7xk/aDmKR6ecUAptlpOEXmMxE5WqFUKBbuq5veqO x1lgyK2a7aJKz71N++MWGVGfc+vMX6GcoOZMiVPtVOtSY4BeneAYlpEwowtndwu0HxFMa9 /W/AGEZvC25sZ5D0bRiBrWjjy1Sz3opEGScHeDYshmMiZIktw+a+n51XXnBx1/QwKoQPQF YAYNU1Qc0H1+4UAb/Db/XBtR/lfWtMr7jcg3/FMbNP1jBvrvoUxnme5RMeQKxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736216377; 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=0LngD/dh5DxEG1Tv1noB4MMZSPpo5UJSVBcoSo4pEs4=; b=PDtak6m2rXx6mMkN/mDvYKJPZViOjBlc+bbLBDbaATl81UgJmEwOQleZdP0BybAGzuNYai xCM77e10Ut3cCMtPZ+wMkOFzAM+zs3LynAaHIGwRUfgLiXLZywlTvVWZqaaNF/KrjHJC7m FPAB/CndY1E+oJDnDMXRj+dGgT/6geWXGGiXXMYjv6pdgmkLFl6d3Tn6JgcOtJ9Esgxo68 RCkDIPuE1cfAAFzp1bPossHh9ZMEmcZAaJjzE7MZEbKFPHQu+s8BnU8TjQPKkptuanqoW5 el941MfvOU/90VENOcTQPIxpHwBnxfFFFn/1SJvCyLA4UU19B/EEvU1wLh/rrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736216377; a=rsa-sha256; cv=none; b=bixId6PmQti1H/lvOE4r12kFZPmSQjqi+bqboH2VONk5U6SimT2ItUrhShvmWX5x8JcZb3 VgWTDjPqDiK61dD9FodwMzePZHNTNrFFDXBu3UdzSgDxhll6qw41RdT5G0nVVd/IEo7GX/ kXkdt2i4A8bkCzb7pAlK3l8MV807MVFJbEfLji7OcZSS4hBra8i45zO5DgoC9MaRD3JVtc BINJoXK1dkQsnQxHUszCXjpxI/kMo81Oq7KphbAm5MaD4i1knfCnmtD+/zCiviqPGRNIpi DtvfLgg4JjNgACgsoXxEdpkUxQGSawnaz1dXYqRxR0iXht3kSn3Rs3oaPWEbIg== 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 4YRvrT4b4Jzqcw; Tue, 07 Jan 2025 02:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5072JbR5029093; Tue, 7 Jan 2025 02:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5072JbeR029090; Tue, 7 Jan 2025 02:19:37 GMT (envelope-from git) Date: Tue, 7 Jan 2025 02:19:37 GMT Message-Id: <202501070219.5072JbeR029090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 215c8b79c498 - main - riscv/vmm: Make vcpu sleep periods consistent with other platforms 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 215c8b79c498f647afcbe9fa9076c2c3329e09b4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=215c8b79c498f647afcbe9fa9076c2c3329e09b4 commit 215c8b79c498f647afcbe9fa9076c2c3329e09b4 Author: Mark Johnston AuthorDate: 2025-01-07 02:15:23 +0000 Commit: Mark Johnston CommitDate: 2025-01-07 02:15:23 +0000 riscv/vmm: Make vcpu sleep periods consistent with other platforms There's no apparent reason for the difference here, so let's be consistent to make merging easier. Tested by: br --- sys/riscv/vmm/vmm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index 0596e0de2e43..f7cbfc1dfea5 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -1125,8 +1125,7 @@ vcpu_set_state_locked(struct vcpu *vcpu, enum vcpu_state newstate, if (from_idle) { while (vcpu->state != VCPU_IDLE) { vcpu_notify_event_locked(vcpu); - msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", - hz / 1000); + msleep_spin(&vcpu->state, &vcpu->mtx, "vmstat", hz); } } else { KASSERT(vcpu->state != VCPU_IDLE, ("invalid transition from " @@ -1425,7 +1424,7 @@ vm_handle_wfi(struct vcpu *vcpu, struct vm_exit *vme, bool *retu) * XXX msleep_spin() cannot be interrupted by signals so * wake up periodically to check pending signals. */ - msleep_spin(vcpu, &vcpu->mtx, "vmidle", hz / 1000); + msleep_spin(vcpu, &vcpu->mtx, "vmidle", hz); vcpu_require_state_locked(vcpu, VCPU_FROZEN); } vcpu_unlock(vcpu);