On Thu, 2025-10-30 at 13:09 -0700, Sean Christopherson wrote: > Don't copy the kvm_tdx_cmd structure back to userspace when handling > KVM_TDX_CAPABILITIES, as tdx_get_capabilities() doesn't modify hw_error or > any other fields. > > Opportunistically hoist the call to tdx_get_capabilities() outside of the > kvm->lock critical section, as getting the capabilities doesn't touch the > VM in any way, e.g. doesn't even take @kvm. > > Suggested-by: Kai Huang <[email protected]> > Signed-off-by: Sean Christopherson <[email protected]>
Reviewed-by: Kai Huang <[email protected]>
