summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-12-01 00:09:06 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-12-29 21:41:13 +0100
commit3fb8e89aa2a0e08ffebb24d6e5cd5bfe88ab4ac2 (patch)
tree7501aa6f0f7789a46d00d6bc8ff1e940cdc33300 /arch/mips
parentKVM: MIPS: Hardcode callbacks to hardware virtualization extensions (diff)
downloadlinux-3fb8e89aa2a0e08ffebb24d6e5cd5bfe88ab4ac2.tar.xz
linux-3fb8e89aa2a0e08ffebb24d6e5cd5bfe88ab4ac2.zip
KVM: MIPS: Setup VZ emulation? directly from kvm_mips_init()
Invoke kvm_mips_emulation_init() directly from kvm_mips_init() instead of bouncing through kvm_init()=>kvm_arch_init(). Functionally, this is a glorified nop as invoking kvm_arch_init() is the very first action performed by kvm_init(). Emptying kvm_arch_init() will allow dropping the hook entirely once all architecture implementations are nops. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221130230934.1014142-23-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kvm/mips.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index f0a6c245d1ff..75681281e2df 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -1012,7 +1012,7 @@ long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
int kvm_arch_init(void *opaque)
{
- return kvm_mips_emulation_init();
+ return 0;
}
void kvm_arch_exit(void)
@@ -1636,6 +1636,10 @@ static int __init kvm_mips_init(void)
if (ret)
return ret;
+ ret = kvm_mips_emulation_init();
+ if (ret)
+ return ret;
+
ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
if (ret)