Libvtv: Add loongarch support.

The loongarch64 specification permits page sizes of 4KiB, 16KiB and 64KiB,
but only 16KiB pages are supported for now.

Co-Authored-By: qijingwen <qijingwen@loongson.cn>

include/ChangeLog:

	* vtv-change-permission.h (defined): Determines whether the macro
	__loongarch_lp64 is defined
	(VTV_PAGE_SIZE): Set VTV_PAGE_SIZE to 16KiB for loongarch64.

libvtv/ChangeLog:

	* configure.tgt: Add loongarch support.
This commit is contained in:
Lulu Cheng 2022-09-27 15:28:43 +08:00
parent 259a11555c
commit 27b9e1158b
2 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,10 @@ extern void __VLTChangePermission (int);
#else
#if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
#define VTV_PAGE_SIZE 8192
#elif defined(__loongarch_lp64)
/* The page size is configurable by the kernel to be 4, 16 or 64 KiB.
For now, only the default page size of 16KiB is supported. */
#define VTV_PAGE_SIZE 16384
#else
#define VTV_PAGE_SIZE 4096
#endif

View File

@ -50,6 +50,9 @@ case "${target}" in
;;
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
;;
loongarch*-*-linux*)
VTV_SUPPORTED=yes
;;
*)
;;
esac