[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 15/33] linux-user: Remove qemu_host_page_size from main
|
From: |
Ilya Leoshkevich |
|
Subject: |
Re: [PATCH v3 15/33] linux-user: Remove qemu_host_page_size from main |
|
Date: |
Mon, 29 Jan 2024 15:44:07 +0100 |
On Tue, Jan 02, 2024 at 12:57:50PM +1100, Richard Henderson wrote:
> Use qemu_real_host_page_size() instead.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/main.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 0cdaf30d34..5f217cc2a8 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
[...]
> @@ -806,8 +806,10 @@ int main(int argc, char **argv, char **envp)
> */
> max_reserved_va = MAX_RESERVED_VA(cpu);
> if (reserved_va != 0) {
> - if ((reserved_va + 1) % qemu_host_page_size) {
> - char *s = size_to_str(qemu_host_page_size);
> + int host_page_size = qemu_real_host_page_size();
> +
> + if ((reserved_va + 1) % host_page_size) {
> + char *s = size_to_str(host_page_size);
Does it make sense to allow values not divisible by TARGET_PAGE_SIZE
here? It's probably not a big deal, since in the worst case we'll
only waste a few bytes, so:
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
[...]
- Re: [PATCH v3 12/33] hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init, (continued)
- [PATCH v3 13/33] softmmu/physmem: Remove qemu_host_page_size, Richard Henderson, 2024/01/01
- [PATCH v3 14/33] softmmu/physmem: Remove HOST_PAGE_ALIGN, Richard Henderson, 2024/01/01
- [PATCH v3 15/33] linux-user: Remove qemu_host_page_size from main, Richard Henderson, 2024/01/01
- [PATCH v3 16/33] linux-user: Split out target_mmap__locked, Richard Henderson, 2024/01/01
- [PATCH v3 17/33] linux-user: Move some mmap checks outside the lock, Richard Henderson, 2024/01/01
- [PATCH v3 18/33] linux-user: Fix sub-host-page mmap, Richard Henderson, 2024/01/01
- [PATCH v3 19/33] linux-user: Split out mmap_end, Richard Henderson, 2024/01/01