• David Matlack's avatar
    KVM: selftests: Replace x86_page_size with PG_LEVEL_XX · 4ee602e7
    David Matlack authored
    x86_page_size is an enum used to communicate the desired page size with
    which to map a range of memory. Under the hood they just encode the
    desired level at which to map the page. This ends up being clunky in a
    few ways:
    
     - The name suggests it encodes the size of the page rather than the
       level.
     - In other places in x86_64/processor.c we just use a raw int to encode
       the level.
    
    Simplify this by adopting the kernel style of PG_LEVEL_XX enums and pass
    around raw ints when referring to the level. This makes the code easier
    to understand since these macros are very common in KVM MMU code.
    Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
    Message-Id: <20220520233249.3776001-2-dmatlack@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    4ee602e7
mmu_role_test.c 3.92 KB