提交 97b95aae 编写于 作者: D David Hildenbrand 提交者: Richard Henderson

target/s390x: Improve heuristic for ipte

If only the page index is set, most likely we don't have a valid
virtual address. Let's do a full tlb flush for that case.
Signed-off-by: NDavid Hildenbrand <david@redhat.com>
Message-Id: <20170622094151.28633-3-david@redhat.com>
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 faf1c63d
......@@ -1630,16 +1630,23 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pto, uint64_t vaddr,
/* XXX we exploit the fact that Linux passes the exact virtual
address here - it's not obliged to! */
if (m4 & 1) {
tlb_flush_page(cs, page);
} else {
tlb_flush_page_all_cpus_synced(cs, page);
}
/* XXX 31-bit hack */
if (m4 & 1) {
tlb_flush_page(cs, page ^ 0x80000000);
if (vaddr & ~VADDR_PX) {
tlb_flush_page(cs, page);
/* XXX 31-bit hack */
tlb_flush_page(cs, page ^ 0x80000000);
} else {
/* looks like we don't have a valid virtual address */
tlb_flush(cs);
}
} else {
tlb_flush_page_all_cpus_synced(cs, page ^ 0x80000000);
if (vaddr & ~VADDR_PX) {
tlb_flush_page_all_cpus_synced(cs, page);
/* XXX 31-bit hack */
tlb_flush_page_all_cpus_synced(cs, page ^ 0x80000000);
} else {
/* looks like we don't have a valid virtual address */
tlb_flush_all_cpus_synced(cs);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册