aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/svm.c
diff options
context:
space:
mode:
authorLi RongQing <[email protected]>2024-05-20 20:08:57 +0800
committerSean Christopherson <[email protected]>2024-06-03 16:14:11 -0700
commit9f44286d77ac72a15692c56d0fcbf7d2534e1f1e (patch)
treee458dfa9a08c84df77ff235c35500212f5bd88da /arch/x86/kvm/svm/svm.c
parentf51af34686885059968b87494b11825b57803331 (diff)
KVM: SVM: not account memory allocation for per-CPU svm_data
The allocation for the per-CPU save area in svm_cpu_init shouldn't be accounted, So introduce __snp_safe_alloc_page helper, which has gfp flag as input, svm_cpu_init calls __snp_safe_alloc_page with GFP_KERNEL, snp_safe_alloc_page calls __snp_safe_alloc_page with GFP_KERNEL_ACCOUNT as input Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: Li RongQing <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'arch/x86/kvm/svm/svm.c')
-rw-r--r--arch/x86/kvm/svm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index e6eb225920ef..adbd676708f6 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -703,7 +703,7 @@ static int svm_cpu_init(int cpu)
int ret = -ENOMEM;
memset(sd, 0, sizeof(struct svm_cpu_data));
- sd->save_area = snp_safe_alloc_page();
+ sd->save_area = __snp_safe_alloc_page(GFP_KERNEL);
if (!sd->save_area)
return ret;