Message ID | 20170525210508.4910-3-aurelien@aurel32.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/25/2017 02:04 PM, Aurelien Jarno wrote: > /* XXX we exploit the fact that Linux passes the exact virtual > address here - it's not obliged to! */ > - tlb_flush_page(cs, page); > + tlb_flush_page_all_cpus_synced(cs, page); > > /* XXX 31-bit hack */ > if (page & 0x80000000) { > - tlb_flush_page(cs, page & ~0x80000000); > + tlb_flush_page_all_cpus_synced(cs, page & ~0x80000000); > } else { > - tlb_flush_page(cs, page | 0x80000000); > + tlb_flush_page_all_cpus_synced(cs, page | 0x80000000); > } Ideally we would, at the same time, implement the local-pte facility, which examines a bit in the M4 field to *not* do this. That said, Reviewed-by: Richard Henderson <rth@twiddle.net> r~
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 4b96c279e3..88e2a0f60d 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -1109,8 +1109,6 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pte_addr, uint64_t vaddr) uint64_t page = vaddr & TARGET_PAGE_MASK; uint64_t pte = 0; - /* XXX broadcast to other CPUs */ - /* XXX Linux is nice enough to give us the exact pte address. According to spec we'd have to find it out ourselves */ /* XXX Linux is fine with overwriting the pte, the spec requires @@ -1119,13 +1117,13 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pte_addr, uint64_t vaddr) /* XXX we exploit the fact that Linux passes the exact virtual address here - it's not obliged to! */ - tlb_flush_page(cs, page); + tlb_flush_page_all_cpus_synced(cs, page); /* XXX 31-bit hack */ if (page & 0x80000000) { - tlb_flush_page(cs, page & ~0x80000000); + tlb_flush_page_all_cpus_synced(cs, page & ~0x80000000); } else { - tlb_flush_page(cs, page | 0x80000000); + tlb_flush_page_all_cpus_synced(cs, page | 0x80000000); } }
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- target/s390x/mem_helper.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)