aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Hao <flyingpeng@tencent.com>2023-07-28 14:49:48 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2023-07-29 11:05:25 -0400
commitfd1815ea709e414f83a06e4cf13ade4a49dd0fda (patch)
tree1166320be25b90222386e64f9cb6abb9ecc683bf
parentbf672720e83cf04c007aa11c242229e70985135b (diff)
downloadkvm-s390-vfio-fd1815ea709e414f83a06e4cf13ade4a49dd0fda.tar.gz
KVM: X86: Use GFP_KERNEL_ACCOUNT for pid_table in ipiv
The pid_table of ipiv is the persistent memory allocated by per-vcpu, which should be counted into the memory cgroup. Signed-off-by: Peng Hao <flyingpeng@tencent.com> Message-Id: <CAPm50aLxCQ3TQP2Lhc0PX3y00iTRg+mniLBqNDOC=t9CLxMwwA@mail.gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/vmx/vmx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 0ecf4be2c6af0e..3c5a13f054fce0 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -4651,7 +4651,8 @@ static int vmx_alloc_ipiv_pid_table(struct kvm *kvm)
if (kvm_vmx->pid_table)
return 0;
- pages = alloc_pages(GFP_KERNEL | __GFP_ZERO, vmx_get_pid_table_order(kvm));
+ pages = alloc_pages(GFP_KERNEL_ACCOUNT | __GFP_ZERO,
+ vmx_get_pid_table_order(kvm));
if (!pages)
return -ENOMEM;