KVM: MMU: filter out the mmio pfn from the fault pfn
authorXiao Guangrong <[email protected]>
Mon, 11 Jul 2011 19:28:54 +0000 (03:28 +0800)
committerAvi Kivity <[email protected]>
Sun, 24 Jul 2011 08:50:34 +0000 (11:50 +0300)
commitfce92dce79dbf5fff39c7ac2fb149729d79b7a39
tree455461b843f5f94356786ea0e21132740458588a
parentc37079586f317d7e7f1a70d36f0e5177691c89c2
KVM: MMU: filter out the mmio pfn from the fault pfn

If the page fault is caused by mmio, the gfn can not be found in memslots, and
'bad_pfn' is returned on gfn_to_hva path, so we can use 'bad_pfn' to identify
the mmio page fault.
And, to clarify the meaning of mmio pfn, we return fault page instead of bad
page when the gfn is not allowd to prefetch

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
arch/x86/kvm/mmu.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c