Date: Thu, 11 Oct 2018 18:27:46 +0000 From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 230773] [bhyve] GDT limit needs reset on VMX exit Message-ID: <bug-230773-27103-B6yNT03x22@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-230773-27103@https.bugs.freebsd.org/bugzilla/> References: <bug-230773-27103@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230773 --- Comment #3 from commit-hook@freebsd.org --- A commit references this bug: Author: jhb Date: Thu Oct 11 18:27:20 UTC 2018 New revision: 339312 URL: https://svnweb.freebsd.org/changeset/base/339312 Log: 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 Changes: head/sys/amd64/include/cpufunc.h head/sys/amd64/vmm/intel/vmx.c --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230773-27103-B6yNT03x22>