diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 52f685635766..61ebdb6390ee 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2217,9 +2217,12 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) | |||
2217 | msr = find_msr_entry(vmx, msr_index); | 2217 | msr = find_msr_entry(vmx, msr_index); |
2218 | if (msr) { | 2218 | if (msr) { |
2219 | msr->data = data; | 2219 | msr->data = data; |
2220 | if (msr - vmx->guest_msrs < vmx->save_nmsrs) | 2220 | if (msr - vmx->guest_msrs < vmx->save_nmsrs) { |
2221 | preempt_disable(); | ||
2221 | kvm_set_shared_msr(msr->index, msr->data, | 2222 | kvm_set_shared_msr(msr->index, msr->data, |
2222 | msr->mask); | 2223 | msr->mask); |
2224 | preempt_enable(); | ||
2225 | } | ||
2223 | break; | 2226 | break; |
2224 | } | 2227 | } |
2225 | ret = kvm_set_msr_common(vcpu, msr_index, data); | 2228 | ret = kvm_set_msr_common(vcpu, msr_index, data); |