Paul Mackerras 1e5bf454f5 KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE
The reference (R) and change (C) bits in a HPT entry can be set by
hardware at any time up until the HPTE is invalidated and the TLB
invalidation sequence has completed.  This means that when removing
a HPTE, we need to read the HPTE after the invalidation sequence has
completed in order to obtain reliable values of R and C.  The code
in kvmppc_do_h_remove() used to do this.  However, commit 6f22bd3265fb
("KVM: PPC: Book3S HV: Make HTAB code LE host aware") removed the
read after invalidation as a side effect of other changes.  This
restores the read of the HPTE after invalidation.

The user-visible effect of this bug would be that when migrating a
guest, there is a small probability that a page modified by the guest
and then unmapped by the guest might not get re-transmitted and thus
the destination might end up with a stale copy of the page.

Fixes: 6f22bd3265fb
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2015-08-22 11:16:18 +02:00
..
2015-08-22 11:16:16 +02:00
2014-09-24 14:07:58 +02:00
2014-09-22 10:11:32 +02:00
2014-12-18 16:05:28 -08:00
2014-11-03 12:12:32 +11:00
2015-04-08 10:46:58 +02:00
2015-08-22 11:16:16 +02:00
2014-07-28 19:29:15 +02:00
2014-07-28 19:29:15 +02:00