NetBSD/sys/dev/nvmm
maxv 506b4248b0 Invert the mapping logic.
Until now, the "owner" of the memory was the guest, and by calling
nvmm_gpa_map(), the virtualizer was creating a view towards the guest
memory.

Qemu expects the contrary: it wants the owner to be the virtualizer, and
nvmm_gpa_map should just create a view from the guest towards the
virtualizer's address space. Under this scheme, it is legal to have two
GPAs that point to the same HVA.

Introduce nvmm_hva_map() and nvmm_hva_unmap(), that map/unamp the HVA into
a dedicated UOBJ. Change nvmm_gpa_map() and nvmm_gpa_unmap() to just
perform an enter into the desired UOBJ.

With this change in place, all the mapping-related problems in Qemu+NVMM
are fixed.
2018-12-15 13:39:43 +00:00
..
x86 Don't forget to advance the RIP after an XSETBV emulation. 2018-12-13 16:28:10 +00:00
files.nvmm
Makefile
nvmm_internal.h Invert the mapping logic. 2018-12-15 13:39:43 +00:00
nvmm_ioctl.h Invert the mapping logic. 2018-12-15 13:39:43 +00:00
nvmm.c Invert the mapping logic. 2018-12-15 13:39:43 +00:00
nvmm.h