• Sean Christopherson's avatar
    KVM: selftests: Assert mmap HVA is aligned when using HugeTLB · f4870ef3
    Sean Christopherson authored
    Manually padding and aligning the mmap region is only needed when using
    THP. When using HugeTLB, mmap will always return an address aligned to
    the HugeTLB page size. Add a comment to clarify this and assert the mmap
    behavior for HugeTLB.
    
    [Removed requirement that HugeTLB mmaps must be padded per Yanan's
     feedback and added assertion that mmap returns aligned addresses
     when using HugeTLB.]
    
    Cc: Ben Gardon <bgardon@google.com>
    Cc: Yanan Wang <wangyanan55@huawei.com>
    Cc: Andrew Jones <drjones@redhat.com>
    Cc: Peter Xu <peterx@redhat.com>
    Cc: Aaron Lewis <aaronlewis@google.com>
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
    Message-Id: <20211111000310.1435032-4-dmatlack@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    f4870ef3
test_util.c 7.77 KB