Summary: | Kernel panics when loading vmm module with VT-x disabled | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Aleksandr <haron86> | ||||
Component: | bhyve | Assignee: | Corvin Köhne <corvink> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | corvink, freebsd, markj | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Aleksandr
2023-05-05 03:38:45 UTC
Could you please check if https://reviews.freebsd.org/D39974 fixes your issue? A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b10e100d1696782cfebef09b5870dfc6d1b3217b commit b10e100d1696782cfebef09b5870dfc6d1b3217b Author: Corvin Köhne <corvink@FreeBSD.org> AuthorDate: 2023-05-05 06:36:20 +0000 Commit: Corvin Köhne <corvink@FreeBSD.org> CommitDate: 2023-05-05 13:34:00 +0000 vmm: don't free unallocated memory If vmx or svm is disabled in BIOS or the device isn't supported by vmm, modinit won't allocate these state save areas. As kmem_free panics when passing a NULL pointer to it, loading the vmm kernel module causes a panic too. PR: 271251 Reviewed by: markj Fixes: 74ac712f72cfd6d7b3db3c9d3b72ccf2824aa183 ("vmm: Dynamically allocate a couple of per-CPU state save areas") MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39974 sys/amd64/vmm/amd/svm.c | 5 ++++- sys/amd64/vmm/intel/vmx.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) I don't have AMD systems, but this patch works on my Intel system. Thank you! A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=be14baa34b82e3ca50d0a2b61ddb05b355616c93 commit be14baa34b82e3ca50d0a2b61ddb05b355616c93 Author: Corvin Köhne <corvink@FreeBSD.org> AuthorDate: 2023-05-10 13:19:25 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-05-11 13:32:32 +0000 vmm: don't free unallocated memory If vmx or svm is disabled in BIOS or the device isn't supported by vmm, modinit won't allocate these state save areas. As kmem_free panics when passing a NULL pointer to it, loading the vmm kernel module causes a panic too. PR: 271251 Reviewed by: markj Fixes: 74ac712f72cfd6d7b3db3c9d3b72ccf2824aa183 ("vmm: Dynamically allocate a couple of per-CPU state save areas") MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39974 (cherry picked from commit b10e100d1696782cfebef09b5870dfc6d1b3217b) sys/amd64/vmm/amd/svm.c | 5 ++++- sys/amd64/vmm/intel/vmx.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) |