diff options
author | Sean Christopherson <seanjc@google.com> | 2022-11-30 23:08:48 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-29 15:40:47 -0500 |
commit | 73b8dc04132c1f8d4f9250a39f1fc9878ba2ee13 (patch) | |
tree | 2e2ed9c922e4f5356a6b5defc606ffa2402560c5 /arch/s390/kvm/kvm-s390.c | |
parent | c9650228efbad65c1b9681198f3502de08a42944 (diff) |
KVM: Teardown VFIO ops earlier in kvm_exit()
Move the call to kvm_vfio_ops_exit() further up kvm_exit() to try and
bring some amount of symmetry to the setup order in kvm_init(), and more
importantly so that the arch hooks are invoked dead last by kvm_exit().
This will allow arch code to move away from the arch hooks without any
change in ordering between arch code and common code in kvm_exit().
That kvm_vfio_ops_exit() is called last appears to be 100% arbitrary. It
was bolted on after the fact by commit 571ee1b68598 ("kvm: vfio: fix
unregister kvm_device_ops of vfio"). The nullified kvm_device_ops_table
is also local to kvm_main.c and is used only when there are active VMs,
so unless arch code is doing something truly bizarre, nullifying the
table earlier in kvm_exit() is little more than a nop.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20221130230934.1014142-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
0 files changed, 0 insertions, 0 deletions