From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, laurent@vivier.eu
Subject: Re: [PATCH v2 7/7] accel/tcg: Move remainder of page locking to tb-maint.c
Date: Thu, 01 Dec 2022 14:22:56 +0000 [thread overview]
Message-ID: <87zgc7b3tk.fsf@linaro.org> (raw)
In-Reply-To: <20221027111258.348196-8-richard.henderson@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> The only thing that still touches PageDesc in translate-all.c
> are some locking routines related to tb-maint.c which have not
> yet been moved. Do so now.
>
> Move some code up in tb-maint.c as well, to untangle the maze
> of ifdefs, and allow a sensible final ordering.
>
> Move some declarations from exec/translate-all.h to internal.h,
> as they are only used within accel/tcg/.
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
<snip>
> #ifdef CONFIG_USER_ONLY
> +
> +/*
> + * In user-mode page locks aren't used; mmap_lock is enough.
> + */
> +#define assert_page_locked(pd) tcg_debug_assert(have_mmap_lock())
> +
> +static inline void page_lock_pair(PageDesc **ret_p1, tb_page_addr_t phys1,
> + PageDesc **ret_p2, tb_page_addr_t phys2,
> + bool alloc)
> +{
> + *ret_p1 = NULL;
> + *ret_p2 = NULL;
> +}
> +
> +static inline void page_lock(PageDesc *pd) { }
> +static inline void page_unlock(PageDesc *pd) { }
> +static inline void page_lock_tb(const TranslationBlock *tb) { }
> +static inline void page_unlock_tb(const TranslationBlock *tb) { }
> +
<snip>
clang picks up that page_lock is unused in this branch of the code.
--
Alex Bennée
next prev parent reply other threads:[~2022-12-01 14:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 11:12 [PATCH v2 0/7] accel/tcg: Rewrite user-only vma tracking Richard Henderson
2022-10-27 11:12 ` [PATCH v2 1/7] util: Add interval-tree.c Richard Henderson
2022-10-27 11:12 ` [PATCH v2 2/7] accel/tcg: Use interval tree for TBs in user-only mode Richard Henderson
2022-10-27 11:12 ` [PATCH v2 3/7] accel/tcg: Use interval tree for TARGET_PAGE_DATA_SIZE Richard Henderson
2022-10-27 11:12 ` [PATCH v2 4/7] accel/tcg: Move page_{get,set}_flags to user-exec.c Richard Henderson
2022-10-27 11:12 ` [PATCH v2 5/7] accel/tcg: Use interval tree for user-only page tracking Richard Henderson
2022-10-27 11:12 ` [PATCH v2 6/7] accel/tcg: Move PageDesc tree into tb-maint.c for system Richard Henderson
2022-10-27 11:12 ` [PATCH v2 7/7] accel/tcg: Move remainder of page locking to tb-maint.c Richard Henderson
2022-12-01 14:22 ` Alex Bennée [this message]
2022-12-04 1:03 ` Richard Henderson
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=87zgc7b3tk.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--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).