• Avi Kivity's avatar
    KVM: VMX: Fix host userspace gsbase corruption · c8770e7b
    Avi Kivity authored
    We now use load_gs_index() to load gs safely; unfortunately this also
    changes MSR_KERNEL_GS_BASE, which we managed separately.  This resulted
    in confusion and breakage running 32-bit host userspace on a 64-bit kernel.
    
    Fix by
    - saving guest MSR_KERNEL_GS_BASE before we we reload the host's gs
    - doing the host save/load unconditionally, instead of only when in guest
      long mode
    
    Things can be cleaned up further, but this is the minmal fix for now.
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    c8770e7b
vmx.c 113 KB