And then rebuild and install a new kernel:
KK=`sysctl -n kern.osversion | cut -d# -f1`
cd /usr/src/sys/arch/`machine`/compile/$KK
make obj
make config
make
make install
/* Restore any guest PKRU state. */
@@ -4189,8 +4185,14 @@ vcpu_run_vmx(struct vcpu *vcpu, struct v
wrpkru(PGK_VALUE);
}
- lidt(&idtr);
- lldt(ldt_sel);
+ /*
+ * VM exit restores the GDT and IDT bases, but gives
+ * them high limits. Reload with the correct limits here.
+ * 'gdt' is set above first time through and reset there
+ * whenever this thread switches CPU.
+ */
+ bare_lgdt(&gdt);
+ cpu_init_idt();
/*
* On exit, interrupts are disabled, and we are running with