]> git.baikalelectronics.ru Git - kernel.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)
commit0679b0338e453eeb1c11b76660021e8883331436
treedc0bad22407dc0c34ed5f02911b1ca427a0affab
parent09e39689ff3077d88453f0afcb47015f7c09af6e
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