diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2014-02-25 20:44:54 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-26 04:11:08 -0500 |
commit | d3714010c307d26df251c45be9cd12ab6d41f0c4 (patch) | |
tree | 63393c8f90a2df6ddc7435b65410d54fc63b4bf1 /arch/x86/kvm/x86.c | |
parent | 390bd528ae1c14d0b7f5db8225984f98617b3357 (diff) |
KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty
emulator_cmpxchg_emulated writes to guest memory, therefore it should
update the dirty bitmap accordingly.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6530019116b0..4cca45853dfe 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -4399,6 +4399,7 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, | |||
4399 | if (!exchanged) | 4399 | if (!exchanged) |
4400 | return X86EMUL_CMPXCHG_FAILED; | 4400 | return X86EMUL_CMPXCHG_FAILED; |
4401 | 4401 | ||
4402 | mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT); | ||
4402 | kvm_mmu_pte_write(vcpu, gpa, new, bytes); | 4403 | kvm_mmu_pte_write(vcpu, gpa, new, bytes); |
4403 | 4404 | ||
4404 | return X86EMUL_CONTINUE; | 4405 | return X86EMUL_CONTINUE; |