On Tue, Jan 07, 2020 at 09:39:22AM +0100, Maxime Villard wrote:
Module Name: src
Committed By: ad
Date: Sat Jan 4 22:49:20 UTC 2020
Modified Files:
src/sys/arch/x86/include: pmap.h pmap_pv.h
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: xen_pmap.c
Log Message:
x86 pmap improvements, reducing system time during a build by about 15% on
my test machine:
This breaks nvmm-intel. I have only given a quick glance, but this change
already is wrong:
- old_pp->pp_attrs |= pmap_ept_to_pp_attrs(opte);
+ old_pp->pp_attrs |= pmap_pte_to_pp_attrs(opte);
This is an EPT function handling EPT PTEs, so "ept" was correct. Fixing
this bug is not sufficient, so it seems that there are more bugs.
Reverting the whole change puts nvmm-intel back in a functional state.
You can test with this on an Intel CPU:
# modload nvmm
# /usr/tests/lib/libnvmm/./h_mem_assist
This currently gives random crashes.
With a couple of typos fixed (PTE -> EPT, now checked in) I see the same FPU
DNA exception that Chavdar reports on current-users (in his case with a
kernel which doesn't have these pmap changes). It's coming from:
vmx_vcpu_guest_fpu_leave() -> fpu_area_save() -> fxsave()
What I can tell you is that the fxsave area is definitely writable and
correctly aligned but beyond that I have no idea what's causing it. Any
suggestions?
Cheers,
Andrew