Re: [kvm-unit-tests PATCH 2/2] nVMX: Use the standard non-canonical value in test_mtf3

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

 



On Mon, Jul 13, 2020 at 5:24 PM Sean Christopherson
<sean.j.christopherson@xxxxxxxxx> wrote:
>
> Use the standard non-canonical value of repeating 'a' instead of a
> custom (1 << 63) value in test_mtf3.  When PCID is enabled, bit 63 is
> a flag that controls TLB swithching on MOV CR3 and is not included in
> the canonical check of CR3, i.e. if CR4.PCIDE=1 then the test will load
> 0 into CR3 and all manner of confusion things happen.
>
> Fixes: 46cc038c6afb8 ("x86: VMX: Add tests for monitor trap flag")
> Cc: Oliver Upton <oupton@xxxxxxxxxx>
> Cc: Jim Mattson <jmattson@xxxxxxxxxx>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>

Reviewed-by: Oliver Upton <oupton@xxxxxxxxxx>

> ---
>  x86/vmx_tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index cb42a2d..32e3d4f 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -5107,7 +5107,7 @@ static void test_mtf_guest(void)
>               * MOV RAX is done before the VMCALL such that MTF is only enabled
>               * for the instruction under test.
>               */
> -            "mov $0x8000000000000000, %rax;\n\t"
> +            "mov $0xaaaaaaaaaaaaaaaa, %rax;\n\t"
>              "vmcall;\n\t"
>              "mov %rax, %cr3;\n\t"
>              "test_mtf3:\n\t"
> --
> 2.26.0
>



[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