> Replace several uses of mutex_lock() / mutex_unlock() pairs with mutex
> guards, which are less error-prone and help simplify error paths,
> allowing removal of all gotos in some functions. This removes around 40
> lines of code in total.
>
> This does not remove all uses of the manual lock APIs, only those that
> have their error handling improved by switching to the newer API.
>
> Changes are separated per-function for ease of review.
>
> Carlos López (6):
> KVM: SEV: use mutex guard in snp_launch_update()
> KVM: SEV: use mutex guard in sev_mem_enc_ioctl()
> KVM: SEV: use mutex guard in sev_mem_enc_register_region()
> KVM: SEV: use mutex guard in sev_mem_enc_unregister_region()
> KVM: SEV: use mutex guard in snp_handle_guest_req()
> KVM: SEV: use scoped mutex guard in sev_asid_new()
>
> arch/x86/kvm/svm/sev.c | 135 ++++++++++++++---------------------------
> 1 file changed, 47 insertions(+), 88 deletions(-)
Did a basic boot test on SEV{ES & SNP} VM.
Thanks,
Pankaj
>
>
> base-commit: 0499add8efd72456514c6218c062911ccc922a99