* [PATCH] kvm, mmu: fix incorrect return of spte
@ 2011-09-19 4:19 Zhao Jin
2011-09-19 4:51 ` Xiao Guangrong
2011-09-19 14:21 ` Marcelo Tosatti
0 siblings, 2 replies; 3+ messages in thread
From: Zhao Jin @ 2011-09-19 4:19 UTC (permalink / raw)
To: avi; +Cc: mtosatti, linux-kernel, kvm
__update_clear_spte_slow should return original spte while the
current code returns low half of original spte combined with high
half of new spte.
Signed-off-by: Zhao Jin <cronozhj@gmail.com>
---
arch/x86/kvm/mmu.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 1c5b693..8e8da79 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -400,7 +400,8 @@ static u64 __update_clear_spte_slow(u64 *sptep, u64 spte)
/* xchg acts as a barrier before the setting of the high bits */
orig.spte_low = xchg(&ssptep->spte_low, sspte.spte_low);
- orig.spte_high = ssptep->spte_high = sspte.spte_high;
+ orig.spte_high = ssptep->spte_high;
+ ssptep->spte_high = sspte.spte_high;
count_spte_clear(sptep, spte);
return orig.spte;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm, mmu: fix incorrect return of spte
2011-09-19 4:19 [PATCH] kvm, mmu: fix incorrect return of spte Zhao Jin
@ 2011-09-19 4:51 ` Xiao Guangrong
2011-09-19 14:21 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Xiao Guangrong @ 2011-09-19 4:51 UTC (permalink / raw)
To: Zhao Jin; +Cc: avi, mtosatti, linux-kernel, kvm
On 09/19/2011 12:19 PM, Zhao Jin wrote:
> __update_clear_spte_slow should return original spte while the
> current code returns low half of original spte combined with high
> half of new spte.
>
Thanks for your fixing.
Reviewed-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm, mmu: fix incorrect return of spte
2011-09-19 4:19 [PATCH] kvm, mmu: fix incorrect return of spte Zhao Jin
2011-09-19 4:51 ` Xiao Guangrong
@ 2011-09-19 14:21 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2011-09-19 14:21 UTC (permalink / raw)
To: Zhao Jin; +Cc: avi, linux-kernel, kvm
On Mon, Sep 19, 2011 at 12:19:51PM +0800, Zhao Jin wrote:
> __update_clear_spte_slow should return original spte while the
> current code returns low half of original spte combined with high
> half of new spte.
>
> Signed-off-by: Zhao Jin <cronozhj@gmail.com>
> ---
> arch/x86/kvm/mmu.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-19 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 4:19 [PATCH] kvm, mmu: fix incorrect return of spte Zhao Jin
2011-09-19 4:51 ` Xiao Guangrong
2011-09-19 14:21 ` Marcelo Tosatti
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).