diff options
| author | Xuemei Liu <liu.xuemei1@zte.com.cn> | 2025-09-24 13:18:03 +0800 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2025-10-03 13:15:14 +1000 |
| commit | ec139c3dd00599e3e71b28c30b8207f6f15207c7 (patch) | |
| tree | 78dd6ccd5dda17ace7793139ec4852f42b4d90ec | |
| parent | cebaf7434b4af059caca053ee1ec7ed8df91c2a7 (diff) | |
| download | focaccia-qemu-ec139c3dd00599e3e71b28c30b8207f6f15207c7.tar.gz focaccia-qemu-ec139c3dd00599e3e71b28c30b8207f6f15207c7.zip | |
qemu/osdep: align memory allocations to 2M on RISC-V
Similar to other architectures (e.g., x86_64, aarch64), utilizing THP on RISC-V KVM requires 2MiB-aligned memory blocks. Signed-off-by: Xuemei Liu <liu.xuemei1@zte.com.cn> Reviewed-by: David Hildenbrand <david@redhat.com> Message-ID: <20250924131803656Yqt9ZJKfevWkInaGppFdE@zte.com.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
| -rw-r--r-- | include/qemu/osdep.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 1b38cb7e45..6de6c0c4e5 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -561,7 +561,7 @@ int madvise(char *, size_t, int); #if defined(__linux__) && \ (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) \ - || defined(__powerpc64__)) + || defined(__powerpc64__) || defined(__riscv)) /* Use 2 MiB alignment so transparent hugepages can be used by KVM. Valgrind does not support alignments larger than 1 MiB, therefore we need special code which handles running on Valgrind. */ |