summaryrefslogtreecommitdiff
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-11-30 23:08:52 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-12-29 15:40:52 -0500
commitb7483387e374977396152298bfbddee1ca0a062e (patch)
treeea3f0f3f46981bb6f0b40a6fc0f98799603b8f6e /arch/s390/kvm/kvm-s390.c
parent1935542a04cc12cb360885a0ff5583d5e259c32f (diff)
KVM: x86: Move hardware setup/unsetup to init/exit
Now that kvm_arch_hardware_setup() is called immediately after kvm_arch_init(), fold the guts of kvm_arch_hardware_(un)setup() into kvm_arch_{init,exit}() as a step towards dropping one of the hooks. To avoid having to unwind various setup, e.g registration of several notifiers, slot in the vendor hardware setup before the registration of said notifiers and callbacks. Introducing a functional change while moving code is less than ideal, but the alternative is adding a pile of unwinding code, which is much more error prone, e.g. several attempts to move the setup code verbatim all introduced bugs. Add a comment to document that kvm_ops_update() is effectively the point of no return, e.g. it sets the kvm_x86_ops.hardware_enable canary and so needs to be unwound. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20221130230934.1014142-9-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