Merge branch 'kvm-pre-tdx' into HEAD
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Mar 2025 13:23:24 +0000 (09:23 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Mar 2025 17:13:13 +0000 (13:13 -0400)
- Add common secure TSC infrastructure for use within SNP and in the
  future TDX

- Block KVM_CAP_SYNC_REGS if guest state is protected.  It does not make
  sense to use the capability if the relevant registers are not
  available for reading or writing.

1  2 
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c

Simple merge
@@@ -12873,8 -12892,8 +12887,7 @@@ void kvm_arch_destroy_vm(struct kvm *kv
                __x86_set_memory_region(kvm, TSS_PRIVATE_MEMSLOT, 0, 0);
                mutex_unlock(&kvm->slots_lock);
        }
 -      kvm_unload_vcpu_mmus(kvm);
        kvm_destroy_vcpus(kvm);
-       kvm_x86_call(vm_destroy)(kvm);
        kvm_free_msr_filter(srcu_dereference_check(kvm->arch.msr_filter, &kvm->srcu, 1));
        kvm_pic_destroy(kvm);
        kvm_ioapic_destroy(kvm);