From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Fri, 21 Jul 2023 17:07:27 +0200 Subject: [RFC PATCH v11 13/29] KVM: Add transparent hugepage support for dedicated guest memory In-Reply-To: <20230718234512.1690985-14-seanjc@google.com> References: <20230718234512.1690985-1-seanjc@google.com> <20230718234512.1690985-14-seanjc@google.com> Message-ID: <84a908ae-04c7-51c7-c9a8-119e1933a189@redhat.com> List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 7/19/23 01:44, Sean Christopherson wrote: > > @@ -413,6 +454,9 @@ int kvm_gmem_create(struct kvm *kvm, struct kvm_create_guest_memfd *args) > u64 flags = args->flags; > u64 valid_flags = 0; > > + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) > + valid_flags |= KVM_GUEST_MEMFD_ALLOW_HUGEPAGE; > + I think it should be always allowed. The outcome would just be "never have a hugepage" if thp is not enabled in the kernel. Paolo