aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/kvm/svm/nested.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-03-30 19:30:25 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2021-04-17 08:30:58 -0400
commiteba04b20e4861d9bdbd8470a13c0c6e824521a36 (patch)
treec93b511817558b628b040b6d08e005af01d5ab3b /arch/x86/kvm/svm/nested.c
parentKVM: SVM: Do not allow SEV/SEV-ES initialization after vCPUs are created (diff)
downloadwireguard-linux-eba04b20e4861d9bdbd8470a13c0c6e824521a36.tar.xz
wireguard-linux-eba04b20e4861d9bdbd8470a13c0c6e824521a36.zip
KVM: x86: Account a variety of miscellaneous allocations
Switch to GFP_KERNEL_ACCOUNT for a handful of allocations that are clearly associated with a single task/VM. Note, there are a several SEV allocations that aren't accounted, but those can (hopefully) be fixed by using the local stack for memory. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210331023025.2485960-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
-rw-r--r--arch/x86/kvm/svm/nested.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index b974bd9c53c3..091f47053f9e 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -1252,8 +1252,8 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
return -EINVAL;
ret = -ENOMEM;
- ctl = kzalloc(sizeof(*ctl), GFP_KERNEL);
- save = kzalloc(sizeof(*save), GFP_KERNEL);
+ ctl = kzalloc(sizeof(*ctl), GFP_KERNEL_ACCOUNT);
+ save = kzalloc(sizeof(*save), GFP_KERNEL_ACCOUNT);
if (!ctl || !save)
goto out_free;