]> git.proxmox.com Git - mirror_qemu.git/commit - target/ppc/mmu-hash64.c
target/ppc: Fix ordering of hash MMU accesses
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 15 Feb 2019 17:00:23 +0000 (18:00 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 25 Feb 2019 22:21:25 +0000 (09:21 +1100)
commit3054b0ca4bdd83e0780bd76805ca17aa733031c8
tree9f53c5e901a52ca745dfc2ae28d9de8668188122
parent2819282dae6c38b2c9d5499ad748b1471f26af1a
target/ppc: Fix ordering of hash MMU accesses

With mttcg, we can have MMU lookups happening at the same time
as the guest modifying the page tables.

Since the HPTEs of the hash table MMU contains two words (or
double worlds on 64-bit), we need to make sure we read them
in the right order, with the correct memory barrier.

Additionally, when using emulated SPAPR mode, the hypercalls
writing to the hash table must also perform the udpates in
the right order.

Note: This part is still not entirely correct

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190215170029.15641-7-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
target/ppc/mmu-hash32.c
target/ppc/mmu-hash64.c