Commit fd21732
KVM: x86: Fold guts of kvm_arch_sync_events() into kvm_arch_pre_destroy_vm()
Fold the guts of kvm_arch_sync_events() into kvm_arch_pre_destroy_vm(), as
the kvmclock and PIT background workers only need to be stopped before
destroying vCPUs (to avoid accessing vCPUs as they are being freed); it's
a-ok for them to be running while the VM is visible on the global vm_list.
Note, the PIT also needs to be stopped before IRQ routing is freed
(because KVM's IRQ routing is garbage and assumes there is always non-NULL
routing).
Opportunistically add comments to explain why KVM stops/frees certain
assets early.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250224235542.2562848-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent e447212 commit fd21732
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12759 | 12759 | | |
12760 | 12760 | | |
12761 | 12761 | | |
12762 | | - | |
12763 | | - | |
12764 | | - | |
| 12762 | + | |
12765 | 12763 | | |
12766 | 12764 | | |
12767 | 12765 | | |
| |||
12842 | 12840 | | |
12843 | 12841 | | |
12844 | 12842 | | |
| 12843 | + | |
| 12844 | + | |
| 12845 | + | |
| 12846 | + | |
| 12847 | + | |
| 12848 | + | |
| 12849 | + | |
| 12850 | + | |
| 12851 | + | |
| 12852 | + | |
| 12853 | + | |
12845 | 12854 | | |
12846 | 12855 | | |
12847 | 12856 | | |
| |||
0 commit comments