Date: Fri, 25 Jan 2013 21:38:31 +0000 (UTC) From: Peter Grehan <grehan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245917 - head/sys/amd64/vmm/intel Message-ID: <201301252138.r0PLcVuN028866@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: grehan Date: Fri Jan 25 21:38:31 2013 New Revision: 245917 URL: http://svnweb.freebsd.org/changeset/base/245917 Log: Always allow access to the sysenter cs/esp/eip MSRs since they are automatically saved and restored in the VMCS. Reviewed by: neel Obtained from: NetApp Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Fri Jan 25 20:45:24 2013 (r245916) +++ head/sys/amd64/vmm/intel/vmx.c Fri Jan 25 21:38:31 2013 (r245917) @@ -696,6 +696,10 @@ vmx_vminit(struct vm *vm) * vm-exit and vm-entry respectively. The host FSBASE and GSBASE are * always restored from the vmcs host state area on vm-exit. * + * The SYSENTER_CS/ESP/EIP MSRs are identical to FS/GSBASE in + * how they are saved/restored so can be directly accessed by the + * guest. + * * Guest KGSBASE is saved and restored in the guest MSR save area. * Host KGSBASE is restored before returning to userland from the pcb. * There will be a window of time when we are executing in the host @@ -708,6 +712,9 @@ vmx_vminit(struct vm *vm) */ if (guest_msr_rw(vmx, MSR_GSBASE) || guest_msr_rw(vmx, MSR_FSBASE) || + guest_msr_rw(vmx, MSR_SYSENTER_CS_MSR) || + guest_msr_rw(vmx, MSR_SYSENTER_ESP_MSR) || + guest_msr_rw(vmx, MSR_SYSENTER_EIP_MSR) || guest_msr_rw(vmx, MSR_KGSBASE) || guest_msr_rw(vmx, MSR_EFER)) panic("vmx_vminit: error setting guest msr access");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301252138.r0PLcVuN028866>