diff mbox series

[v3,13/33] softmmu/physmem: Remove qemu_host_page_size

Message ID 20240102015808.132373-14-richard.henderson@linaro.org
State Superseded
Headers show
Series linux-user: Improve host and guest page size handling | expand

Commit Message

Richard Henderson Jan. 2, 2024, 1:57 a.m. UTC
Use qemu_real_host_page_size() instead.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 system/physmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Jan. 3, 2024, 3:30 p.m. UTC | #1
On 2/1/24 02:57, Richard Henderson wrote:
> Use qemu_real_host_page_size() instead.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   system/physmem.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Ilya Leoshkevich Jan. 29, 2024, 2:28 p.m. UTC | #2
On Tue, Jan 02, 2024 at 12:57:48PM +1100, Richard Henderson wrote:
> Use qemu_real_host_page_size() instead.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  system/physmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff mbox series

Patch

diff --git a/system/physmem.c b/system/physmem.c
index a63853a7bc..c09953270f 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -3520,7 +3520,7 @@  int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length)
          *    fallocate works on hugepages and shmem
          *    shared anonymous memory requires madvise REMOVE
          */
-        need_madvise = (rb->page_size == qemu_host_page_size);
+        need_madvise = (rb->page_size == qemu_real_host_page_size());
         need_fallocate = rb->fd != -1;
         if (need_fallocate) {
             /* For a file, this causes the area of the file to be zero'd