]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - virt/kvm/kvm_main.c
KVM: MMU: handle compound pages in kvm_is_mmio_pfn
[karo-tx-linux.git] / virt / kvm / kvm_main.c
index 29a667ce35b0ebc1840f1fcbb6ae3cf3313fa3b8..65c00b34248fd29c100b5ded64b559a85039a842 100644 (file)
@@ -581,8 +581,10 @@ static inline int valid_vcpu(int n)
 
 inline int kvm_is_mmio_pfn(pfn_t pfn)
 {
-       if (pfn_valid(pfn))
-               return PageReserved(pfn_to_page(pfn));
+       if (pfn_valid(pfn)) {
+               struct page *page = compound_head(pfn_to_page(pfn));
+               return PageReserved(page);
+       }
 
        return true;
 }
@@ -828,6 +830,9 @@ static struct kvm *kvm_create_vm(void)
 
        if (IS_ERR(kvm))
                goto out;
+#ifdef CONFIG_HAVE_KVM_IRQCHIP
+       INIT_HLIST_HEAD(&kvm->mask_notifier_list);
+#endif
 
 #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
        page = alloc_page(GFP_KERNEL | __GFP_ZERO);