[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/33] linux-user: Remove qemu_host_page_{size, mask} in probe
From: |
Richard Henderson |
Subject: |
[PATCH v2 03/33] linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base |
Date: |
Thu, 31 Aug 2023 19:23:01 -0700 |
The host SHMLBA is by definition a multiple of the host page size.
Thus the remaining component of qemu_host_page_size is the
target page size.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 803281a53a..7851003147 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2712,7 +2712,7 @@ static bool pgb_addr_set(PGBAddrs *ga, abi_ulong
guest_loaddr,
/* Add any HI_COMMPAGE not covered by reserved_va. */
if (reserved_va < HI_COMMPAGE) {
- ga->bounds[n][0] = HI_COMMPAGE & qemu_host_page_mask;
+ ga->bounds[n][0] = HI_COMMPAGE & -qemu_real_host_page_size();
ga->bounds[n][1] = HI_COMMPAGE + TARGET_PAGE_SIZE - 1;
n++;
}
@@ -2894,7 +2894,7 @@ void probe_guest_base(const char *image_name, abi_ulong
guest_loaddr,
abi_ulong guest_hiaddr)
{
/* In order to use host shmat, we must be able to honor SHMLBA. */
- uintptr_t align = MAX(SHMLBA, qemu_host_page_size);
+ uintptr_t align = MAX(SHMLBA, TARGET_PAGE_SIZE);
/* Sanity check the guest binary. */
if (reserved_va) {
--
2.34.1
- [PATCH v2 00/33] linux-user: Improve host and guest page size handling, Richard Henderson, 2023/08/31
- [PATCH v2 02/33] linux-user: Adjust SVr4 NULL page mapping, Richard Henderson, 2023/08/31
- [PATCH v2 01/33] accel/tcg: Remove qemu_host_page_size from page_protect/page_unprotect, Richard Henderson, 2023/08/31
- [PATCH v2 03/33] linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base,
Richard Henderson <=
- [PATCH v2 04/33] linux-user: Remove qemu_host_page_size from create_elf_tables, Richard Henderson, 2023/08/31
- [PATCH v2 05/33] linux-user/hppa: Simplify init_guest_commpage, Richard Henderson, 2023/08/31
- [PATCH v2 06/33] linux-user/nios2: Remove qemu_host_page_size from init_guest_commpage, Richard Henderson, 2023/08/31
- [PATCH v2 09/33] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2023/08/31
- [PATCH v2 10/33] linux-user: Remove HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2023/08/31
- [PATCH v2 11/33] migration: Remove qemu_host_page_size, Richard Henderson, 2023/08/31
- [PATCH v2 08/33] linux-user: Remove qemu_host_page_{size, mask} from mmap.c, Richard Henderson, 2023/08/31
- [PATCH v2 07/33] linux-user/arm: Remove qemu_host_page_size from init_guest_commpage, Richard Henderson, 2023/08/31
- [PATCH v2 13/33] softmmu/physmem: Remove qemu_host_page_size, Richard Henderson, 2023/08/31
- [PATCH v2 14/33] softmmu/physmem: Remove HOST_PAGE_ALIGN, Richard Henderson, 2023/08/31