| 1c0b11ab | 28-Feb-2023 |
Sascha Wildner <saw@online.de> |
kernel/pvscsi: Port pvscsi(4) over to DragonFly.
* Currently, MSI-X support is missing.
* If loaded as a module, it has to be in loader.conf. I don't know if that is different on FreeBSD.
Report
kernel/pvscsi: Port pvscsi(4) over to DragonFly.
* Currently, MSI-X support is missing.
* If loaded as a module, it has to be in loader.conf. I don't know if that is different on FreeBSD.
Reported-by: Georg Bege <georg@bege.email> Tested-by: Georg Bege <georg@bege.email> (on a VPS from IONOS) Pierre-Alain TORET <pierre-alain.toret@protonmail.com> (on Linux Workstation Pro 17) myself (on Windows Workstation 17 Player)
show more ...
|
| 11755db6 | 21-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Fix building nvmm into kernel
* Remove 'DIAGNOSTIC' define from 'nvmm_os.h'. First, 'DIAGNOSTIC' and 'INVARIANTS' are different options. Secondly, 'DIAGNOSTIC' should be defined in kerne
nvmm: Fix building nvmm into kernel
* Remove 'DIAGNOSTIC' define from 'nvmm_os.h'. First, 'DIAGNOSTIC' and 'INVARIANTS' are different options. Secondly, 'DIAGNOSTIC' should be defined in kernel configs, e.g., LINT64 defines it. * Remove 'LOCORE' define from 'nvmm_x86_{svmfunc,vmxfunc}.S'. It's already defined on the command line, when compiling ASM source files with the kernel (i.e., building the module into the kernel). * Manually define 'LOCORE' for 'nvmm_x86_{svmfunc,vmxfunc}.o' compilation in the Makefile, fixing building as a standalone module.
This fixes building nvmm into kernel, like LINT64.
Thanks swildner for reporting the issue and helping with the fix.
show more ...
|
| cca384e4 | 20-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Fix comm page unmapping issue by doing it on userland side
Previously, we're mapping and unmapping the comm page for userland process both on the kernel side. The unmapping was called at the
nvmm: Fix comm page unmapping issue by doing it on userland side
Previously, we're mapping and unmapping the comm page for userland process both on the kernel side. The unmapping was called at the point of closing the fd.
However, the kernel may destroy process' vmspace before or after closing the fd, so there is no guarantee that kernel can get the correct address space to unmap the comm page for the userland process. Therefore, do the comm page unmapping on the userland side in libnvmm to fix the above issue.
In addition, add the 'comm_size' member to 'struct nvmm_capability' to expose the comm page size to userland, which is required for the unmapping operation. This breaks ABI, so bump NVMM_KERN_VERSION. Update nvmmctl(8) accordingly to print the comm page size.
This commit partially reverts: "nvmm: Add missing comm page unmapping"
show more ...
|
| 8a0a54bf | 18-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Add back NetBSD bits
Bring back the NetBSD bits lost during the porting. One minor change is required: MODULE_CLASS_MISC -> MODULE_CLASS_DRIVER. Otherwise, loading nvmm.kmod would fail with
nvmm: Add back NetBSD bits
Bring back the NetBSD bits lost during the porting. One minor change is required: MODULE_CLASS_MISC -> MODULE_CLASS_DRIVER. Otherwise, loading nvmm.kmod would fail with error:
module error: incompatible module class 1 for `nvmm' (wanted 3)
Now the same code builds and works on NetBSD (of course, NetBSD requires a different set of Makefiles).
show more ...
|
| 002185e5 | 18-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Move DragonFly module code in nvmm.c to nvmm_dragonfly.c
Move the OS-specific DragonFly module code in nvmm.c to nvmm_dragonfly.c, making nvmm.c source file more OS-independent. Adjust severa
nvmm: Move DragonFly module code in nvmm.c to nvmm_dragonfly.c
Move the OS-specific DragonFly module code in nvmm.c to nvmm_dragonfly.c, making nvmm.c source file more OS-independent. Adjust several static functions and variables for this purpose.
show more ...
|
| df3af4c9 | 18-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Reorganize OS-specific code in nvmm_os.c
Split the OS-specific code in 'nvmm_os.c' into two separate source files: nvmm_dragonfly.c and nvmm_netbsd.c, one for each supported OS.
Update Makefi
nvmm: Reorganize OS-specific code in nvmm_os.c
Split the OS-specific code in 'nvmm_os.c' into two separate source files: nvmm_dragonfly.c and nvmm_netbsd.c, one for each supported OS.
Update Makefile and sys/conf/files accordingly.
show more ...
|
| b3f7271c | 18-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Optimize DB regs save & restore
Check PCB_DBREGS flag before save/restore DB regs. If the current thread doesn't use DB regs, then no need to save & restore them.
Meanwhile, revert to use x8
nvmm: Optimize DB regs save & restore
Check PCB_DBREGS flag before save/restore DB regs. If the current thread doesn't use DB regs, then no need to save & restore them.
Meanwhile, revert to use x86_dbregs_save() and x86_dbregs_restore() for the NetBSD code.
This is a partial revert of commit: "nvmm: Save host DB regs in per-cpu structure"
show more ...
|
| 665a79c8 | 15-Jul-2021 |
Matthew Dillon <dillon@apollo.backplane.com> |
nvmm - Use a critical section around the vmrun again
* In DragonFly, a thread in kernel mode will not be preemptively migrated to another CPU or preemptively switched to another normal kernel thre
nvmm - Use a critical section around the vmrun again
* In DragonFly, a thread in kernel mode will not be preemptively migrated to another CPU or preemptively switched to another normal kernel thread, but can be preemptively switched to an interrupt thread (which switches back to the kernel thread it preempted the instant it is done or blocks).
However, we still need to use a critical section to prevent this nominal interrupt thread preemption to avoid exposing interrupt threads to guest DB and FP register state. We operate under the assumption that the hard interrupt code won't mess with this state.
show more ...
|
| d8a75061 | 12-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Don't assume comm page size to be PAGE_SIZE
Don't assume the comm page size to be PAGE_SIZE but add the 'NVMM_COMM_PAGE_SIZE' macro to determine the size. So the code is now independent to co
nvmm: Don't assume comm page size to be PAGE_SIZE
Don't assume the comm page size to be PAGE_SIZE but add the 'NVMM_COMM_PAGE_SIZE' macro to determine the size. So the code is now independent to comm page size and thus it can be easily extended in the future.
show more ...
|
| 1759ebc3 | 12-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Add missing comm page unmapping
The comm page mapping has been changed from libnvmm to the kernel side, so I removed the munmap() code from libnvmm, but the kernel wasn't doing the unmapping.
nvmm: Add missing comm page unmapping
The comm page mapping has been changed from libnvmm to the kernel side, so I removed the munmap() code from libnvmm, but the kernel wasn't doing the unmapping. Now add the missing unmapping operation.
show more ...
|
| 3f1b1a2b | 11-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Adjust EPT/NPT transform code for NetBSD
* Rename variable 'pmap_ept_has_ad' to 'vmx_ept_has_ad' to avoid conflict with the global variable in NetBSD. * Set 'pmap_ept_has_ad' global for NetB
nvmm: Adjust EPT/NPT transform code for NetBSD
* Rename variable 'pmap_ept_has_ad' to 'vmx_ept_has_ad' to avoid conflict with the global variable in NetBSD. * Set 'pmap_ept_has_ad' global for NetBSD in vmx_ident(). * Add macro os_vmspace_pmap() to 'nvmm_os.h'. * Add ifdef's in vmx_machine_create() and svm_machine_create() to properly handle EPT/NPT pmap transform on both DragonFly and NetBSD.
show more ...
|