KVM: MMU: fix check the reserved bits on the gpte of L2
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Mon, 5 Aug 2013 04:59:19 +0000 (12:59 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 Aug 2013 13:57:33 +0000 (15:57 +0200)
commit027664216d37afe80101de91f73dfbaf6b36ee65
treececa9fe0c20332082886962987d54ed3c3679ba5
parent205befd9a5c701b56f569434045821f413f08f6d
KVM: MMU: fix check the reserved bits on the gpte of L2

Current code always uses arch.mmu to check the reserved bits on guest gpte
which is valid only for L1 guest, we should use arch.nested_mmu instead when
we translate gva to gpa for the L2 guest

Fix it by using @mmu instead since it is adapted to the current mmu mode
automatically

The bug can be triggered when nested npt is used and L1 guest and L2 guest
use different mmu mode

Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/paging_tmpl.h