Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1 |
|
#
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 ...
|
#
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 ...
|
#
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 ...
|
#
22b29b22 |
| 10-Jul-2021 |
Matthew Dillon <dillon@apollo.backplane.com> |
nvmm - Change NVMM_MAX_RAM
* Add __NetBSD__ conditional back in with original 128GB limit.
* Set DragonFly limit to 127TB (down from 128TB) to ensure that no valid memory exists at the canonical
nvmm - Change NVMM_MAX_RAM
* Add __NetBSD__ conditional back in with original 128GB limit.
* Set DragonFly limit to 127TB (down from 128TB) to ensure that no valid memory exists at the canonical transition.
Additional limits may have to be set as Intel specifies that the backing memory map not have an address space larger than the hardware's physical address space.
show more ...
|
#
42862644 |
| 04-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: More OS independence
* Abstract out various OS-specific defines and functions and organize them in 'nvmm_os.h' and 'nvmm_os.c'. This provides more flexibility for us to port NVMM to Drago
nvmm: More OS independence
* Abstract out various OS-specific defines and functions and organize them in 'nvmm_os.h' and 'nvmm_os.c'. This provides more flexibility for us to port NVMM to DragonFly and other OSes. * Remove 'nvmm_compat.h' and merge the code into the above new files.
Some local changes specific to DragonFly are not abstracted out, and there also exists some NetBSD-specific code. The current version only builds and works on DragonFly.
The OS-dependent code in nvmm_os.* and nvmm_x86.h is a bit messy at the moment. I'll further clean them up later.
show more ...
|
#
bfc69df0 |
| 04-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Various misc cleanups and minor updates
* Rework header inclusions. * Improve the arguments given to uvmspace_alloc(). * Lowercase "NVMM" in printf() logs. * Reorganize a few macros in 'nvmm_x
nvmm: Various misc cleanups and minor updates
* Rework header inclusions. * Improve the arguments given to uvmspace_alloc(). * Lowercase "NVMM" in printf() logs. * Reorganize a few macros in 'nvmm_x86.h' for clarity. * Remove NetBSD VCS markers and update copyright.
show more ...
|
#
ddb95be1 |
| 04-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Reduce NVMM_MAX_VCPUS from 256 to 128
Unfortunately not all x86 guests can work with a max value of 256, due to overflowing uint8_t. Reduce it to 128.
|
#
412bdc0a |
| 03-Jul-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Rename a few things for clarity
|
#
5d1ebcce |
| 23-Jun-2021 |
Matthew Dillon <dillon@apollo.backplane.com> |
nvmm - Change max emulated RAM from 128GB to 128TB
* Increase the max emulated RAM from 128GB to 128TB. Ok, I'm not sure what the actual maximum is, but it sure as heck is more than 128GB.
* S
nvmm - Change max emulated RAM from 128GB to 128TB
* Increase the max emulated RAM from 128GB to 128TB. Ok, I'm not sure what the actual maximum is, but it sure as heck is more than 128GB.
* Successfully booted a 8TB qemu on the threadripper (host ate ~275GB to boot it, mostly initializing the vm_page_array[]).
This points to other things we could work on in the kernel to reduce memory overhead. Our really fat struct vm_page's, for one.
show more ...
|
#
2b54422c |
| 27-Jun-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Improve nvmm_return_needed() by using nvmm_break_wanted()
Use the newly added nvmm_break_wanted() routine to check for pending host events, improving nvmm_return_needed(). Just stuff nvmm_bre
nvmm: Improve nvmm_return_needed() by using nvmm_break_wanted()
Use the newly added nvmm_break_wanted() routine to check for pending host events, improving nvmm_return_needed(). Just stuff nvmm_break_wanted() into nvmm_return_needed() and get rid of preempt_needed(), making the code clearer.
Also add __predict_false() macro to help performance a bit.
show more ...
|
#
7f0e1ce2 |
| 26-Jun-2021 |
Aaron LI <aly@aaronly.me> |
NVMM: Sync with NetBSD #1: copyright headers
|
#
634ba020 |
| 09-May-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Rewrite makefiles and hook to build
Note that kernel header files are install by the top-level 'include/Makefile'. However, it will install all found header files in the specified directories
nvmm: Rewrite makefiles and hook to build
Note that kernel header files are install by the top-level 'include/Makefile'. However, it will install all found header files in the specified directories, including 'nvmm_compat.h' and 'nvmm_internal.h'. Therefore, add a guard to prevent them from including by userland utilities (e.g., libnvmm, nvmmctl).
show more ...
|
#
0059657b |
| 22-May-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Port to DragonFly #20: preemption & critical section
In DragonFly, a normal kernel thread will not migrate to another CPU or be preempted (except by an interrupt thread), so kpreempt_{disable,
nvmm: Port to DragonFly #20: preemption & critical section
In DragonFly, a normal kernel thread will not migrate to another CPU or be preempted (except by an interrupt thread), so kpreempt_{disable,enable}() are not needed. However, we can't use critical section as an instead, because that would also prevent interrupt/reschedule flags from being set, which would be a problem for nvmm_return_needed() that's called from vcpu_run() loop. (credit to Matt Dillon)
Port nvmm_return_needed() to DragonFly. But note that the *_resched_wanted() functions cannot be used in critical sections, which would prevent the relevant flags from being set. (credit to Matt Dillon)
Port splhigh()/splx() as critical sections in DragonFly for the moment. Don't worry about it unless we have issues with it later.
show more ...
|
#
7a6db4cc |
| 09-May-2021 |
Aaron LI <aly@aaronly.me> |
nvmm: Bring some minor changes from NetBSD-current
These changes help port NVMM to DragonFly by reducing the required difference.
|
#
6d65b43d |
| 05-May-2021 |
Aaron LI <aly@aaronly.me> |
Import nvmm(4) from NetBSD 9-stable
This is the kernel driver that provides support for hardware-accelerated virtualization. It is made of an MI frontend with the following two MD backends: - x86 I
Import nvmm(4) from NetBSD 9-stable
This is the kernel driver that provides support for hardware-accelerated virtualization. It is made of an MI frontend with the following two MD backends: - x86 Intel VMX - x86 AMD SVM
Branch: NetBSD 9-stable Date: Fri Apr 30 14:08:16 2021 +0000 Path: sys/dev/nvmm
show more ...
|