b816e1b5 | 14-Feb-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove pgb_dynamic alignment assertion
The assertion was never correct, because the alignment is a composite of the image alignment and SHMLBA. Even if the image alignment didn't match
linux-user: Remove pgb_dynamic alignment assertion
The assertion was never correct, because the alignment is a composite of the image alignment and SHMLBA. Even if the image alignment didn't match the image address, an assertion would not be correct -- more appropriate would be an error message about an ill formed image. But the image cannot be held to SHMLBA under any circumstances.
Fixes: ee94743034b ("linux-user: completely re-write init_guest_space") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2157 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reported-by: Alexey Sheplyakov <asheplyakov@yandex.ru> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
78b79b2c | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Bound mmap_min_addr by host page size
Bizzarely, it is possible to set /proc/sys/vm/mmap_min_addr to a value below the host page size. Fix that.
Signed-off-by: Richard Henderson <richa
linux-user: Bound mmap_min_addr by host page size
Bizzarely, it is possible to set /proc/sys/vm/mmap_min_addr to a value below the host page size. Fix that.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-32-richard.henderson@linaro.org>
show more ...
|
ff8a8bbc | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Allow TARGET_PAGE_BITS_VARY
If set, match the host and guest page sizes.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@lina
linux-user: Allow TARGET_PAGE_BITS_VARY
If set, match the host and guest page sizes.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-30-richard.henderson@linaro.org>
show more ...
|
01e44980 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
*-user: Deprecate and disable -p pagesize
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
*-user: Deprecate and disable -p pagesize
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> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-27-richard.henderson@linaro.org>
show more ...
|
eb5027ac | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out mmap_h_gt_g
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> M
linux-user: Split out mmap_h_gt_g
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-24-richard.henderson@linaro.org>
show more ...
|
8080b2f8 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out mmap_h_lt_g
Work much harder to get alignment and mapping beyond the end of the file correct. Both of which are excercised by our test-mmap for alpha (8k pages) on any 4k page
linux-user: Split out mmap_h_lt_g
Work much harder to get alignment and mapping beyond the end of the file correct. Both of which are excercised by our test-mmap for alpha (8k pages) on any 4k page host.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-23-richard.henderson@linaro.org>
show more ...
|
68098de9 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out mmap_h_eq_g
Move the MAX_FIXED_NOREPLACE check for reserved_va earlier. Move the computation of host_prot earlier.
Signed-off-by: Richard Henderson <richard.henderson@linaro.o
linux-user: Split out mmap_h_eq_g
Move the MAX_FIXED_NOREPLACE check for reserved_va earlier. Move the computation of host_prot earlier.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-22-richard.henderson@linaro.org>
show more ...
|
3bfa271e | 13-Feb-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Use do_munmap for target_mmap failure
For the cases for which the host mmap succeeds, but does not yield the desired address, use do_munmap to restore the reserved_va memory reservation.
linux-user: Use do_munmap for target_mmap failure
For the cases for which the host mmap succeeds, but does not yield the desired address, use do_munmap to restore the reserved_va memory reservation.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
2952b642 | 13-Feb-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out do_munmap
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
ad87d26e | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Do early mmap placement only for reserved_va
For reserved_va, place all non-fixed maps then proceed as for MAP_FIXED.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Rev
linux-user: Do early mmap placement only for reserved_va
For reserved_va, place all non-fixed maps then proceed as for MAP_FIXED.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-21-richard.henderson@linaro.org>
show more ...
|
6ecc2557 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out mmap_end
Use a subroutine instead of a goto within target_mmap__locked.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.hende
linux-user: Split out mmap_end
Use a subroutine instead of a goto within target_mmap__locked.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-20-richard.henderson@linaro.org>
show more ...
|
f0a362c4 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Fix sub-host-page mmap
We cannot skip over the_end1 to the_end, because we fail to record the validity of the guest page with the interval tree. Remove "the_end" and rename "the_end1" to
linux-user: Fix sub-host-page mmap
We cannot skip over the_end1 to the_end, because we fail to record the validity of the guest page with the interval tree. Remove "the_end" and rename "the_end1" to "the_end".
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-19-richard.henderson@linaro.org>
show more ...
|
e8cec51b | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Move some mmap checks outside the lock
Basic validation of operands does not require the lock. Hoist them from target_mmap__locked back into target_mmap.
Reviewed-by: Philippe Mathieu-D
linux-user: Move some mmap checks outside the lock
Basic validation of operands does not require the lock. Hoist them from target_mmap__locked back into target_mmap.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-18-richard.henderson@linaro.org>
show more ...
|
d558c395 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Split out target_mmap__locked
All "goto fail" may be transformed to "return -1".
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.hender
linux-user: Split out target_mmap__locked
All "goto fail" may be transformed to "return -1".
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-17-richard.henderson@linaro.org>
show more ...
|
13c13397 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove qemu_host_page_size from main
Use qemu_real_host_page_size() instead.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@
linux-user: Remove qemu_host_page_size from main
Use qemu_real_host_page_size() instead.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-16-richard.henderson@linaro.org>
show more ...
|
b36b2b1d | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove HOST_PAGE_ALIGN from mmap.c
This removes a hidden use of qemu_host_page_size, using instead the existing host_page_size local within each function.
Signed-off-by: Richard Henders
linux-user: Remove HOST_PAGE_ALIGN from mmap.c
This removes a hidden use of qemu_host_page_size, using instead the existing host_page_size local within each function.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-11-richard.henderson@linaro.org>
show more ...
|
e56922ab | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c
We already have qemu_real_host_page_size() in a local variable.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard He
linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c
We already have qemu_real_host_page_size() in a local variable.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-10-richard.henderson@linaro.org>
show more ...
|
621ac47d | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove qemu_host_page_{size, mask} from mmap.c
Use qemu_real_host_page_size instead.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@l
linux-user: Remove qemu_host_page_{size, mask} from mmap.c
Use qemu_real_host_page_size instead.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-9-richard.henderson@linaro.org>
show more ...
|
2c796d23 | 27-Feb-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove qemu_host_page_size from elf_core_dump
Used only once in wmr_page_unprotect_regions.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
2cd71515 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/arm: Remove qemu_host_page_size from init_guest_commpage
Use qemu_real_host_page_size. If the commpage is not within reserved_va, use MAP_FIXED_NOREPLACE.
Signed-off-by: Richard Henderso
linux-user/arm: Remove qemu_host_page_size from init_guest_commpage
Use qemu_real_host_page_size. If the commpage is not within reserved_va, use MAP_FIXED_NOREPLACE.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-8-richard.henderson@linaro.org>
show more ...
|
51f8c9b8 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/nios2: Remove qemu_host_page_size from init_guest_commpage
Use qemu_real_host_page_size. If !reserved_va, use MAP_FIXED_NOREPLACE.
Signed-off-by: Richard Henderson <richard.henderson@lin
linux-user/nios2: Remove qemu_host_page_size from init_guest_commpage
Use qemu_real_host_page_size. If !reserved_va, use MAP_FIXED_NOREPLACE.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-7-richard.henderson@linaro.org>
show more ...
|
d1fc6230 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/hppa: Simplify init_guest_commpage
If reserved_va, then we have already reserved the entire guest virtual address space; no need to remap page. If !reserved_va, then use MAP_FIXED_NOREPLA
linux-user/hppa: Simplify init_guest_commpage
If reserved_va, then we have already reserved the entire guest virtual address space; no need to remap page. If !reserved_va, then use MAP_FIXED_NOREPLACE.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-6-richard.henderson@linaro.org>
show more ...
|
d17b684c | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove qemu_host_page_size from create_elf_tables
AT_PAGESZ is supposed to advertise the guest page size. The random adjustment made here using qemu_host_page_size does not match anythin
linux-user: Remove qemu_host_page_size from create_elf_tables
AT_PAGESZ is supposed to advertise the guest page size. The random adjustment made here using qemu_host_page_size does not match anything else within linux-user.
The idea here is good, but should be done more systemically via adjustment to TARGET_PAGE_SIZE.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-5-richard.henderson@linaro.org>
show more ...
|
ae6bffe0 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base
The host SHMLBA is by definition a multiple of the host page size. Thus the remaining component of qemu_host_page_size is the targe
linux-user: Remove qemu_host_page_{size, mask} in probe_guest_base
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> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-4-richard.henderson@linaro.org>
show more ...
|
f11c05c3 | 02-Jan-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user: Adjust SVr4 NULL page mapping
Use TARGET_PAGE_SIZE and MAP_FIXED_NOREPLACE.
We really should be attending to this earlier during probe_guest_base, as well as better detection and emulat
linux-user: Adjust SVr4 NULL page mapping
Use TARGET_PAGE_SIZE and MAP_FIXED_NOREPLACE.
We really should be attending to this earlier during probe_guest_base, as well as better detection and emulation of various Linux personalities.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20240102015808.132373-3-richard.henderson@linaro.org>
show more ...
|