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>
This commit is contained in:
parent
cebaf7434b
commit
ec139c3dd0
1 changed files with 1 additions and 1 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue