diff options
author | Paolo Bonzini <[email protected]> | 2021-11-22 19:50:33 -0500 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2021-11-30 03:54:13 -0500 |
commit | bf42b02b19e27d6849852a41dd734af4c05e73c6 (patch) | |
tree | d4cd3058da9309530a5cf6136eafee73f48321d5 /tools/perf/scripts/python | |
parent | dc79c9f4eb6b4f4584ba0f6f334b907283ed4b6c (diff) |
KVM: SEV: Do COPY_ENC_CONTEXT_FROM with both VMs locked
Now that we have a facility to lock two VMs with deadlock
protection, use it for the creation of mirror VMs as well. One of
COPY_ENC_CONTEXT_FROM(dst, src) and COPY_ENC_CONTEXT_FROM(src, dst)
would always fail, so the combination is nonsensical and it is okay to
return -EBUSY if it is attempted.
This sidesteps the question of what happens if a VM is
MOVE_ENC_CONTEXT_FROM'd at the same time as it is
COPY_ENC_CONTEXT_FROM'd: the locking prevents that from
happening.
Cc: Peter Gonda <[email protected]>
Cc: Sean Christopherson <[email protected]>
Reviewed-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions