Re: [PATCH v2] KVM: VMX: disable SMEP feature when guest is in non-paging mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 04, 2013 at 11:50:43AM +0800, Dongxiao Xu wrote:
> Changes from v1 to v2:
>  - Modify commit message and comments according to Gleb's suggestions.
> 
> SMEP is disabled if CPU is in non-paging mode in hardware.
> However KVM always uses paging mode to emulate guest non-paging
> mode with TDP. To emulate this behavior, SMEP needs to be manually
> disabled when guest switches to non-paging mode.
> 
> We met an issue that, SMP Linux guest with recent kernel (enable
> SMEP support, for example, 3.5.3) would crash with triple fault if
> setting unrestricted_guest=0. This is because KVM uses an identity
> mapping page table to emulate the non-paging mode, where the page
> table is set with USER flag. If SMEP is still enabled in this case,
> guest will meet unhandlable page fault and then crash.
> 
> Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
> Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
> ---
>  arch/x86/kvm/vmx.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)

Applied, thanks.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux