1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/lib
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
..
aarch64 KVM: arm64: selftests: Add host support for vGIC 2021-10-17 11:17:21 +01:00
s390x KVM: selftests: Add wrapper to allocate page table page 2021-06-24 11:47:49 -04:00
x86_64 selftests: KVM: avoid failures due to reserved HyperTransport region 2021-12-10 07:42:20 -05:00
assert.c KVM: selftests: Print the errno besides error-string in TEST_ASSERT 2021-04-20 04:18:52 -04:00
elf.c KVM: selftests: Expose align() helpers to tests 2021-11-16 07:43:24 -05:00
guest_modes.c KVM: selftests: introduce P44V64 for z196 and EC12 2021-07-06 10:05:16 +02:00
io.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
kvm_util.c selftests: KVM: avoid failures due to reserved HyperTransport region 2021-12-10 07:42:20 -05:00
kvm_util_internal.h KVM: selftests: create alias mappings when using shared memory 2021-05-27 07:45:56 -04:00
perf_test_util.c KVM: selftests: Wait for all vCPU to be created before entering guest mode 2021-11-16 07:43:28 -05:00
rbtree.c KVM: selftests: Keep track of memslots more efficiently 2021-05-27 07:45:54 -04:00
sparsebit.c kvm: selftests: Fix spelling mistake "missmatch" -> "mismatch" 2021-09-30 04:27:08 -04:00
test_util.c KVM: selftests: Assert mmap HVA is aligned when using HugeTLB 2021-11-16 07:43:25 -05:00