svm/sev: Register SEV and SEV-ES ASIDs to the misc controller
authorVipin Sharma <vipinsh@google.com>
Tue, 30 Mar 2021 04:42:06 +0000 (21:42 -0700)
committerTejun Heo <tj@kernel.org>
Sun, 4 Apr 2021 17:34:46 +0000 (13:34 -0400)
commit7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c
treef34bad270dc8bfb86bf0bd8b1fdc2666237832ce
parent25259fc914a1d06ba47263383612777a509281e9
svm/sev: Register SEV and SEV-ES ASIDs to the misc controller

Secure Encrypted Virtualization (SEV) and Secure Encrypted
Virtualization - Encrypted State (SEV-ES) ASIDs are used to encrypt KVMs
on AMD platform. These ASIDs are available in the limited quantities on
a host.

Register their capacity and usage to the misc controller for tracking
via cgroups.

Signed-off-by: Vipin Sharma <vipinsh@google.com>
Reviewed-by: David Rientjes <rientjes@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.h
include/linux/misc_cgroup.h
kernel/cgroup/misc.c