• Sean Christopherson's avatar
    KVM: Take a 'struct page', not a pfn in kvm_is_zone_device_page() · 284dc493
    Sean Christopherson authored
    Operate on a 'struct page' instead of a pfn when checking if a page is a
    ZONE_DEVICE page, and rename the helper accordingly.  Generally speaking,
    KVM doesn't actually care about ZONE_DEVICE memory, i.e. shouldn't do
    anything special for ZONE_DEVICE memory.  Rather, KVM wants to treat
    ZONE_DEVICE memory like regular memory, and the need to identify
    ZONE_DEVICE memory only arises as an exception to PG_reserved pages. In
    other words, KVM should only ever check for ZONE_DEVICE memory after KVM
    has already verified that there is a struct page associated with the pfn.
    
    No functional change intended.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220429010416.2788472-9-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    284dc493
kvm_main.c 148 KB