From: "Emilio G. Cota" <cota@braap.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 04/10] cputlb: Split large page tracking per mmu_idx
Date: Fri, 26 Oct 2018 20:16:52 -0400 [thread overview]
Message-ID: <20181027001652.GA12509@flamenco> (raw)
In-Reply-To: <20181023070253.6407-6-richard.henderson@linaro.org>
On Tue, Oct 23, 2018 at 08:02:47 +0100, Richard Henderson wrote:
> +static void tlb_flush_page_locked(CPUArchState *env, int midx,
> + target_ulong addr)
> +{
> + target_ulong lp_addr = env->tlb_d[midx].large_page_addr;
> + target_ulong lp_mask = env->tlb_d[midx].large_page_mask;
> +
> + /* Check if we need to flush due to large pages. */
> + if ((addr & lp_mask) == lp_addr) {
> + tlb_debug("forcing full flush midx %d ("
> + TARGET_FMT_lx "/" TARGET_FMT_lx ")\n",
> + midx, lp_addr, lp_mask);
> + tlb_flush_one_mmuidx_locked(env, midx);
> + } else {
> + int pidx = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
> + tlb_flush_entry_locked(&env->tlb_table[midx][pidx], addr);
> + tlb_flush_vtlb_page_locked(env, midx, addr);
Just noticed that we should use tlb_entry here, e.g.:
} else {
- int pidx = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- tlb_flush_entry_locked(&env->tlb_table[midx][pidx], addr);
+ CPUTLBEntry *entry = tlb_entry(env, midx, addr);
+
+ tlb_flush_entry_locked(entry, addr);
tlb_flush_vtlb_page_locked(env, midx, addr);
}
Thanks,
Emilio
next prev parent reply other threads:[~2018-10-27 0:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 7:02 [Qemu-devel] [PATCH 00/10] cputlb: track dirty tlbs and general cleanup Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 01/10] cputlb: Move tlb_lock to CPUTLBCommon Richard Henderson
2018-10-23 11:03 ` Philippe Mathieu-Daudé
2018-10-23 7:02 ` [Qemu-devel] [PATCH, build fix] osdep: Work around MinGW assert Richard Henderson
2018-10-23 11:02 ` Philippe Mathieu-Daudé
2018-10-23 7:02 ` [Qemu-devel] [PATCH 02/10] cputlb: Remove tcg_enabled hack from tlb_flush_nocheck Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 03/10] cputlb: Move cpu->pending_tlb_flush to env->tlb_c.pending_flush Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 04/10] cputlb: Split large page tracking per mmu_idx Richard Henderson
2018-10-27 0:16 ` Emilio G. Cota [this message]
2018-10-28 2:30 ` Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 05/10] cputlb: Move env->vtlb_index to env->tlb_d.vindex Richard Henderson
2018-10-23 11:07 ` Philippe Mathieu-Daudé
2018-10-23 7:02 ` [Qemu-devel] [PATCH 06/10] cputlb: Merge tlb_flush_nocheck into tlb_flush_by_mmuidx_async_work Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 07/10] cputlb: Merge tlb_flush_page into tlb_flush_page_by_mmuidx Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 08/10] cputlb: Count "partial" and "elided" tlb flushes Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 09/10] cputlb: Filter flushes on already clean tlbs Richard Henderson
2018-10-23 7:02 ` [Qemu-devel] [PATCH 10/10] cputlb: Remove tlb_c.pending_flushes Richard Henderson
2018-10-23 17:11 ` [Qemu-devel] [PATCH 00/10] cputlb: track dirty tlbs and general cleanup Emilio G. Cota
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181027001652.GA12509@flamenco \
--to=cota@braap.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).