git: nvmm: Revert to use os_curcpu() in vmx_vmcs_enter()
aly at crater.dragonflybsd.org
Tue Jul 20 16:30:34 PDT 2021
Author: Aaron LI <aly at aaronly.me>
Date: Sun Jul 11 16:08:23 2021 +0800
nvmm: Revert to use os_curcpu() in vmx_vmcs_enter()
os_curcpu() returns a pointer to the current per-cpu data, which is used
in vmx_vmcs_enter() to clear a VMCS from a remote CPU. So it's more
efficient and clean than using the os_curcpu_number(), which requires
another lookup to obtain the per-cpu data pointer from the CPU id.
This effectively reverts the commit:
nvmm: Fix issues of porting 'curcpu()' as 'mycpu'
The "VMX fail valid" panics I had then were actually caused by the
missing wait for the asynchronous IPI request to clear VMCS from a
remote CPU, which had been fixed in a later commit.
Summary of changes:
sys/dev/virtual/nvmm/nvmm_os.h | 2 --
sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 15 +++++++--------
2 files changed, 7 insertions(+), 10 deletions(-)
DragonFly BSD source repository
More information about the Commits