Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2024 18:58:31 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3df92c972898 - main - vmm: Enable assertions in vmmdev_lookup()
Message-ID:  <202408261858.47QIwVWk027596@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=3df92c972898be7b4b8dafacfd6708f3a39b2af5

commit 3df92c972898be7b4b8dafacfd6708f3a39b2af5
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-08-26 18:41:23 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-08-26 18:41:23 +0000

    vmm: Enable assertions in vmmdev_lookup()
    
    The comment has been there since the initial import of the vmm code
    and presumably reflected some kind of problem with standalone builds of
    vmm.ko.  However, I don't see any problems with it, and mtx_assert() is
    used elsewhere within the vmm code.
    
    Reviewed by:    jhb
    Differential Revision:  https://reviews.freebsd.org/D46438
---
 sys/amd64/vmm/vmm_dev.c | 2 --
 sys/arm64/vmm/vmm_dev.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c
index 46cddce4e4b8..9acbfbb454e0 100644
--- a/sys/amd64/vmm/vmm_dev.c
+++ b/sys/amd64/vmm/vmm_dev.c
@@ -228,9 +228,7 @@ vmmdev_lookup(const char *name)
 {
 	struct vmmdev_softc *sc;
 
-#ifdef notyet	/* XXX kernel is not compiled with invariants */
 	mtx_assert(&vmmdev_mtx, MA_OWNED);
-#endif
 
 	SLIST_FOREACH(sc, &head, link) {
 		if (strcmp(name, vm_name(sc->vm)) == 0)
diff --git a/sys/arm64/vmm/vmm_dev.c b/sys/arm64/vmm/vmm_dev.c
index 946c6760f7c1..c3c6dcc87d88 100644
--- a/sys/arm64/vmm/vmm_dev.c
+++ b/sys/arm64/vmm/vmm_dev.c
@@ -172,9 +172,7 @@ vmmdev_lookup(const char *name)
 {
 	struct vmmdev_softc *sc;
 
-#ifdef notyet	/* XXX kernel is not compiled with invariants */
 	mtx_assert(&vmmdev_mtx, MA_OWNED);
-#endif
 
 	SLIST_FOREACH(sc, &head, link) {
 		if (strcmp(name, vm_name(sc->vm)) == 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408261858.47QIwVWk027596>