[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 26/33] *-user: Deprecate and disable -p pagesize
|
From: |
Ilya Leoshkevich |
|
Subject: |
Re: [PATCH v3 26/33] *-user: Deprecate and disable -p pagesize |
|
Date: |
Tue, 30 Jan 2024 14:16:36 +0100 |
On Tue, Jan 02, 2024 at 12:58:01PM +1100, Richard Henderson wrote:
> This option controls the host page size. From the mis-usage in
> our own testsuite, this is easily confused with guest page size.
>
> The only thing that occurs when changing the host page size is
> that stuff breaks, because one cannot actually change the host
> page size. Therefore reject all but the no-op setting as part
> of the deprecation process.
>
> Reviewed-by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> docs/about/deprecated.rst | 7 +++++++
> docs/user/main.rst | 3 ---
> bsd-user/main.c | 9 +++++----
> linux-user/main.c | 11 ++++++-----
> 4 files changed, 18 insertions(+), 12 deletions(-)
[...]
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 5f217cc2a8..9ba4dc5872 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -332,10 +332,11 @@ static void handle_arg_ld_prefix(const char *arg)
>
> static void handle_arg_pagesize(const char *arg)
> {
> - qemu_host_page_size = atoi(arg);
> - if (qemu_host_page_size == 0 ||
> - (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) {
> - fprintf(stderr, "page size must be a power of two\n");
> + unsigned size, want = qemu_real_host_page_size();
> +
> + if (qemu_strtoui(arg, NULL, 10, &size) || size != want) {
> + error_report("Deprecated page size option cannot "
> + "change host page size (%u)", want);
> exit(EXIT_FAILURE);
I wonder if this should rather be a warning for one release?
[...]
- Re: [PATCH v3 20/33] linux-user: Do early mmap placement only for reserved_va, (continued)
- [PATCH v3 22/33] linux-user: Split out mmap_h_lt_g, Richard Henderson, 2024/01/01
- [PATCH v3 23/33] linux-user: Split out mmap_h_gt_g, Richard Henderson, 2024/01/01
- [PATCH v3 26/33] *-user: Deprecate and disable -p pagesize, Richard Henderson, 2024/01/01
- [PATCH v3 27/33] cpu: Remove page_size_init, Richard Henderson, 2024/01/01
- [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c, Richard Henderson, 2024/01/01
- [PATCH v3 28/33] accel/tcg: Disconnect TargetPageDataNode from page size, Richard Henderson, 2024/01/01
- [PATCH v3 29/33] linux-user: Allow TARGET_PAGE_BITS_VARY, Richard Henderson, 2024/01/01
- [PATCH v3 31/33] linux-user: Bound mmap_min_addr by host page size, Richard Henderson, 2024/01/01