• B
    KVM: selftests: Add NX huge pages test · 8448ec59
    Ben Gardon 提交于
    There's currently no test coverage of NX hugepages in KVM selftests, so
    add a basic test to ensure that the feature works as intended.
    
    The test creates a VM with a data slot backed with huge pages. The
    memory in the data slot is filled with op-codes for the return
    instruction. The guest then executes a series of accesses on the memory,
    some reads, some instruction fetches. After each operation, the guest
    exits and the test performs some checks on the backing page counts to
    ensure that NX page splitting an reclaim work as expected.
    Reviewed-by: NDavid Matlack <dmatlack@google.com>
    Signed-off-by: NBen Gardon <bgardon@google.com>
    Message-Id: <20220613212523.3436117-7-bgardon@google.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    8448ec59
kvm_util.c 52.2 KB