Re: [PATCH v5 3/6] KVM: nVMX: set IDTR and GDTR limits when loading L1 host state

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

 



Nice.

Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>

On Wed, Oct 11, 2017 at 7:54 AM, Ladi Prosek <lprosek@xxxxxxxxxx> wrote:
> Intel SDM 27.5.2 Loading Host Segment and Descriptor-Table Registers:
>
> "The GDTR and IDTR limits are each set to FFFFH."
>
> Signed-off-by: Ladi Prosek <lprosek@xxxxxxxxxx>
> ---
>  arch/x86/kvm/vmx.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 33aafb584c7a..7525a34fe8dc 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -11328,6 +11328,8 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
>         vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip);
>         vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base);
>         vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base);
> +       vmcs_write32(GUEST_IDTR_LIMIT, 0xFFFF);
> +       vmcs_write32(GUEST_GDTR_LIMIT, 0xFFFF);
>
>         /* If not VM_EXIT_CLEAR_BNDCFGS, the L2 value propagates to L1.  */
>         if (vmcs12->vm_exit_controls & VM_EXIT_CLEAR_BNDCFGS)
> --
> 2.13.5
>



[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