qemu-devel
[Top][All Lists]
Advanced

[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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]