aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 266bdaf0ce44..0ed662dc72d2 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -535,8 +535,10 @@ static inline int valid_vcpu(int n)
535 535
536inline int kvm_is_mmio_pfn(pfn_t pfn) 536inline int kvm_is_mmio_pfn(pfn_t pfn)
537{ 537{
538 if (pfn_valid(pfn)) 538 if (pfn_valid(pfn)) {
539 return PageReserved(pfn_to_page(pfn)); 539 struct page *page = compound_head(pfn_to_page(pfn));
540 return PageReserved(page);
541 }
540 542
541 return true; 543 return true;
542} 544}