]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KVM: SEV: provide helpers to charge/uncharge misc_cg
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Nov 2021 15:02:26 +0000 (10:02 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Nov 2021 15:35:26 +0000 (10:35 -0500)
commit91b692a03c9993ad2a9dea0534eaff169a98742c
treedc0bad22407dc0c34ed5f02911b1ca427a0affab
parentf4d316537059b274452727e86f46ff3bdefdde4d
KVM: SEV: provide helpers to charge/uncharge misc_cg

Avoid code duplication across all callers of misc_cg_try_charge and
misc_cg_uncharge.  The resource type for KVM is always derived from
sev->es_active, and the quantity is always 1.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c