KVM: MMU: check kvm_mmu_pages and mmu_page_path indices
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Wed, 24 Feb 2016 08:46:06 +0000 (09:46 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Mar 2016 11:35:24 +0000 (12:35 +0100)
commite23d3fef83df8e303fded0ab55b379beec0dd604
tree3dd0a917c2639a42ecdcf55ad6871cb2f004ba6c
parent0a47cd85833e56574a926cad309726f4f7859544
KVM: MMU: check kvm_mmu_pages and mmu_page_path indices

Give a special invalid index to the root of the walk, so that we
can check the consistency of kvm_mmu_pages and mmu_page_path.

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
[Extracted from a bigger patch proposed by Guangrong. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c