From nobody Tue Nov 05 04:24:00 2024 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 4XjFb44xcdz5d0nF; Tue, 05 Nov 2024 04:24:00 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjFb43XDBz4JXX; Tue, 5 Nov 2024 04:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730780640; 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=OMmcPWYGBJnHDj3CpFC17cuiWdEnjn0s08mabeIXSik=; b=BUo4v0ZdWR3R4ypEPXdzv91+oPB5D7KXMxO8qGt8do8yM2trnM7O+pxz1FYkYHow7pBT1n qteGTo6P0x0Ck1nHLx1AUicneCLHnR43UZtYUXRxcr6o6zoaTPiufBA+AgtfRCd0usTO3o qisO6fhYS83q/Hw7YHwbJLE00v8OtA9iqSR28ldZ+212iYCL1eikVRsNkqgNKopE8rrSN9 0rFsk1z4gBy9z4lQCrD9UpQF7EXyLTbVdfi3jhTqbCKQ8d75qyDpDhzqU+lnP3uQFvL6dK VVLOs5Y1bPh8sJs4K8btHR9wSbERaylyePq6qE/5Ymo9V2vkBcxAmwVIFPuHuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730780640; 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=OMmcPWYGBJnHDj3CpFC17cuiWdEnjn0s08mabeIXSik=; b=HKkBD7sJjqdp/AU6sDVOT1CGVXMo/3KlY31hFebfGzOkjOpvKbHSBXOo68FXJc5+NKAgHi ds3pvYL2HHHJpAy1naY03kgs1/Fx9xWG/1Xkpxj/vgoI4XPbX9FLX1VBZtDsyHBjSdohQi ml0kxiyY0w5oyb7SNtxmfLZ1O9dMVicGo66jkEeGYaiATNFguwjvmcg4ZZWQhH5RBzGhUE eUO6pSzp3ghMAC9y1HkE1x49oCzrkGP062WDFUdLHzP3oGqtOXmTJypoxcKc1am6pO1Tcx RynQkd9FQC1b9niVHLDa/7P3HGOJQrcmC+NK28up3eoW4XglkmvXUbkDuZZ2Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730780640; a=rsa-sha256; cv=none; b=u3v5omXW3LUnYjc/xJQvQjsXWTDzbwSwUOXGug8Q3Cxi2jNfNmBo30DNr8SHr4pHAEavH+ zJidH+VSuT7SIh2ZlMy76SeHQM7H9aacqzbaMse9+/igWSNGNRedv0XF+BRmLzn5Hl6hli TZx8Gy3QCQPRt0Yo77LWq2mLVGZ0/jlOCYorOImA8XH7FsodtQy2APm6z9B5ytg7YW0FIX lACUqvvPEyyj7mGBQBvTWIrEoM8qwPv/YdNfqJS3WCzs/NbaRSqP0+Jqh4mltneWncrHAI HinSICsBWgzTyBey/KtLjWoSECwU9EBrLo7NfX/c1anHhzE8Fy/NKdEPlJP9Ag== 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 4XjFb437Q7z129Q; Tue, 5 Nov 2024 04:24:00 +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 4A54O0jQ066847; Tue, 5 Nov 2024 04:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A54O0Of066844; Tue, 5 Nov 2024 04:24:00 GMT (envelope-from git) Date: Tue, 5 Nov 2024 04:24:00 GMT Message-Id: <202411050424.4A54O0Of066844@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: 043999b1ae49 - main - riscv/vmm: Fix the build after a97f683fe3c4 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 043999b1ae49635be530badeb6c5d50002e622f4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=043999b1ae49635be530badeb6c5d50002e622f4 commit 043999b1ae49635be530badeb6c5d50002e622f4 Author: Mark Johnston AuthorDate: 2024-11-05 03:13:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-05 04:23:49 +0000 riscv/vmm: Fix the build after a97f683fe3c4 - Make machine/vmm_dev.h self-contained. - Check for errors from vmmdev_init(). - Make VM_MAX_NAMELEN visible to userspace. Reported by: Jenkins Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs") --- sys/riscv/include/vmm.h | 3 +-- sys/riscv/include/vmm_dev.h | 2 ++ sys/riscv/vmm/vmm.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/riscv/include/vmm.h b/sys/riscv/include/vmm.h index e148cd95b522..1093e1cd0096 100644 --- a/sys/riscv/include/vmm.h +++ b/sys/riscv/include/vmm.h @@ -102,12 +102,11 @@ enum vm_reg_name { #define VM_INTINFO_HWEXCEPTION (3 << 8) #define VM_INTINFO_SWINTR (4 << 8) +#define VM_MAX_NAMELEN 32 #define VM_MAX_SUFFIXLEN 15 #ifdef _KERNEL -#define VM_MAX_NAMELEN 32 - struct vm; struct vm_exception; struct vm_exit; diff --git a/sys/riscv/include/vmm_dev.h b/sys/riscv/include/vmm_dev.h index a21528a8dc68..856ff0778b95 100644 --- a/sys/riscv/include/vmm_dev.h +++ b/sys/riscv/include/vmm_dev.h @@ -34,6 +34,8 @@ #ifndef _VMM_DEV_H_ #define _VMM_DEV_H_ +#include + struct vm_memmap { vm_paddr_t gpa; int segid; /* memory segment */ diff --git a/sys/riscv/vmm/vmm.c b/sys/riscv/vmm/vmm.c index 52e881dd220c..1c0290ace570 100644 --- a/sys/riscv/vmm/vmm.c +++ b/sys/riscv/vmm/vmm.c @@ -255,7 +255,9 @@ vmm_handler(module_t mod, int what, void *arg) switch (what) { case MOD_LOAD: /* TODO: check if has_hyp here? */ - vmmdev_init(); + error = vmmdev_init(); + if (error != 0) + break; error = vmm_init(); if (error == 0) vmm_initialized = true;