KVM: VMX: Set msr bitmap correctly if vcpu is in guest mode
authorWincy Van <fanwenyi0529@gmail.com>
Wed, 4 Mar 2015 06:31:56 +0000 (14:31 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 13 Mar 2015 12:24:51 +0000 (09:24 -0300)
commit670125bda1d86edfadf81dc56a87582ac7fbd47b
tree3aa81d60a6db3effc49ca1a890aa50e071af21e4
parentc1a6bff28cbff796bf6e7db5cf42ec9244911be2
KVM: VMX: Set msr bitmap correctly if vcpu is in guest mode

In commit 3af18d9c5fe9 ("KVM: nVMX: Prepare for using hardware MSR bitmap"),
we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This
is not enough since the field will be modified by following vmx_set_efer.

Fix this by setting vmx_msr_bitmap_nested in vmx_set_msr_bitmap if vcpu is
in guest mode.

Signed-off-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c