diff options
author | Peng Hao <flyingpeng@tencent.com> | 2023-07-28 08:49:48 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-07-29 17:05:25 +0200 |
commit | fd1815ea709e414f83a06e4cf13ade4a49dd0fda (patch) | |
tree | 1166320be25b90222386e64f9cb6abb9ecc683bf /arch/x86 | |
parent | KVM: x86: check the kvm_cpu_get_interrupt result before using it (diff) | |
download | linux-fd1815ea709e414f83a06e4cf13ade4a49dd0fda.tar.xz linux-fd1815ea709e414f83a06e4cf13ade4a49dd0fda.zip |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 0ecf4be2c6af..3c5a13f054fc 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; |