OSDN Git Service

KVM: selftests: Add hugepage support for x86-64
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 20:05:28 +0000 (13:05 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 15:47:55 +0000 (11:47 -0400)
commitad5f16e422258d51414e7d8aaf856000eec9dfce
treef6b0b0e85958f6677bc96a415baaca0c58444189
parentb007e904b36a945d01a9080d754702ca5f9c68b4
KVM: selftests: Add hugepage support for x86-64

Add x86-64 hugepage support in the form of a x86-only variant of
virt_pg_map() that takes an explicit page size.  To keep things simple,
follow the existing logic for 4k pages and disallow creating a hugepage
if the upper-level entry is present, even if the desired pfn matches.

Opportunistically fix a double "beyond beyond" reported by checkpatch.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622200529.3650424-19-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c