]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: filter out the mmio pfn from the fault pfn
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Mon, 11 Jul 2011 19:28:54 +0000 (03:28 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Jul 2011 08:50:34 +0000 (11:50 +0300)
commitb39414485f2ccc68d429f9521d9cdae01bcdf7b3
tree455461b843f5f94356786ea0e21132740458588a
parentf1baa58bf8af33885c6185317065acdc7ac39273
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 <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c