mirror of https://github.com/torvalds/linux.git
VMs that mirror an encryption context rely on the owner to keep the
ASID allocated. Performing a KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM
would cause a dangling ASID:
1. copy context from A to B (gets ref to A)
2. move context from A to L (moves ASID from A to L)
3. close L (releases ASID from L, B still references it)
The right way to do the handoff instead is to create a fresh mirror VM
on the destination first:
1. copy context from A to B (gets ref to A)
[later] 2. close B (releases ref to A)
3. move context from A to L (moves ASID from A to L)
4. copy context from L to M
So, catch the situation by adding a count of how many VMs are
mirroring this one's encryption context.
Fixes:
|
||
|---|---|---|
| .. | ||
| aarch64 | ||
| include | ||
| lib | ||
| s390x | ||
| x86_64 | ||
| .gitignore | ||
| Makefile | ||
| access_tracking_perf_test.c | ||
| config | ||
| demand_paging_test.c | ||
| dirty_log_perf_test.c | ||
| dirty_log_test.c | ||
| hardware_disable_test.c | ||
| kvm_binary_stats_test.c | ||
| kvm_create_max_vcpus.c | ||
| kvm_page_table_test.c | ||
| memslot_modification_stress_test.c | ||
| memslot_perf_test.c | ||
| rseq_test.c | ||
| set_memory_region_test.c | ||
| settings | ||
| steal_time.c | ||
| system_counter_offset_test.c | ||