target_linux_rockchip-6.x/patches-6.2/991-fix-arm64-kvm-for-openwrt.patch
2023-02-21 06:08:38 +08:00

13 lines
517 B
Diff

--- a/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
+++ b/arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
@@ -286,7 +286,9 @@ static void init_elf(const char *path)
assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u");
assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u");
assert_eq(elf16toh(elf.ehdr->e_type), ET_REL, "%u");
+#ifdef EM_AARCH64
assert_eq(elf16toh(elf.ehdr->e_machine), EM_AARCH64, "%u");
+#endif
/* Populate fields of the global struct. */
elf.sh_table = section_by_off(elf64toh(elf.ehdr->e_shoff));