[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c
|
From: |
Ilya Leoshkevich |
|
Subject: |
Re: [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c |
|
Date: |
Tue, 30 Jan 2024 14:13:19 +0100 |
On Tue, Jan 02, 2024 at 12:58:00PM +1100, Richard Henderson wrote:
> When guest page size > host page size, this test can fail
> due to the SIGBUS protection hack. Avoid this by making
> sure that the file size is at least one guest page.
Maybe also mention PAGE_PASSTHROUGH?
> Visible with alpha guest on x86_64 host.
I had to apply (very hacky):
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -803,7 +803,7 @@ int main(int argc, char **argv, char **envp)
* The most efficient setting is to match the host.
*/
host_page_size = qemu_real_host_page_size();
- set_preferred_target_page_bits(ctz32(host_page_size));
+ set_preferred_target_page_bits(ctz32(host_page_size) + 1);
finalize_target_page_bits();
in order to see this. Is there a way to set the guest page size from
the command line?
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> tests/tcg/multiarch/linux/linux-madvise.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
- Re: [PATCH v3 22/33] linux-user: Split out mmap_h_lt_g, (continued)
- [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
- Re: [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c,
Ilya Leoshkevich <=
- [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
- [PATCH v3 30/33] target/arm: Enable TARGET_PAGE_BITS_VARY for AArch64 user-only, Richard Henderson, 2024/01/01
- [PATCH v3 33/33] target/alpha: Enable TARGET_PAGE_BITS_VARY for user-only, Richard Henderson, 2024/01/01