* KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty
@ 2014-02-26 1:44 Marcelo Tosatti
2014-02-26 1:51 ` Marcelo Tosatti
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2014-02-26 1:44 UTC (permalink / raw)
To: kvm-devel; +Cc: Paolo Bonzini, Xiao Guangrong
emulator_cmpxchg_emulated writes to guest memory, therefore it should
updated the dirty bitmap accordingly.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty
2014-02-26 1:44 KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty Marcelo Tosatti
@ 2014-02-26 1:51 ` Marcelo Tosatti
2014-02-26 3:32 ` Xiao Guangrong
2014-02-26 9:11 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2014-02-26 1:51 UTC (permalink / raw)
To: kvm-devel; +Cc: Paolo Bonzini, Xiao Guangrong
On Tue, Feb 25, 2014 at 10:44:54PM -0300, Marcelo Tosatti wrote:
>
> emulator_cmpxchg_emulated writes to guest memory, therefore it should
> updated the dirty bitmap accordingly.
s/updated/update/
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty
2014-02-26 1:44 KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty Marcelo Tosatti
2014-02-26 1:51 ` Marcelo Tosatti
@ 2014-02-26 3:32 ` Xiao Guangrong
2014-02-26 9:11 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Xiao Guangrong @ 2014-02-26 3:32 UTC (permalink / raw)
To: Marcelo Tosatti, kvm-devel; +Cc: Paolo Bonzini
On 02/26/2014 09:44 AM, Marcelo Tosatti wrote:
>
> emulator_cmpxchg_emulated writes to guest memory, therefore it should
> updated the dirty bitmap accordingly.
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty
2014-02-26 1:44 KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty Marcelo Tosatti
2014-02-26 1:51 ` Marcelo Tosatti
2014-02-26 3:32 ` Xiao Guangrong
@ 2014-02-26 9:11 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-02-26 9:11 UTC (permalink / raw)
To: Marcelo Tosatti, kvm-devel; +Cc: Xiao Guangrong
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 <mtosatti@redhat.com>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-26 9:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26 1:44 KVM: x86: emulator_cmpxchg_emulated should mark_page_dirty Marcelo Tosatti
2014-02-26 1:51 ` Marcelo Tosatti
2014-02-26 3:32 ` Xiao Guangrong
2014-02-26 9:11 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).