From: Yanan Wang <wangyanan55@huawei.com>
To: <kvm@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Ben Gardon <bgardon@google.com>,
"Sean Christopherson" <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Andrew Jones <drjones@redhat.com>, Peter Xu <peterx@redhat.com>,
Marc Zyngier <maz@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
<wanghaibin.wang@huawei.com>, <yezengruan@huawei.com>,
<yuzenghui@huawei.com>, Yanan Wang <wangyanan55@huawei.com>
Subject: [RFC PATCH v3 1/8] tools headers: sync headers of asm-generic/hugetlb_encode.h
Date: Mon, 1 Mar 2021 14:59:09 +0800 [thread overview]
Message-ID: <20210301065916.11484-2-wangyanan55@huawei.com> (raw)
In-Reply-To: <20210301065916.11484-1-wangyanan55@huawei.com>
This patch syncs contents of tools/include/asm-generic/hugetlb_encode.h
and include/uapi/asm-generic/hugetlb_encode.h. Arch powerpc supports 16KB
hugepages and ARM64 supports 32MB/512MB hugepages. The corresponding mmap
flags have already been added in include/uapi/asm-generic/hugetlb_encode.h,
but not tools/include/asm-generic/hugetlb_encode.h.
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
---
tools/include/asm-generic/hugetlb_encode.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/include/asm-generic/hugetlb_encode.h b/tools/include/asm-generic/hugetlb_encode.h
index e4732d3c2998..4f3d5aaa11f5 100644
--- a/tools/include/asm-generic/hugetlb_encode.h
+++ b/tools/include/asm-generic/hugetlb_encode.h
@@ -20,13 +20,16 @@
#define HUGETLB_FLAG_ENCODE_SHIFT 26
#define HUGETLB_FLAG_ENCODE_MASK 0x3f
+#define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT)
#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT)
--
2.23.0
next prev parent reply other threads:[~2021-03-01 7:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 6:59 [RFC PATCH v3 0/7] KVM: selftests: some improvement and a new test for kvm page table Yanan Wang
2021-03-01 6:59 ` Yanan Wang [this message]
2021-03-01 6:59 ` [RFC PATCH v3 2/8] tools headers: Add a macro to get HUGETLB page sizes for mmap Yanan Wang
2021-03-01 6:59 ` [RFC PATCH v3 3/8] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing Yanan Wang
2021-03-01 6:59 ` [RFC PATCH v3 4/8] KVM: selftests: Make a generic helper to get vm guest mode strings Yanan Wang
2021-03-01 6:59 ` [RFC PATCH v3 5/8] KVM: selftests: Add a helper to get system configured THP page size Yanan Wang
2021-03-01 6:59 ` [RFC PATCH v3 6/8] KVM: selftests: List all hugetlb src types specified with page sizes Yanan Wang
2021-03-01 17:09 ` Ben Gardon
2021-03-02 12:21 ` wangyanan (Y)
2021-03-01 6:59 ` [RFC PATCH v3 7/8] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers Yanan Wang
2021-03-01 6:59 ` [RFC PATCH v3 8/8] KVM: selftests: Add a test for kvm page table code Yanan Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210301065916.11484-2-wangyanan55@huawei.com \
--to=wangyanan55@huawei.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=arnd@arndb.de \
--cc=bgardon@google.com \
--cc=drjones@redhat.com \
--cc=jolsa@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mingo@kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanghaibin.wang@huawei.com \
--cc=yezengruan@huawei.com \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).