freebsd-dev/sys/amd64
John Baldwin b843f9be5e Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits.
The VT-x VMCS only stores the base address of the GDTR and IDTR.  As a
result, VM exits use a fixed limit of 0xffff for the host GDTR and
IDTR losing the smaller limits set in when the initial GDT is loaded
on each CPU during boot.  Explicitly save and restore the full GDTR
and IDTR contents around VM entries and exits to restore the correct
limit.

Similarly, explicitly save and restore the LDT selector.  VM exits
always clear the host LDTR as if the LDT was loaded with a NULL
selector and a userspace hypervisor is probably using a NULL selector
anyway, but save and restore the LDT explicitly just to be safe.

PR:		230773
Reported by:	John Levon <levon@movementarian.org>
Reviewed by:	kib
Tested by:	araujo
Approved by:	re (rgrimes)
MFC after:	1 week
2018-10-11 18:27:19 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
amd64 amd64: make memset less slow with mov 2018-10-05 19:25:09 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf Address the warning regarding duplicate option 'GEOM_PART_GPT' when 2018-10-07 15:54:13 +00:00
ia32 Use SMAP on amd64. 2018-07-29 20:47:00 +00:00
include Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits. 2018-10-11 18:27:19 +00:00
linux Regenerated assorted syscall related files after: 2018-10-09 20:42:17 +00:00
linux32 Regenerated assorted syscall related files after: 2018-10-09 20:42:17 +00:00
pci sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
sgx Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
vmm Fully restore the GDTR, IDTR, and LDTR after VT-x VM exits. 2018-10-11 18:27:19 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00