From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty Date: Wed, 26 Feb 2014 10:11:48 +0100 Message-ID: <530DAFD4.9050104@redhat.com> References: <20140226014454.GA25423@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Xiao Guangrong To: Marcelo Tosatti , kvm-devel Return-path: Received: from mail-qa0-f41.google.com ([209.85.216.41]:44906 "EHLO mail-qa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbaBZJLx (ORCPT ); Wed, 26 Feb 2014 04:11:53 -0500 Received: by mail-qa0-f41.google.com with SMTP id j5so710659qaq.14 for ; Wed, 26 Feb 2014 01:11:53 -0800 (PST) In-Reply-To: <20140226014454.GA25423@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Il 26/02/2014 02:44, Marcelo Tosatti ha scritto: > > emulator_cmpxchg_emulated writes to guest memory, therefore it should > updated the dirty bitmap accordingly. > > Signed-off-by: Marcelo Tosatti > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 39c28f09..29db96d 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -4394,6 +4394,7 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt, > if (!exchanged) > return X86EMUL_CMPXCHG_FAILED; > > + mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT); > kvm_mmu_pte_write(vcpu, gpa, new, bytes); > > return X86EMUL_CONTINUE; > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Applied to kvm/queue, thanks. Paolo