Skip to content

Commit d9aa56e

Browse files
kaihuangsean-jc
authored andcommitted
KVM: VMX: Do not account for temporary memory allocation in ECREATE emulation
In handle_encls_ecreate(), a page is allocated to store a copy of SECS structure used by the ENCLS[ECREATE] leaf from the guest. This page is only used temporarily and is freed after use in handle_encls_ecreate(). Don't account for the memory allocation of this page per [1]. Link: https://lore.kernel.org/kvm/b999afeb588eb75d990891855bc6d58861968f23.camel@intel.com/T/#mb81987afc3ab308bbb5861681aa9a20f2aece7fd [1] Signed-off-by: Kai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/r/20240715101224.90958-1-kai.huang@intel.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent caf22c6 commit d9aa56e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/sgx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int handle_encls_ecreate(struct kvm_vcpu *vcpu)
274274
* simultaneously set SGX_ATTR_PROVISIONKEY to bypass the check to
275275
* enforce restriction of access to the PROVISIONKEY.
276276
*/
277-
contents = (struct sgx_secs *)__get_free_page(GFP_KERNEL_ACCOUNT);
277+
contents = (struct sgx_secs *)__get_free_page(GFP_KERNEL);
278278
if (!contents)
279279
return -ENOMEM;
280280

0 commit comments

Comments
 (0)