On 5/3/21 4:14 PM, Tony Krowiak wrote: ...
Up to this point, the onus for ensuring the proper procedure is followed when managing pass-through crypto devices for a KVM guest is left to the system administrator. In other words, we don't prevent an admin from shooting him/herself in the foot when doing things such as removing an mdev while a KVM guest is using it. With this in mind, I will handle this case in the follow-on patches implementing dynamic AP configuration support for KVM guests.
Change of plans: Based upon my exchanges with Jason, I have decided to create a patch specifically to do the cleanup in the mdev remove callback regardless of whether a KVM guest is using the mdev or not.