1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/lib/x86_64
Paolo Bonzini c8cc43c1ea selftests: KVM: avoid failures due to reserved HyperTransport region
AMD proceessors define an address range that is reserved by HyperTransport
and causes a failure if used for guest physical addresses.  Avoid
selftests failures by reserving those guest physical addresses; the
rules are:

- On parts with <40 bits, its fully hidden from software.

- Before Fam17h, it was always 12G just below 1T, even if there was more
RAM above this location.  In this case we just not use any RAM above 1T.

- On Fam17h and later, it is variable based on SME, and is either just
below 2^48 (no encryption) or 2^43 (encryption).

Fixes: ef4c9f4f65 ("KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()")
Cc: stable@vger.kernel.org
Cc: David Matlack <dmatlack@google.com>
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210805105423.412878-1-pbonzini@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Tested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-10 07:42:20 -05:00
..
apic.c KVM: selftests: Introduce x2APIC register manipulation functions 2021-06-17 13:09:32 -04:00
handlers.S selftests: kvm: remove reassignment of non-absolute variables 2021-05-07 06:06:13 -04:00
processor.c selftests: KVM: avoid failures due to reserved HyperTransport region 2021-12-10 07:42:20 -05:00
svm.c selftest: KVM: Add open sev dev helper 2021-11-11 10:35:27 -05:00
ucall.c selftests: kvm: Clear uc so UCALL_NONE is being properly reported 2020-11-08 06:02:14 -05:00
vmx.c KVM: selftests: Add wrapper to allocate page table page 2021-06-24 11:47:49 -04:00