* [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation
@ 2023-11-30 20:56 Philippe Mathieu-Daudé
2024-01-08 16:47 ` Philippe Mathieu-Daudé
2024-01-08 21:16 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-30 20:56 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, Max Filippov, Richard Henderson, Paolo Bonzini,
Philippe Mathieu-Daudé
Since previous commit, tb_invalidate_phys_page() is not used
anymore in system emulation. Make it static for user emulation
and remove its public declaration in "exec/translate-all.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Based-on: <20231130203241.31099-1-philmd@linaro.org>
---
include/exec/translate-all.h | 1 -
accel/tcg/tb-maint.c | 24 +-----------------------
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h
index 88602ae8d8..85c9460c7c 100644
--- a/include/exec/translate-all.h
+++ b/include/exec/translate-all.h
@@ -23,7 +23,6 @@
/* translate-all.c */
-void tb_invalidate_phys_page(tb_page_addr_t addr);
void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
#ifdef CONFIG_USER_ONLY
diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
index 3d2a896220..da39a43bd8 100644
--- a/accel/tcg/tb-maint.c
+++ b/accel/tcg/tb-maint.c
@@ -1021,7 +1021,7 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last)
* Called with mmap_lock held for user-mode emulation
* NOTE: this function must not be called while a TB is running.
*/
-void tb_invalidate_phys_page(tb_page_addr_t addr)
+static void tb_invalidate_phys_page(tb_page_addr_t addr)
{
tb_page_addr_t start, last;
@@ -1160,28 +1160,6 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
#endif
}
-/*
- * Invalidate all TBs which intersect with the target physical
- * address page @addr.
- */
-void tb_invalidate_phys_page(tb_page_addr_t addr)
-{
- struct page_collection *pages;
- tb_page_addr_t start, last;
- PageDesc *p;
-
- p = page_find(addr >> TARGET_PAGE_BITS);
- if (p == NULL) {
- return;
- }
-
- start = addr & TARGET_PAGE_MASK;
- last = addr | ~TARGET_PAGE_MASK;
- pages = page_collection_lock(start, last);
- tb_invalidate_phys_page_range__locked(pages, p, start, last, 0);
- page_collection_unlock(pages);
-}
-
/*
* Invalidate all TBs which intersect with the target physical address range
* [start;last]. NOTE: start and end may refer to *different* physical pages.
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation
2023-11-30 20:56 [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation Philippe Mathieu-Daudé
@ 2024-01-08 16:47 ` Philippe Mathieu-Daudé
2024-01-08 21:16 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-08 16:47 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Mark Cave-Ayland, Max Filippov, Paolo Bonzini
ping?
On 30/11/23 21:56, Philippe Mathieu-Daudé wrote:
> Since previous commit, tb_invalidate_phys_page() is not used
> anymore in system emulation. Make it static for user emulation
> and remove its public declaration in "exec/translate-all.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Based-on: <20231130203241.31099-1-philmd@linaro.org>
> ---
> include/exec/translate-all.h | 1 -
> accel/tcg/tb-maint.c | 24 +-----------------------
> 2 files changed, 1 insertion(+), 24 deletions(-)
>
> diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h
> index 88602ae8d8..85c9460c7c 100644
> --- a/include/exec/translate-all.h
> +++ b/include/exec/translate-all.h
> @@ -23,7 +23,6 @@
>
>
> /* translate-all.c */
> -void tb_invalidate_phys_page(tb_page_addr_t addr);
> void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
>
> #ifdef CONFIG_USER_ONLY
> diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
> index 3d2a896220..da39a43bd8 100644
> --- a/accel/tcg/tb-maint.c
> +++ b/accel/tcg/tb-maint.c
> @@ -1021,7 +1021,7 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last)
> * Called with mmap_lock held for user-mode emulation
> * NOTE: this function must not be called while a TB is running.
> */
> -void tb_invalidate_phys_page(tb_page_addr_t addr)
> +static void tb_invalidate_phys_page(tb_page_addr_t addr)
> {
> tb_page_addr_t start, last;
>
> @@ -1160,28 +1160,6 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages,
> #endif
> }
>
> -/*
> - * Invalidate all TBs which intersect with the target physical
> - * address page @addr.
> - */
> -void tb_invalidate_phys_page(tb_page_addr_t addr)
> -{
> - struct page_collection *pages;
> - tb_page_addr_t start, last;
> - PageDesc *p;
> -
> - p = page_find(addr >> TARGET_PAGE_BITS);
> - if (p == NULL) {
> - return;
> - }
> -
> - start = addr & TARGET_PAGE_MASK;
> - last = addr | ~TARGET_PAGE_MASK;
> - pages = page_collection_lock(start, last);
> - tb_invalidate_phys_page_range__locked(pages, p, start, last, 0);
> - page_collection_unlock(pages);
> -}
> -
> /*
> * Invalidate all TBs which intersect with the target physical address range
> * [start;last]. NOTE: start and end may refer to *different* physical pages.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation
2023-11-30 20:56 [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation Philippe Mathieu-Daudé
2024-01-08 16:47 ` Philippe Mathieu-Daudé
@ 2024-01-08 21:16 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2024-01-08 21:16 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Mark Cave-Ayland, Max Filippov, Paolo Bonzini
On 12/1/23 07:56, Philippe Mathieu-Daudé wrote:
> Since previous commit, tb_invalidate_phys_page() is not used
> anymore in system emulation. Make it static for user emulation
> and remove its public declaration in "exec/translate-all.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Based-on: <20231130203241.31099-1-philmd@linaro.org>
> ---
> include/exec/translate-all.h | 1 -
> accel/tcg/tb-maint.c | 24 +-----------------------
> 2 files changed, 1 insertion(+), 24 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-08 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 20:56 [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation Philippe Mathieu-Daudé
2024-01-08 16:47 ` Philippe Mathieu-Daudé
2024-01-08 21:16 ` Richard Henderson
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).