* [PATCH] LoongArch: Libvtv add LoongArch support.
@ 2022-09-26 2:00 Lulu Cheng
2022-09-26 5:38 ` Xi Ruoyao
0 siblings, 1 reply; 4+ messages in thread
From: Lulu Cheng @ 2022-09-26 2:00 UTC (permalink / raw)
To: gcc-patches, mliska; +Cc: xry111, xuchenghua, qijingwen, Lulu Cheng, qijingwen
Co-Authored-By: qijingwen <qijingwen@rd.loongson.cn>
include/ChangeLog:
* vtv-change-permission.h (defined):
(VTV_PAGE_SIZE): 16k pages under loongarch64.
libvtv/ChangeLog:
* configure.tgt: Add loongarch support.
---
include/vtv-change-permission.h | 2 ++
libvtv/configure.tgt | 3 +++
2 files changed, 5 insertions(+)
diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.h
index 70bdad92bca..47bcdb8057a 100644
--- a/include/vtv-change-permission.h
+++ b/include/vtv-change-permission.h
@@ -48,6 +48,8 @@ extern void __VLTChangePermission (int);
#else
#if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
#define VTV_PAGE_SIZE 8192
+#elif defined(__loongarch__)
+#define VTV_PAGE_SIZE 16384
#else
#define VTV_PAGE_SIZE 4096
#endif
diff --git a/libvtv/configure.tgt b/libvtv/configure.tgt
index aa2a3f675b8..6cdd1e97ab1 100644
--- a/libvtv/configure.tgt
+++ b/libvtv/configure.tgt
@@ -50,6 +50,9 @@ case "${target}" in
;;
x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
;;
+ loongarch*-*-linux*)
+ VTV_SUPPORTED=yes
+ ;;
*)
;;
esac
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Libvtv add LoongArch support.
2022-09-26 2:00 [PATCH] LoongArch: Libvtv add LoongArch support Lulu Cheng
@ 2022-09-26 5:38 ` Xi Ruoyao
2022-09-27 2:37 ` Lulu Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Xi Ruoyao @ 2022-09-26 5:38 UTC (permalink / raw)
To: Lulu Cheng, gcc-patches, mliska; +Cc: xuchenghua, qijingwen, qijingwen
On Mon, 2022-09-26 at 10:00 +0800, Lulu Cheng wrote:
> Co-Authored-By: qijingwen <qijingwen@rd.loongson.cn>
>
> include/ChangeLog:
>
> * vtv-change-permission.h (defined):
> (VTV_PAGE_SIZE): 16k pages under loongarch64.
We have 4KB, 16KB, and 64KB page configurations, so is it possible to
support all of them without too much overhead? If not, supporting only
16KB is OK as it's the default.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Libvtv add LoongArch support.
2022-09-26 5:38 ` Xi Ruoyao
@ 2022-09-27 2:37 ` Lulu Cheng
2022-09-27 3:08 ` Xi Ruoyao
0 siblings, 1 reply; 4+ messages in thread
From: Lulu Cheng @ 2022-09-27 2:37 UTC (permalink / raw)
To: Xi Ruoyao, gcc-patches, mliska; +Cc: xuchenghua, qijingwen, qijingwen
I asked my colleagues in the kernel group, this page size may change.
That there is a macro BIG_PAGE_SIZE comment in vtv-change-permission.h
written like this:"Replace '4096' below with correct big page size."
I understand that this is to get the page size at runtime, but I don't
see where this macro is used,
is there something wrong with my understanding?
在 2022/9/26 下午1:38, Xi Ruoyao 写道:
> On Mon, 2022-09-26 at 10:00 +0800, Lulu Cheng wrote:
>> Co-Authored-By: qijingwen <qijingwen@rd.loongson.cn>
>>
>> include/ChangeLog:
>>
>> * vtv-change-permission.h (defined):
>> (VTV_PAGE_SIZE): 16k pages under loongarch64.
> We have 4KB, 16KB, and 64KB page configurations, so is it possible to
> support all of them without too much overhead? If not, supporting only
> 16KB is OK as it's the default.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Libvtv add LoongArch support.
2022-09-27 2:37 ` Lulu Cheng
@ 2022-09-27 3:08 ` Xi Ruoyao
0 siblings, 0 replies; 4+ messages in thread
From: Xi Ruoyao @ 2022-09-27 3:08 UTC (permalink / raw)
To: Lulu Cheng, gcc-patches, mliska
Cc: xuchenghua, qijingwen, qijingwen, Caroline Tice
+ Caroline (the author or libvtv, I hope the email address is still
active).
On Tue, 2022-09-27 at 10:37 +0800, Lulu Cheng wrote:
> I asked my colleagues in the kernel group, this page size may change.
>
> That there is a macro BIG_PAGE_SIZE comment in vtv-change-permission.h
>
> written like this:"Replace '4096' below with correct big page size."
>
> I understand that this is to get the page size at runtime, but I don't
> see where this macro is used,
>
> is there something wrong with my understanding?
Frankly, I've never used libvtv (Linux From Scratch does not --enable-
vtable-verify). But if I understand correctly, we can set "65536" here
and *I guess* the result will be able to function on 4/16/64 KB pages
(but with some performance overhead on 4/16 KB).
"BIG_PAGE_SIZE" seems not defined anywhere in GCC...
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-27 3:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 2:00 [PATCH] LoongArch: Libvtv add LoongArch support Lulu Cheng
2022-09-26 5:38 ` Xi Ruoyao
2022-09-27 2:37 ` Lulu Cheng
2022-09-27 3:08 ` Xi Ruoyao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).