All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <anup@brainfault.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Marc Zyngier <maz@kernel.org>,
	 Huacai Chen <chenhuacai@kernel.org>,
	 Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	 Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	 Eric Farman <farman@linux.ibm.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	 James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	 Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	 Atish Patra <atishp@atishpatra.org>,
	David Hildenbrand <david@redhat.com>,
	kvm@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.linux.dev,  kvmarm@lists.cs.columbia.edu,
	linux-mips@vger.kernel.org,  linuxppc-dev@lists.ozlabs.org,
	kvm-riscv@lists.infradead.org,  linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	 Fabiano Rosas <farosas@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	 Chao Gao <chao.gao@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yuan Yao <yuan.yao@intel.com>
Subject: Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook
Date: Mon, 7 Nov 2022 08:46:14 +0530	[thread overview]
Message-ID: <CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com> (raw)
In-Reply-To: <20221102231911.3107438-31-seanjc@google.com>

On Thu, Nov 3, 2022 at 4:50 AM Sean Christopherson <seanjc@google.com> wrote:
>
> Drop kvm_arch_check_processor_compat() and its support code now that all
> architecture implementations are nops.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup@brainfault.org>

Thanks,
Anup

> ---
>  arch/arm64/kvm/arm.c       |  7 +------
>  arch/mips/kvm/mips.c       |  7 +------
>  arch/powerpc/kvm/book3s.c  |  2 +-
>  arch/powerpc/kvm/e500.c    |  2 +-
>  arch/powerpc/kvm/e500mc.c  |  2 +-
>  arch/powerpc/kvm/powerpc.c |  5 -----
>  arch/riscv/kvm/main.c      |  7 +------
>  arch/s390/kvm/kvm-s390.c   |  7 +------
>  arch/x86/kvm/svm/svm.c     |  4 ++--
>  arch/x86/kvm/vmx/vmx.c     |  4 ++--
>  arch/x86/kvm/x86.c         |  5 -----
>  include/linux/kvm_host.h   |  4 +---
>  virt/kvm/kvm_main.c        | 24 +-----------------------
>  13 files changed, 13 insertions(+), 67 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 75c5125b0dd3..ed1836b6f044 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -63,11 +63,6 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>                             struct kvm_enable_cap *cap)
>  {
> @@ -2268,7 +2263,7 @@ static __init int kvm_arm_init(void)
>          * FIXME: Do something reasonable if kvm_init() fails after pKVM
>          * hypervisor protection is finalized.
>          */
> -       err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       err = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (err)
>                 goto out_subs;
>
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 3cade648827a..36c8991b5d39 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -135,11 +135,6 @@ void kvm_arch_hardware_disable(void)
>         kvm_mips_callbacks->hardware_disable();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  extern void kvm_init_loongson_ipi(struct kvm *kvm);
>
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> @@ -1636,7 +1631,7 @@ static int __init kvm_mips_init(void)
>
>         register_die_notifier(&kvm_mips_csr_die_notifier);
>
> -       ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       ret = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (ret) {
>                 unregister_die_notifier(&kvm_mips_csr_die_notifier);
>                 return ret;
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 87283a0e33d8..57f4e7896d67 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -1052,7 +1052,7 @@ static int kvmppc_book3s_init(void)
>  {
>         int r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r)
>                 return r;
>  #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 0ea61190ec04..b0f695428733 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -531,7 +531,7 @@ static int __init kvmppc_e500_init(void)
>         flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
>                            ivor[max_ivor] + handler_len);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 795667f7ebf0..611532a0dedc 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -404,7 +404,7 @@ static int __init kvmppc_e500mc_init(void)
>          */
>         kvmppc_init_lpid(KVMPPC_NR_LPIDS/threads_per_core);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500mc.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 34278042ad27..51268be60dac 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -441,11 +441,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  {
>         struct kvmppc_ops *kvm_ops = NULL;
> diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
> index 4710a6751687..34c3dece6990 100644
> --- a/arch/riscv/kvm/main.c
> +++ b/arch/riscv/kvm/main.c
> @@ -20,11 +20,6 @@ long kvm_arch_dev_ioctl(struct file *filp,
>         return -EINVAL;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_hardware_enable(void)
>  {
>         unsigned long hideleg, hedeleg;
> @@ -110,6 +105,6 @@ static int __init riscv_kvm_init(void)
>
>         kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits());
>
> -       return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       return kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>  }
>  module_init(riscv_kvm_init);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7c1c6d81b5d7..949231f1393e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -254,11 +254,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  /* forward declarations */
>  static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
>                               unsigned long end);
> @@ -5654,7 +5649,7 @@ static int __init kvm_s390_init(void)
>         if (r)
>                 return r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r) {
>                 __kvm_s390_exit();
>                 return r;
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 368b4db4b240..99c1ac2d9c84 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5144,8 +5144,8 @@ static int __init svm_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_svm),
> -                    __alignof__(struct vcpu_svm), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_svm), __alignof__(struct vcpu_svm),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 26baaccb659a..25e28d368274 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -8562,8 +8562,8 @@ static int __init vmx_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_vmx),
> -                    __alignof__(struct vcpu_vmx), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_vmx), __alignof__(struct vcpu_vmx),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 94831f1a1d04..5b7b551ae44b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12036,11 +12036,6 @@ void kvm_arch_hardware_disable(void)
>         drop_user_return_notifiers();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
>  {
>         return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6c2a28c4c684..0b96d836a051 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -936,8 +936,7 @@ static inline void kvm_irqfd_exit(void)
>  {
>  }
>  #endif
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module);
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module);
>  void kvm_exit(void);
>
>  void kvm_get_kvm(struct kvm *kvm);
> @@ -1444,7 +1443,6 @@ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {}
>
>  int kvm_arch_hardware_enable(void);
>  void kvm_arch_hardware_disable(void);
> -int kvm_arch_check_processor_compat(void *opaque);
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
>  bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
>  int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 17c852cb6842..dd13af9f06d5 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -5814,36 +5814,14 @@ void kvm_unregister_perf_callbacks(void)
>  }
>  #endif
>
> -struct kvm_cpu_compat_check {
> -       void *opaque;
> -       int *ret;
> -};
> -
> -static void check_processor_compat(void *data)
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
>  {
> -       struct kvm_cpu_compat_check *c = data;
> -
> -       *c->ret = kvm_arch_check_processor_compat(c->opaque);
> -}
> -
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module)
> -{
> -       struct kvm_cpu_compat_check c;
>         int r;
>         int cpu;
>
>         if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
>                 return -ENOMEM;
>
> -       c.ret = &r;
> -       c.opaque = opaque;
> -       for_each_online_cpu(cpu) {
> -               smp_call_function_single(cpu, check_processor_compat, &c, 1);
> -               if (r < 0)
> -                       goto out_free_2;
> -       }
> -
>         r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
>                                       kvm_starting_cpu, kvm_dying_cpu);
>         if (r)
> --
> 2.38.1.431.g37b22c650d-goog
>

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Matthew Rosato <mjrosato@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Yuan Yao <yuan.yao@intel.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	kvmarm@lists.cs.columbia.edu, linux-s390@vger.kernel.org,
	Janosch Frank <frankja@linux.ibm.com>,
	Marc Zyngier <maz@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Chao Gao <chao.gao@intel.com>, Eric Farman <farman@linux.ibm.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	kvm@vger.kernel.org, Atish Patra <atishp@atishpatra.org>,
	kvmarm@lists.linux.dev, Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	Fabiano Rosas <farosas@linux.ibm.com>,
	linux-mips@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
	kvm-riscv@lists.infradead.org,
	Michael Ellerman <mpe@ellerman.id.au>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook
Date: Mon, 7 Nov 2022 08:46:14 +0530	[thread overview]
Message-ID: <CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com> (raw)
In-Reply-To: <20221102231911.3107438-31-seanjc@google.com>

On Thu, Nov 3, 2022 at 4:50 AM Sean Christopherson <seanjc@google.com> wrote:
>
> Drop kvm_arch_check_processor_compat() and its support code now that all
> architecture implementations are nops.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup@brainfault.org>

Thanks,
Anup

> ---
>  arch/arm64/kvm/arm.c       |  7 +------
>  arch/mips/kvm/mips.c       |  7 +------
>  arch/powerpc/kvm/book3s.c  |  2 +-
>  arch/powerpc/kvm/e500.c    |  2 +-
>  arch/powerpc/kvm/e500mc.c  |  2 +-
>  arch/powerpc/kvm/powerpc.c |  5 -----
>  arch/riscv/kvm/main.c      |  7 +------
>  arch/s390/kvm/kvm-s390.c   |  7 +------
>  arch/x86/kvm/svm/svm.c     |  4 ++--
>  arch/x86/kvm/vmx/vmx.c     |  4 ++--
>  arch/x86/kvm/x86.c         |  5 -----
>  include/linux/kvm_host.h   |  4 +---
>  virt/kvm/kvm_main.c        | 24 +-----------------------
>  13 files changed, 13 insertions(+), 67 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 75c5125b0dd3..ed1836b6f044 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -63,11 +63,6 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>                             struct kvm_enable_cap *cap)
>  {
> @@ -2268,7 +2263,7 @@ static __init int kvm_arm_init(void)
>          * FIXME: Do something reasonable if kvm_init() fails after pKVM
>          * hypervisor protection is finalized.
>          */
> -       err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       err = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (err)
>                 goto out_subs;
>
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 3cade648827a..36c8991b5d39 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -135,11 +135,6 @@ void kvm_arch_hardware_disable(void)
>         kvm_mips_callbacks->hardware_disable();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  extern void kvm_init_loongson_ipi(struct kvm *kvm);
>
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> @@ -1636,7 +1631,7 @@ static int __init kvm_mips_init(void)
>
>         register_die_notifier(&kvm_mips_csr_die_notifier);
>
> -       ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       ret = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (ret) {
>                 unregister_die_notifier(&kvm_mips_csr_die_notifier);
>                 return ret;
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 87283a0e33d8..57f4e7896d67 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -1052,7 +1052,7 @@ static int kvmppc_book3s_init(void)
>  {
>         int r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r)
>                 return r;
>  #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 0ea61190ec04..b0f695428733 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -531,7 +531,7 @@ static int __init kvmppc_e500_init(void)
>         flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
>                            ivor[max_ivor] + handler_len);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 795667f7ebf0..611532a0dedc 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -404,7 +404,7 @@ static int __init kvmppc_e500mc_init(void)
>          */
>         kvmppc_init_lpid(KVMPPC_NR_LPIDS/threads_per_core);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500mc.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 34278042ad27..51268be60dac 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -441,11 +441,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  {
>         struct kvmppc_ops *kvm_ops = NULL;
> diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
> index 4710a6751687..34c3dece6990 100644
> --- a/arch/riscv/kvm/main.c
> +++ b/arch/riscv/kvm/main.c
> @@ -20,11 +20,6 @@ long kvm_arch_dev_ioctl(struct file *filp,
>         return -EINVAL;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_hardware_enable(void)
>  {
>         unsigned long hideleg, hedeleg;
> @@ -110,6 +105,6 @@ static int __init riscv_kvm_init(void)
>
>         kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits());
>
> -       return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       return kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>  }
>  module_init(riscv_kvm_init);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7c1c6d81b5d7..949231f1393e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -254,11 +254,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  /* forward declarations */
>  static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
>                               unsigned long end);
> @@ -5654,7 +5649,7 @@ static int __init kvm_s390_init(void)
>         if (r)
>                 return r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r) {
>                 __kvm_s390_exit();
>                 return r;
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 368b4db4b240..99c1ac2d9c84 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5144,8 +5144,8 @@ static int __init svm_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_svm),
> -                    __alignof__(struct vcpu_svm), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_svm), __alignof__(struct vcpu_svm),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 26baaccb659a..25e28d368274 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -8562,8 +8562,8 @@ static int __init vmx_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_vmx),
> -                    __alignof__(struct vcpu_vmx), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_vmx), __alignof__(struct vcpu_vmx),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 94831f1a1d04..5b7b551ae44b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12036,11 +12036,6 @@ void kvm_arch_hardware_disable(void)
>         drop_user_return_notifiers();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
>  {
>         return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6c2a28c4c684..0b96d836a051 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -936,8 +936,7 @@ static inline void kvm_irqfd_exit(void)
>  {
>  }
>  #endif
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module);
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module);
>  void kvm_exit(void);
>
>  void kvm_get_kvm(struct kvm *kvm);
> @@ -1444,7 +1443,6 @@ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {}
>
>  int kvm_arch_hardware_enable(void);
>  void kvm_arch_hardware_disable(void);
> -int kvm_arch_check_processor_compat(void *opaque);
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
>  bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
>  int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 17c852cb6842..dd13af9f06d5 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -5814,36 +5814,14 @@ void kvm_unregister_perf_callbacks(void)
>  }
>  #endif
>
> -struct kvm_cpu_compat_check {
> -       void *opaque;
> -       int *ret;
> -};
> -
> -static void check_processor_compat(void *data)
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
>  {
> -       struct kvm_cpu_compat_check *c = data;
> -
> -       *c->ret = kvm_arch_check_processor_compat(c->opaque);
> -}
> -
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module)
> -{
> -       struct kvm_cpu_compat_check c;
>         int r;
>         int cpu;
>
>         if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
>                 return -ENOMEM;
>
> -       c.ret = &r;
> -       c.opaque = opaque;
> -       for_each_online_cpu(cpu) {
> -               smp_call_function_single(cpu, check_processor_compat, &c, 1);
> -               if (r < 0)
> -                       goto out_free_2;
> -       }
> -
>         r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
>                                       kvm_starting_cpu, kvm_dying_cpu);
>         if (r)
> --
> 2.38.1.431.g37b22c650d-goog
>
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Matthew Rosato <mjrosato@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	Yuan Yao <yuan.yao@intel.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	kvmarm@lists.cs.columbia.edu, linux-s390@vger.kernel.org,
	Janosch Frank <frankja@linux.ibm.com>,
	Marc Zyngier <maz@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	James Morse <james.morse@arm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Chao Gao <chao.gao@intel.com>, Eric Farman <farman@linux.ibm.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	kvm@vger.kernel.org, Atish Patra <atishp@atishpatra.org>,
	kvmarm@lists.linux.dev, Thomas Gleixner <tglx@linutronix.de>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	Fabiano Rosas <farosas@linux.ibm.com>,
	 linux-mips@vger.kernel.org,
	Oliver Upton <oliver.upton@linux.dev>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	kvm-riscv@lists.infradead.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook
Date: Mon, 7 Nov 2022 08:46:14 +0530	[thread overview]
Message-ID: <CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com> (raw)
In-Reply-To: <20221102231911.3107438-31-seanjc@google.com>

On Thu, Nov 3, 2022 at 4:50 AM Sean Christopherson <seanjc@google.com> wrote:
>
> Drop kvm_arch_check_processor_compat() and its support code now that all
> architecture implementations are nops.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup@brainfault.org>

Thanks,
Anup

> ---
>  arch/arm64/kvm/arm.c       |  7 +------
>  arch/mips/kvm/mips.c       |  7 +------
>  arch/powerpc/kvm/book3s.c  |  2 +-
>  arch/powerpc/kvm/e500.c    |  2 +-
>  arch/powerpc/kvm/e500mc.c  |  2 +-
>  arch/powerpc/kvm/powerpc.c |  5 -----
>  arch/riscv/kvm/main.c      |  7 +------
>  arch/s390/kvm/kvm-s390.c   |  7 +------
>  arch/x86/kvm/svm/svm.c     |  4 ++--
>  arch/x86/kvm/vmx/vmx.c     |  4 ++--
>  arch/x86/kvm/x86.c         |  5 -----
>  include/linux/kvm_host.h   |  4 +---
>  virt/kvm/kvm_main.c        | 24 +-----------------------
>  13 files changed, 13 insertions(+), 67 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 75c5125b0dd3..ed1836b6f044 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -63,11 +63,6 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>                             struct kvm_enable_cap *cap)
>  {
> @@ -2268,7 +2263,7 @@ static __init int kvm_arm_init(void)
>          * FIXME: Do something reasonable if kvm_init() fails after pKVM
>          * hypervisor protection is finalized.
>          */
> -       err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       err = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (err)
>                 goto out_subs;
>
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 3cade648827a..36c8991b5d39 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -135,11 +135,6 @@ void kvm_arch_hardware_disable(void)
>         kvm_mips_callbacks->hardware_disable();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  extern void kvm_init_loongson_ipi(struct kvm *kvm);
>
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> @@ -1636,7 +1631,7 @@ static int __init kvm_mips_init(void)
>
>         register_die_notifier(&kvm_mips_csr_die_notifier);
>
> -       ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       ret = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (ret) {
>                 unregister_die_notifier(&kvm_mips_csr_die_notifier);
>                 return ret;
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 87283a0e33d8..57f4e7896d67 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -1052,7 +1052,7 @@ static int kvmppc_book3s_init(void)
>  {
>         int r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r)
>                 return r;
>  #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 0ea61190ec04..b0f695428733 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -531,7 +531,7 @@ static int __init kvmppc_e500_init(void)
>         flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
>                            ivor[max_ivor] + handler_len);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 795667f7ebf0..611532a0dedc 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -404,7 +404,7 @@ static int __init kvmppc_e500mc_init(void)
>          */
>         kvmppc_init_lpid(KVMPPC_NR_LPIDS/threads_per_core);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500mc.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 34278042ad27..51268be60dac 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -441,11 +441,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  {
>         struct kvmppc_ops *kvm_ops = NULL;
> diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
> index 4710a6751687..34c3dece6990 100644
> --- a/arch/riscv/kvm/main.c
> +++ b/arch/riscv/kvm/main.c
> @@ -20,11 +20,6 @@ long kvm_arch_dev_ioctl(struct file *filp,
>         return -EINVAL;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_hardware_enable(void)
>  {
>         unsigned long hideleg, hedeleg;
> @@ -110,6 +105,6 @@ static int __init riscv_kvm_init(void)
>
>         kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits());
>
> -       return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       return kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>  }
>  module_init(riscv_kvm_init);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7c1c6d81b5d7..949231f1393e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -254,11 +254,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  /* forward declarations */
>  static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
>                               unsigned long end);
> @@ -5654,7 +5649,7 @@ static int __init kvm_s390_init(void)
>         if (r)
>                 return r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r) {
>                 __kvm_s390_exit();
>                 return r;
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 368b4db4b240..99c1ac2d9c84 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5144,8 +5144,8 @@ static int __init svm_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_svm),
> -                    __alignof__(struct vcpu_svm), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_svm), __alignof__(struct vcpu_svm),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 26baaccb659a..25e28d368274 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -8562,8 +8562,8 @@ static int __init vmx_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_vmx),
> -                    __alignof__(struct vcpu_vmx), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_vmx), __alignof__(struct vcpu_vmx),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 94831f1a1d04..5b7b551ae44b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12036,11 +12036,6 @@ void kvm_arch_hardware_disable(void)
>         drop_user_return_notifiers();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
>  {
>         return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6c2a28c4c684..0b96d836a051 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -936,8 +936,7 @@ static inline void kvm_irqfd_exit(void)
>  {
>  }
>  #endif
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module);
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module);
>  void kvm_exit(void);
>
>  void kvm_get_kvm(struct kvm *kvm);
> @@ -1444,7 +1443,6 @@ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {}
>
>  int kvm_arch_hardware_enable(void);
>  void kvm_arch_hardware_disable(void);
> -int kvm_arch_check_processor_compat(void *opaque);
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
>  bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
>  int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 17c852cb6842..dd13af9f06d5 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -5814,36 +5814,14 @@ void kvm_unregister_perf_callbacks(void)
>  }
>  #endif
>
> -struct kvm_cpu_compat_check {
> -       void *opaque;
> -       int *ret;
> -};
> -
> -static void check_processor_compat(void *data)
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
>  {
> -       struct kvm_cpu_compat_check *c = data;
> -
> -       *c->ret = kvm_arch_check_processor_compat(c->opaque);
> -}
> -
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module)
> -{
> -       struct kvm_cpu_compat_check c;
>         int r;
>         int cpu;
>
>         if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
>                 return -ENOMEM;
>
> -       c.ret = &r;
> -       c.opaque = opaque;
> -       for_each_online_cpu(cpu) {
> -               smp_call_function_single(cpu, check_processor_compat, &c, 1);
> -               if (r < 0)
> -                       goto out_free_2;
> -       }
> -
>         r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
>                                       kvm_starting_cpu, kvm_dying_cpu);
>         if (r)
> --
> 2.38.1.431.g37b22c650d-goog
>

WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Marc Zyngier <maz@kernel.org>,
	 Huacai Chen <chenhuacai@kernel.org>,
	 Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	 Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	 Eric Farman <farman@linux.ibm.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	 James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	 Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	 Atish Patra <atishp@atishpatra.org>,
	David Hildenbrand <david@redhat.com>,
	kvm@vger.kernel.org,  linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.linux.dev,  kvmarm@lists.cs.columbia.edu,
	linux-mips@vger.kernel.org,  linuxppc-dev@lists.ozlabs.org,
	kvm-riscv@lists.infradead.org,  linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	 Fabiano Rosas <farosas@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	 Chao Gao <chao.gao@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yuan Yao <yuan.yao@intel.com>
Subject: Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook
Date: Mon, 7 Nov 2022 08:46:14 +0530	[thread overview]
Message-ID: <CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com> (raw)
In-Reply-To: <20221102231911.3107438-31-seanjc@google.com>

On Thu, Nov 3, 2022 at 4:50 AM Sean Christopherson <seanjc@google.com> wrote:
>
> Drop kvm_arch_check_processor_compat() and its support code now that all
> architecture implementations are nops.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup@brainfault.org>

Thanks,
Anup

> ---
>  arch/arm64/kvm/arm.c       |  7 +------
>  arch/mips/kvm/mips.c       |  7 +------
>  arch/powerpc/kvm/book3s.c  |  2 +-
>  arch/powerpc/kvm/e500.c    |  2 +-
>  arch/powerpc/kvm/e500mc.c  |  2 +-
>  arch/powerpc/kvm/powerpc.c |  5 -----
>  arch/riscv/kvm/main.c      |  7 +------
>  arch/s390/kvm/kvm-s390.c   |  7 +------
>  arch/x86/kvm/svm/svm.c     |  4 ++--
>  arch/x86/kvm/vmx/vmx.c     |  4 ++--
>  arch/x86/kvm/x86.c         |  5 -----
>  include/linux/kvm_host.h   |  4 +---
>  virt/kvm/kvm_main.c        | 24 +-----------------------
>  13 files changed, 13 insertions(+), 67 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 75c5125b0dd3..ed1836b6f044 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -63,11 +63,6 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>                             struct kvm_enable_cap *cap)
>  {
> @@ -2268,7 +2263,7 @@ static __init int kvm_arm_init(void)
>          * FIXME: Do something reasonable if kvm_init() fails after pKVM
>          * hypervisor protection is finalized.
>          */
> -       err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       err = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (err)
>                 goto out_subs;
>
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 3cade648827a..36c8991b5d39 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -135,11 +135,6 @@ void kvm_arch_hardware_disable(void)
>         kvm_mips_callbacks->hardware_disable();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  extern void kvm_init_loongson_ipi(struct kvm *kvm);
>
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> @@ -1636,7 +1631,7 @@ static int __init kvm_mips_init(void)
>
>         register_die_notifier(&kvm_mips_csr_die_notifier);
>
> -       ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       ret = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (ret) {
>                 unregister_die_notifier(&kvm_mips_csr_die_notifier);
>                 return ret;
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 87283a0e33d8..57f4e7896d67 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -1052,7 +1052,7 @@ static int kvmppc_book3s_init(void)
>  {
>         int r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r)
>                 return r;
>  #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 0ea61190ec04..b0f695428733 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -531,7 +531,7 @@ static int __init kvmppc_e500_init(void)
>         flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
>                            ivor[max_ivor] + handler_len);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 795667f7ebf0..611532a0dedc 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -404,7 +404,7 @@ static int __init kvmppc_e500mc_init(void)
>          */
>         kvmppc_init_lpid(KVMPPC_NR_LPIDS/threads_per_core);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500mc.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 34278042ad27..51268be60dac 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -441,11 +441,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  {
>         struct kvmppc_ops *kvm_ops = NULL;
> diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
> index 4710a6751687..34c3dece6990 100644
> --- a/arch/riscv/kvm/main.c
> +++ b/arch/riscv/kvm/main.c
> @@ -20,11 +20,6 @@ long kvm_arch_dev_ioctl(struct file *filp,
>         return -EINVAL;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_hardware_enable(void)
>  {
>         unsigned long hideleg, hedeleg;
> @@ -110,6 +105,6 @@ static int __init riscv_kvm_init(void)
>
>         kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits());
>
> -       return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       return kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>  }
>  module_init(riscv_kvm_init);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7c1c6d81b5d7..949231f1393e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -254,11 +254,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  /* forward declarations */
>  static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
>                               unsigned long end);
> @@ -5654,7 +5649,7 @@ static int __init kvm_s390_init(void)
>         if (r)
>                 return r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r) {
>                 __kvm_s390_exit();
>                 return r;
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 368b4db4b240..99c1ac2d9c84 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5144,8 +5144,8 @@ static int __init svm_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_svm),
> -                    __alignof__(struct vcpu_svm), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_svm), __alignof__(struct vcpu_svm),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 26baaccb659a..25e28d368274 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -8562,8 +8562,8 @@ static int __init vmx_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_vmx),
> -                    __alignof__(struct vcpu_vmx), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_vmx), __alignof__(struct vcpu_vmx),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 94831f1a1d04..5b7b551ae44b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12036,11 +12036,6 @@ void kvm_arch_hardware_disable(void)
>         drop_user_return_notifiers();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
>  {
>         return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6c2a28c4c684..0b96d836a051 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -936,8 +936,7 @@ static inline void kvm_irqfd_exit(void)
>  {
>  }
>  #endif
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module);
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module);
>  void kvm_exit(void);
>
>  void kvm_get_kvm(struct kvm *kvm);
> @@ -1444,7 +1443,6 @@ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {}
>
>  int kvm_arch_hardware_enable(void);
>  void kvm_arch_hardware_disable(void);
> -int kvm_arch_check_processor_compat(void *opaque);
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
>  bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
>  int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 17c852cb6842..dd13af9f06d5 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -5814,36 +5814,14 @@ void kvm_unregister_perf_callbacks(void)
>  }
>  #endif
>
> -struct kvm_cpu_compat_check {
> -       void *opaque;
> -       int *ret;
> -};
> -
> -static void check_processor_compat(void *data)
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
>  {
> -       struct kvm_cpu_compat_check *c = data;
> -
> -       *c->ret = kvm_arch_check_processor_compat(c->opaque);
> -}
> -
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module)
> -{
> -       struct kvm_cpu_compat_check c;
>         int r;
>         int cpu;
>
>         if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
>                 return -ENOMEM;
>
> -       c.ret = &r;
> -       c.opaque = opaque;
> -       for_each_online_cpu(cpu) {
> -               smp_call_function_single(cpu, check_processor_compat, &c, 1);
> -               if (r < 0)
> -                       goto out_free_2;
> -       }
> -
>         r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
>                                       kvm_starting_cpu, kvm_dying_cpu);
>         if (r)
> --
> 2.38.1.431.g37b22c650d-goog
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Marc Zyngier <maz@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Atish Patra <atishp@atishpatra.org>,
	David Hildenbrand <david@redhat.com>,
	kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu,
	linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	Fabiano Rosas <farosas@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Chao Gao <chao.gao@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Yuan Yao <yuan.yao@intel.com>
Subject: Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook
Date: Mon, 7 Nov 2022 08:46:14 +0530	[thread overview]
Message-ID: <CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com> (raw)
In-Reply-To: <20221102231911.3107438-31-seanjc@google.com>

On Thu, Nov 3, 2022 at 4:50 AM Sean Christopherson <seanjc@google.com> wrote:
>
> Drop kvm_arch_check_processor_compat() and its support code now that all
> architecture implementations are nops.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

For KVM RISC-V:
Acked-by: Anup Patel <anup@brainfault.org>

Thanks,
Anup

> ---
>  arch/arm64/kvm/arm.c       |  7 +------
>  arch/mips/kvm/mips.c       |  7 +------
>  arch/powerpc/kvm/book3s.c  |  2 +-
>  arch/powerpc/kvm/e500.c    |  2 +-
>  arch/powerpc/kvm/e500mc.c  |  2 +-
>  arch/powerpc/kvm/powerpc.c |  5 -----
>  arch/riscv/kvm/main.c      |  7 +------
>  arch/s390/kvm/kvm-s390.c   |  7 +------
>  arch/x86/kvm/svm/svm.c     |  4 ++--
>  arch/x86/kvm/vmx/vmx.c     |  4 ++--
>  arch/x86/kvm/x86.c         |  5 -----
>  include/linux/kvm_host.h   |  4 +---
>  virt/kvm/kvm_main.c        | 24 +-----------------------
>  13 files changed, 13 insertions(+), 67 deletions(-)
>
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 75c5125b0dd3..ed1836b6f044 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -63,11 +63,6 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
>         return kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>                             struct kvm_enable_cap *cap)
>  {
> @@ -2268,7 +2263,7 @@ static __init int kvm_arm_init(void)
>          * FIXME: Do something reasonable if kvm_init() fails after pKVM
>          * hypervisor protection is finalized.
>          */
> -       err = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       err = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (err)
>                 goto out_subs;
>
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index 3cade648827a..36c8991b5d39 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -135,11 +135,6 @@ void kvm_arch_hardware_disable(void)
>         kvm_mips_callbacks->hardware_disable();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  extern void kvm_init_loongson_ipi(struct kvm *kvm);
>
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> @@ -1636,7 +1631,7 @@ static int __init kvm_mips_init(void)
>
>         register_die_notifier(&kvm_mips_csr_die_notifier);
>
> -       ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       ret = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (ret) {
>                 unregister_die_notifier(&kvm_mips_csr_die_notifier);
>                 return ret;
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 87283a0e33d8..57f4e7896d67 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -1052,7 +1052,7 @@ static int kvmppc_book3s_init(void)
>  {
>         int r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r)
>                 return r;
>  #ifdef CONFIG_KVM_BOOK3S_32_HANDLER
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 0ea61190ec04..b0f695428733 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -531,7 +531,7 @@ static int __init kvmppc_e500_init(void)
>         flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
>                            ivor[max_ivor] + handler_len);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 795667f7ebf0..611532a0dedc 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -404,7 +404,7 @@ static int __init kvmppc_e500mc_init(void)
>          */
>         kvmppc_init_lpid(KVMPPC_NR_LPIDS/threads_per_core);
>
> -       r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
>         if (r)
>                 goto err_out;
>         kvm_ops_e500mc.owner = THIS_MODULE;
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 34278042ad27..51268be60dac 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -441,11 +441,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
>  {
>         struct kvmppc_ops *kvm_ops = NULL;
> diff --git a/arch/riscv/kvm/main.c b/arch/riscv/kvm/main.c
> index 4710a6751687..34c3dece6990 100644
> --- a/arch/riscv/kvm/main.c
> +++ b/arch/riscv/kvm/main.c
> @@ -20,11 +20,6 @@ long kvm_arch_dev_ioctl(struct file *filp,
>         return -EINVAL;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  int kvm_arch_hardware_enable(void)
>  {
>         unsigned long hideleg, hedeleg;
> @@ -110,6 +105,6 @@ static int __init riscv_kvm_init(void)
>
>         kvm_info("VMID %ld bits available\n", kvm_riscv_gstage_vmid_bits());
>
> -       return kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       return kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>  }
>  module_init(riscv_kvm_init);
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7c1c6d81b5d7..949231f1393e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -254,11 +254,6 @@ int kvm_arch_hardware_enable(void)
>         return 0;
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  /* forward declarations */
>  static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
>                               unsigned long end);
> @@ -5654,7 +5649,7 @@ static int __init kvm_s390_init(void)
>         if (r)
>                 return r;
>
> -       r = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
> +       r = kvm_init(sizeof(struct kvm_vcpu), 0, THIS_MODULE);
>         if (r) {
>                 __kvm_s390_exit();
>                 return r;
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index 368b4db4b240..99c1ac2d9c84 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5144,8 +5144,8 @@ static int __init svm_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_svm),
> -                    __alignof__(struct vcpu_svm), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_svm), __alignof__(struct vcpu_svm),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 26baaccb659a..25e28d368274 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -8562,8 +8562,8 @@ static int __init vmx_init(void)
>          * Common KVM initialization _must_ come last, after this, /dev/kvm is
>          * exposed to userspace!
>          */
> -       r = kvm_init(NULL, sizeof(struct vcpu_vmx),
> -                    __alignof__(struct vcpu_vmx), THIS_MODULE);
> +       r = kvm_init(sizeof(struct vcpu_vmx), __alignof__(struct vcpu_vmx),
> +                    THIS_MODULE);
>         if (r)
>                 goto err_kvm_init;
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 94831f1a1d04..5b7b551ae44b 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -12036,11 +12036,6 @@ void kvm_arch_hardware_disable(void)
>         drop_user_return_notifiers();
>  }
>
> -int kvm_arch_check_processor_compat(void *opaque)
> -{
> -       return 0;
> -}
> -
>  bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
>  {
>         return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6c2a28c4c684..0b96d836a051 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -936,8 +936,7 @@ static inline void kvm_irqfd_exit(void)
>  {
>  }
>  #endif
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module);
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module);
>  void kvm_exit(void);
>
>  void kvm_get_kvm(struct kvm *kvm);
> @@ -1444,7 +1443,6 @@ static inline void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {}
>
>  int kvm_arch_hardware_enable(void);
>  void kvm_arch_hardware_disable(void);
> -int kvm_arch_check_processor_compat(void *opaque);
>  int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu);
>  bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu);
>  int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu);
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 17c852cb6842..dd13af9f06d5 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -5814,36 +5814,14 @@ void kvm_unregister_perf_callbacks(void)
>  }
>  #endif
>
> -struct kvm_cpu_compat_check {
> -       void *opaque;
> -       int *ret;
> -};
> -
> -static void check_processor_compat(void *data)
> +int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
>  {
> -       struct kvm_cpu_compat_check *c = data;
> -
> -       *c->ret = kvm_arch_check_processor_compat(c->opaque);
> -}
> -
> -int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
> -                 struct module *module)
> -{
> -       struct kvm_cpu_compat_check c;
>         int r;
>         int cpu;
>
>         if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
>                 return -ENOMEM;
>
> -       c.ret = &r;
> -       c.opaque = opaque;
> -       for_each_online_cpu(cpu) {
> -               smp_call_function_single(cpu, check_processor_compat, &c, 1);
> -               if (r < 0)
> -                       goto out_free_2;
> -       }
> -
>         r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
>                                       kvm_starting_cpu, kvm_dying_cpu);
>         if (r)
> --
> 2.38.1.431.g37b22c650d-goog
>

  parent reply	other threads:[~2022-11-07  3:16 UTC|newest]

Thread overview: 635+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 23:18 [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling Sean Christopherson
2022-11-02 23:18 ` Sean Christopherson
2022-11-02 23:18 ` Sean Christopherson
2022-11-02 23:18 ` Sean Christopherson
2022-11-02 23:18 ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 01/44] KVM: Register /dev/kvm as the _very_ last thing during initialization Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 02/44] KVM: Initialize IRQ FD after arch hardware setup Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-04  0:41   ` Chao Gao
2022-11-04  0:41     ` Chao Gao
2022-11-04  0:41     ` Chao Gao
2022-11-04  0:41     ` Chao Gao
2022-11-04  0:41     ` Chao Gao
2022-11-04 20:15     ` Sean Christopherson
2022-11-04 20:15       ` Sean Christopherson
2022-11-04 20:15       ` Sean Christopherson
2022-11-04 20:15       ` Sean Christopherson
2022-11-04 20:15       ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 03/44] KVM: Allocate cpus_hardware_enabled " Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-04  5:37   ` Yuan Yao
2022-11-04  5:37     ` Yuan Yao
2022-11-04  5:37     ` Yuan Yao
2022-11-04  5:37     ` Yuan Yao
2022-11-04  5:37     ` Yuan Yao
2022-11-02 23:18 ` [PATCH 04/44] KVM: Teardown VFIO ops earlier in kvm_exit() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03 12:46   ` Cornelia Huck
2022-11-03 12:46     ` Cornelia Huck
2022-11-03 12:46     ` Cornelia Huck
2022-11-03 12:46     ` Cornelia Huck
2022-11-03 12:46     ` Cornelia Huck
2022-11-07 17:56   ` Eric Farman
2022-11-07 17:56     ` Eric Farman
2022-11-07 17:56     ` Eric Farman
2022-11-07 17:56     ` Eric Farman
2022-11-07 17:56     ` Eric Farman
2022-11-02 23:18 ` [PATCH 05/44] KVM: s390: Unwind kvm_arch_init() piece-by-piece() if a step fails Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-07 17:57   ` Eric Farman
2022-11-07 17:57     ` Eric Farman
2022-11-07 17:57     ` Eric Farman
2022-11-07 17:57     ` Eric Farman
2022-11-07 17:57     ` Eric Farman
2022-11-02 23:18 ` [PATCH 06/44] KVM: s390: Move hardware setup/unsetup to init/exit Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-07 17:58   ` Eric Farman
2022-11-07 17:58     ` Eric Farman
2022-11-07 17:58     ` Eric Farman
2022-11-07 17:58     ` Eric Farman
2022-11-07 17:58     ` Eric Farman
2022-11-02 23:18 ` [PATCH 07/44] KVM: x86: Do timer initialization after XCR0 configuration Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 08/44] KVM: x86: Move hardware setup/unsetup to init/exit Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-04  6:22   ` Yuan Yao
2022-11-04  6:22     ` Yuan Yao
2022-11-04  6:22     ` Yuan Yao
2022-11-04  6:22     ` Yuan Yao
2022-11-04  6:22     ` Yuan Yao
2022-11-04 16:31     ` Sean Christopherson
2022-11-04 16:31       ` Sean Christopherson
2022-11-04 16:31       ` Sean Christopherson
2022-11-04 16:31       ` Sean Christopherson
2022-11-04 16:31       ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 09/44] KVM: Drop arch hardware (un)setup hooks Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-07  3:01   ` Anup Patel
2022-11-07  3:01     ` Anup Patel
2022-11-07  3:01     ` Anup Patel
2022-11-07  3:01     ` Anup Patel
2022-11-07  3:01     ` Anup Patel
2022-11-07 18:22   ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-02 23:18 ` [PATCH 10/44] KVM: VMX: Clean up eVMCS enabling if KVM initialization fails Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03 14:01   ` Paolo Bonzini
2022-11-03 14:01     ` Paolo Bonzini
2022-11-03 14:01     ` Paolo Bonzini
2022-11-03 14:01     ` Paolo Bonzini
2022-11-03 14:01     ` Paolo Bonzini
2022-11-03 14:04     ` Paolo Bonzini
2022-11-03 14:04       ` Paolo Bonzini
2022-11-03 14:04       ` Paolo Bonzini
2022-11-03 14:04       ` Paolo Bonzini
2022-11-03 14:04       ` Paolo Bonzini
2022-11-03 14:28   ` Vitaly Kuznetsov
2022-11-03 14:28     ` Vitaly Kuznetsov
2022-11-03 14:28     ` Vitaly Kuznetsov
2022-11-03 14:28     ` Vitaly Kuznetsov
2022-11-03 14:28     ` Vitaly Kuznetsov
2022-11-11  1:38     ` Sean Christopherson
2022-11-11  1:38       ` Sean Christopherson
2022-11-11  1:38       ` Sean Christopherson
2022-11-11  1:38       ` Sean Christopherson
2022-11-11  1:38       ` Sean Christopherson
2022-11-15  9:30       ` Vitaly Kuznetsov
2022-11-15  9:30         ` Vitaly Kuznetsov
2022-11-15  9:30         ` Vitaly Kuznetsov
2022-11-15  9:30         ` Vitaly Kuznetsov
2022-11-15  9:30         ` Vitaly Kuznetsov
2022-11-02 23:18 ` [PATCH 11/44] KVM: x86: Move guts of kvm_arch_init() to standalone helper Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 12/44] KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 13/44] KVM: x86: Serialize vendor module initialization (hardware setup) Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-16  1:46   ` Huang, Kai
2022-11-16  1:46     ` Huang, Kai
2022-11-16  1:46     ` Huang, Kai
2022-11-16  1:46     ` Huang, Kai
2022-11-16  1:46     ` Huang, Kai
2022-11-16 15:52     ` Sean Christopherson
2022-11-16 15:52       ` Sean Christopherson
2022-11-16 15:52       ` Sean Christopherson
2022-11-16 15:52       ` Sean Christopherson
2022-11-16 15:52       ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 14/44] KVM: arm64: Simplify the CPUHP logic Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 15/44] KVM: arm64: Free hypervisor allocations if vector slot init fails Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 16/44] KVM: arm64: Unregister perf callbacks if hypervisor finalization fails Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 17/44] KVM: arm64: Do arm/arch initialiation without bouncing through kvm_init() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:25   ` Philippe Mathieu-Daudé
2022-11-03  7:25     ` Philippe Mathieu-Daudé
2022-11-03  7:25     ` Philippe Mathieu-Daudé
2022-11-03  7:25     ` Philippe Mathieu-Daudé
2022-11-03  7:25     ` Philippe Mathieu-Daudé
2022-11-03 15:29     ` Sean Christopherson
2022-11-03 15:29       ` Sean Christopherson
2022-11-03 15:29       ` Sean Christopherson
2022-11-03 15:29       ` Sean Christopherson
2022-11-03 15:29       ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 18/44] KVM: arm64: Mark kvm_arm_init() and its unique descendants as __init Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 19/44] KVM: MIPS: Hardcode callbacks to hardware virtualization extensions Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 20/44] KVM: MIPS: Setup VZ emulation? directly from kvm_mips_init() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:10   ` Philippe Mathieu-Daudé
2022-11-03  7:10     ` Philippe Mathieu-Daudé
2022-11-03  7:10     ` Philippe Mathieu-Daudé
2022-11-03  7:10     ` Philippe Mathieu-Daudé
2022-11-03  7:10     ` Philippe Mathieu-Daudé
2022-11-02 23:18 ` [PATCH 21/44] KVM: MIPS: Register die notifier prior to kvm_init() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:12   ` Philippe Mathieu-Daudé
2022-11-03  7:12     ` Philippe Mathieu-Daudé
2022-11-03  7:12     ` Philippe Mathieu-Daudé
2022-11-03  7:12     ` Philippe Mathieu-Daudé
2022-11-03  7:12     ` Philippe Mathieu-Daudé
2022-11-02 23:18 ` [PATCH 22/44] KVM: RISC-V: Do arch init directly in riscv_kvm_init() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:14   ` Philippe Mathieu-Daudé
2022-11-03  7:14     ` Philippe Mathieu-Daudé
2022-11-03  7:14     ` Philippe Mathieu-Daudé
2022-11-03  7:14     ` Philippe Mathieu-Daudé
2022-11-03  7:14     ` Philippe Mathieu-Daudé
2022-11-07  3:05   ` Anup Patel
2022-11-07  3:05     ` Anup Patel
2022-11-07  3:05     ` Anup Patel
2022-11-07  3:05     ` Anup Patel
2022-11-07  3:05     ` Anup Patel
2022-11-02 23:18 ` [PATCH 23/44] KVM: RISC-V: Tag init functions and data with __init, __ro_after_init Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-07  3:10   ` Anup Patel
2022-11-07  3:10     ` Anup Patel
2022-11-07  3:10     ` Anup Patel
2022-11-07  3:10     ` Anup Patel
2022-11-07  3:10     ` Anup Patel
2022-11-02 23:18 ` [PATCH 24/44] KVM: PPC: Move processor compatibility check to module init Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 25/44] KVM: s390: Do s390 specific init without bouncing through kvm_init() Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:16   ` Philippe Mathieu-Daudé
2022-11-03  7:16     ` Philippe Mathieu-Daudé
2022-11-03  7:16     ` Philippe Mathieu-Daudé
2022-11-03  7:16     ` Philippe Mathieu-Daudé
2022-11-03  7:16     ` Philippe Mathieu-Daudé
2022-11-03 12:44   ` Claudio Imbrenda
2022-11-03 12:44     ` Claudio Imbrenda
2022-11-03 12:44     ` Claudio Imbrenda
2022-11-03 12:44     ` Claudio Imbrenda
2022-11-03 12:44     ` Claudio Imbrenda
2022-11-03 13:21     ` Claudio Imbrenda
2022-11-03 13:21       ` Claudio Imbrenda
2022-11-03 13:21       ` Claudio Imbrenda
2022-11-03 13:21       ` Claudio Imbrenda
2022-11-03 13:21       ` Claudio Imbrenda
2022-11-07 18:22   ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-02 23:18 ` [PATCH 26/44] KVM: s390: Mark __kvm_s390_init() and its descendants as __init Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-07 18:22   ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-07 18:22     ` Eric Farman
2022-11-02 23:18 ` [PATCH 27/44] KVM: Drop kvm_arch_{init,exit}() hooks Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:18   ` Philippe Mathieu-Daudé
2022-11-03  7:18     ` Philippe Mathieu-Daudé
2022-11-03  7:18     ` Philippe Mathieu-Daudé
2022-11-03  7:18     ` Philippe Mathieu-Daudé
2022-11-03  7:18     ` Philippe Mathieu-Daudé
2022-11-07  3:13   ` Anup Patel
2022-11-07  3:13     ` Anup Patel
2022-11-07  3:13     ` Anup Patel
2022-11-07  3:13     ` Anup Patel
2022-11-07  3:13     ` Anup Patel
2022-11-07 19:08   ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-02 23:18 ` [PATCH 28/44] KVM: VMX: Make VMCS configuration/capabilities structs read-only after init Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 29/44] KVM: x86: Do CPU compatibility checks in x86 code Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-03  7:20   ` Philippe Mathieu-Daudé
2022-11-03  7:20     ` Philippe Mathieu-Daudé
2022-11-03  7:20     ` Philippe Mathieu-Daudé
2022-11-03  7:20     ` Philippe Mathieu-Daudé
2022-11-03  7:20     ` Philippe Mathieu-Daudé
2022-11-07  3:16   ` Anup Patel [this message]
2022-11-07  3:16     ` Anup Patel
2022-11-07  3:16     ` Anup Patel
2022-11-07  3:16     ` Anup Patel
2022-11-07  3:16     ` Anup Patel
2022-11-07 19:08   ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-07 19:08     ` Eric Farman
2022-11-02 23:18 ` [PATCH 31/44] KVM: x86: Use KBUILD_MODNAME to specify vendor module name Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18 ` [PATCH 32/44] KVM: x86: Unify pr_fmt to use module name for all KVM modules Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-02 23:18   ` Sean Christopherson
2022-11-10  7:31   ` Robert Hoo
2022-11-10  7:31     ` Robert Hoo
2022-11-10  7:31     ` Robert Hoo
2022-11-10  7:31     ` Robert Hoo
2022-11-10  7:31     ` Robert Hoo
2022-11-10 16:50     ` Sean Christopherson
2022-11-10 16:50       ` Sean Christopherson
2022-11-10 16:50       ` Sean Christopherson
2022-11-10 16:50       ` Sean Christopherson
2022-11-10 16:50       ` Sean Christopherson
2022-11-30 23:02       ` Sean Christopherson
2022-11-30 23:02         ` Sean Christopherson
2022-11-30 23:02         ` Sean Christopherson
2022-11-30 23:02         ` Sean Christopherson
2022-11-30 23:02         ` Sean Christopherson
2022-12-01  1:34         ` Robert Hoo
2022-12-01  1:34           ` Robert Hoo
2022-12-01  1:34           ` Robert Hoo
2022-12-01  1:34           ` Robert Hoo
2022-12-01  1:34           ` Robert Hoo
2022-11-02 23:19 ` [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-03 15:08   ` Paolo Bonzini
2022-11-03 15:08     ` Paolo Bonzini
2022-11-03 15:08     ` Paolo Bonzini
2022-11-03 15:08     ` Paolo Bonzini
2022-11-03 15:08     ` Paolo Bonzini
2022-11-03 18:35     ` Sean Christopherson
2022-11-03 18:35       ` Sean Christopherson
2022-11-03 18:35       ` Sean Christopherson
2022-11-03 18:35       ` Sean Christopherson
2022-11-03 18:35       ` Sean Christopherson
2022-11-03 18:46       ` Paolo Bonzini
2022-11-03 18:46         ` Paolo Bonzini
2022-11-03 18:46         ` Paolo Bonzini
2022-11-03 18:46         ` Paolo Bonzini
2022-11-03 18:46         ` Paolo Bonzini
2022-11-03 18:58         ` Sean Christopherson
2022-11-03 18:58           ` Sean Christopherson
2022-11-03 18:58           ` Sean Christopherson
2022-11-03 18:58           ` Sean Christopherson
2022-11-03 18:58           ` Sean Christopherson
2022-11-04  8:02           ` Paolo Bonzini
2022-11-04  8:02             ` Paolo Bonzini
2022-11-04  8:02             ` Paolo Bonzini
2022-11-04  8:02             ` Paolo Bonzini
2022-11-04  8:02             ` Paolo Bonzini
2022-11-04 15:40             ` Sean Christopherson
2022-11-04 15:40               ` Sean Christopherson
2022-11-04 15:40               ` Sean Christopherson
2022-11-04 15:40               ` Sean Christopherson
2022-11-04 15:40               ` Sean Christopherson
2022-11-15 22:50   ` Huang, Kai
2022-11-15 22:50     ` Huang, Kai
2022-11-15 22:50     ` Huang, Kai
2022-11-15 22:50     ` Huang, Kai
2022-11-15 22:50     ` Huang, Kai
2022-11-16  1:56     ` Sean Christopherson
2022-11-16  1:56       ` Sean Christopherson
2022-11-16  1:56       ` Sean Christopherson
2022-11-16  1:56       ` Sean Christopherson
2022-11-16  1:56       ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 34/44] KVM: VMX: Shuffle support checks and hardware enabling code around Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 35/44] KVM: SVM: Check for SVM support in CPU compatibility checks Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 36/44] KVM: x86: Do compatibility checks when onlining CPU Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-03 15:17   ` Paolo Bonzini
2022-11-03 15:17     ` Paolo Bonzini
2022-11-03 15:17     ` Paolo Bonzini
2022-11-03 15:17     ` Paolo Bonzini
2022-11-03 15:17     ` Paolo Bonzini
2022-11-03 17:44     ` Sean Christopherson
2022-11-03 17:44       ` Sean Christopherson
2022-11-03 17:44       ` Sean Christopherson
2022-11-03 17:44       ` Sean Christopherson
2022-11-03 17:44       ` Sean Christopherson
2022-11-03 17:57       ` Paolo Bonzini
2022-11-03 17:57         ` Paolo Bonzini
2022-11-03 17:57         ` Paolo Bonzini
2022-11-03 17:57         ` Paolo Bonzini
2022-11-03 17:57         ` Paolo Bonzini
2022-11-03 21:04   ` Isaku Yamahata
2022-11-03 21:04     ` Isaku Yamahata
2022-11-03 21:04     ` Isaku Yamahata
2022-11-03 21:04     ` Isaku Yamahata
2022-11-03 21:04     ` Isaku Yamahata
2022-11-03 22:34     ` Sean Christopherson
2022-11-03 22:34       ` Sean Christopherson
2022-11-03 22:34       ` Sean Christopherson
2022-11-03 22:34       ` Sean Christopherson
2022-11-03 22:34       ` Sean Christopherson
2022-11-04  7:18       ` Isaku Yamahata
2022-11-04  7:18         ` Isaku Yamahata
2022-11-04  7:18         ` Isaku Yamahata
2022-11-04  7:18         ` Isaku Yamahata
2022-11-04  7:18         ` Isaku Yamahata
2022-11-11  0:06         ` Sean Christopherson
2022-11-11  0:06           ` Sean Christopherson
2022-11-11  0:06           ` Sean Christopherson
2022-11-11  0:06           ` Sean Christopherson
2022-11-11  0:06           ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 37/44] KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-10  7:26   ` Robert Hoo
2022-11-10  7:26     ` Robert Hoo
2022-11-10  7:26     ` Robert Hoo
2022-11-10  7:26     ` Robert Hoo
2022-11-10  7:26     ` Robert Hoo
2022-11-10 16:49     ` Sean Christopherson
2022-11-10 16:49       ` Sean Christopherson
2022-11-10 16:49       ` Sean Christopherson
2022-11-10 16:49       ` Sean Christopherson
2022-11-10 16:49       ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 38/44] KVM: Disable CPU hotplug during hardware enabling Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-10  1:08   ` Huang, Kai
2022-11-10  1:08     ` Huang, Kai
2022-11-10  1:08     ` Huang, Kai
2022-11-10  1:08     ` Huang, Kai
2022-11-10  1:08     ` Huang, Kai
2022-11-10  2:20     ` Huang, Kai
2022-11-10  2:20       ` Huang, Kai
2022-11-10  2:20       ` Huang, Kai
2022-11-10  2:20       ` Huang, Kai
2022-11-10  2:20       ` Huang, Kai
2022-11-10  1:33   ` Huang, Kai
2022-11-10  1:33     ` Huang, Kai
2022-11-10  1:33     ` Huang, Kai
2022-11-10  1:33     ` Huang, Kai
2022-11-10  1:33     ` Huang, Kai
2022-11-10  2:11     ` Huang, Kai
2022-11-10  2:11       ` Huang, Kai
2022-11-10  2:11       ` Huang, Kai
2022-11-10  2:11       ` Huang, Kai
2022-11-10  2:11       ` Huang, Kai
2022-11-10 16:58       ` Sean Christopherson
2022-11-10 16:58         ` Sean Christopherson
2022-11-10 16:58         ` Sean Christopherson
2022-11-10 16:58         ` Sean Christopherson
2022-11-10 16:58         ` Sean Christopherson
2022-11-15 20:16       ` Sean Christopherson
2022-11-15 20:16         ` Sean Christopherson
2022-11-15 20:16         ` Sean Christopherson
2022-11-15 20:16         ` Sean Christopherson
2022-11-15 20:16         ` Sean Christopherson
2022-11-15 20:21         ` Sean Christopherson
2022-11-15 20:21           ` Sean Christopherson
2022-11-15 20:21           ` Sean Christopherson
2022-11-15 20:21           ` Sean Christopherson
2022-11-15 20:21           ` Sean Christopherson
2022-11-16 12:23         ` Huang, Kai
2022-11-16 12:23           ` Huang, Kai
2022-11-16 12:23           ` Huang, Kai
2022-11-16 12:23           ` Huang, Kai
2022-11-16 12:23           ` Huang, Kai
2022-11-16 17:11           ` Sean Christopherson
2022-11-16 17:11             ` Sean Christopherson
2022-11-16 17:11             ` Sean Christopherson
2022-11-16 17:11             ` Sean Christopherson
2022-11-16 17:11             ` Sean Christopherson
2022-11-17  1:39             ` Huang, Kai
2022-11-17  1:39               ` Huang, Kai
2022-11-17  1:39               ` Huang, Kai
2022-11-17  1:39               ` Huang, Kai
2022-11-17  1:39               ` Huang, Kai
2022-11-17 15:16               ` Sean Christopherson
2022-11-17 15:16                 ` Sean Christopherson
2022-11-17 15:16                 ` Sean Christopherson
2022-11-17 15:16                 ` Sean Christopherson
2022-11-17 15:16                 ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 39/44] KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-03 15:23   ` Paolo Bonzini
2022-11-03 15:23     ` Paolo Bonzini
2022-11-03 15:23     ` Paolo Bonzini
2022-11-03 15:23     ` Paolo Bonzini
2022-11-03 15:23     ` Paolo Bonzini
2022-11-03 17:53     ` Sean Christopherson
2022-11-03 17:53       ` Sean Christopherson
2022-11-03 17:53       ` Sean Christopherson
2022-11-03 17:53       ` Sean Christopherson
2022-11-03 17:53       ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 40/44] KVM: Remove on_each_cpu(hardware_disable_nolock) in kvm_exit() Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 41/44] KVM: Use a per-CPU variable to track which CPUs have enabled virtualization Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 42/44] KVM: Make hardware_enable_failed a local variable in the "enable all" path Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 43/44] KVM: Register syscore (suspend/resume) ops early in kvm_init() Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19 ` [PATCH 44/44] KVM: Opt out of generic hardware enabling on s390 and PPC Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-02 23:19   ` Sean Christopherson
2022-11-07  3:23   ` Anup Patel
2022-11-07  3:23     ` Anup Patel
2022-11-07  3:23     ` Anup Patel
2022-11-07  3:23     ` Anup Patel
2022-11-07  3:23     ` Anup Patel
2022-11-03 12:08 ` [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling Christian Borntraeger
2022-11-03 12:08   ` Christian Borntraeger
2022-11-03 12:08   ` Christian Borntraeger
2022-11-03 12:08   ` Christian Borntraeger
2022-11-03 12:08   ` Christian Borntraeger
2022-11-03 15:27   ` Paolo Bonzini
2022-11-03 15:27     ` Paolo Bonzini
2022-11-03 15:27     ` Paolo Bonzini
2022-11-03 15:27     ` Paolo Bonzini
2022-11-03 15:27     ` Paolo Bonzini
2022-11-04  7:17 ` Isaku Yamahata
2022-11-04  7:17   ` Isaku Yamahata
2022-11-04  7:17   ` Isaku Yamahata
2022-11-04  7:17   ` Isaku Yamahata
2022-11-04  7:17   ` Isaku Yamahata
2022-11-04  7:59   ` Paolo Bonzini
2022-11-04  7:59     ` Paolo Bonzini
2022-11-04  7:59     ` Paolo Bonzini
2022-11-04  7:59     ` Paolo Bonzini
2022-11-04  7:59     ` Paolo Bonzini
2022-11-04 20:27   ` Sean Christopherson
2022-11-04 20:27     ` Sean Christopherson
2022-11-04 20:27     ` Sean Christopherson
2022-11-04 20:27     ` Sean Christopherson
2022-11-04 20:27     ` Sean Christopherson
2022-11-07 21:46     ` Isaku Yamahata
2022-11-07 21:46       ` Isaku Yamahata
2022-11-07 21:46       ` Isaku Yamahata
2022-11-07 21:46       ` Isaku Yamahata
2022-11-07 21:46       ` Isaku Yamahata
2022-11-08  1:09       ` Huang, Kai
2022-11-08  1:09         ` Huang, Kai
2022-11-08  1:09         ` Huang, Kai
2022-11-08  1:09         ` Huang, Kai
2022-11-08  1:09         ` Huang, Kai
2022-11-08  5:43         ` Isaku Yamahata
2022-11-08  5:43           ` Isaku Yamahata
2022-11-08  5:43           ` Isaku Yamahata
2022-11-08  5:43           ` Isaku Yamahata
2022-11-08  5:43           ` Isaku Yamahata
2022-11-08  8:56           ` Huang, Kai
2022-11-08  8:56             ` Huang, Kai
2022-11-08  8:56             ` Huang, Kai
2022-11-08  8:56             ` Huang, Kai
2022-11-08  8:56             ` Huang, Kai
2022-11-08 10:35             ` Huang, Kai
2022-11-08 10:35               ` Huang, Kai
2022-11-08 10:35               ` Huang, Kai
2022-11-08 10:35               ` Huang, Kai
2022-11-08 10:35               ` Huang, Kai
2022-11-08 17:46       ` Sean Christopherson
2022-11-08 17:46         ` Sean Christopherson
2022-11-08 17:46         ` Sean Christopherson
2022-11-08 17:46         ` Sean Christopherson
2022-11-08 17:46         ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAhSdy3yQERXaNRq62wSW0y_XepB1eXvH_seNx4Ucc070pm5AA@mail.gmail.com \
    --to=anup@brainfault.org \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=alexandru.elisei@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@atishpatra.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=chao.gao@intel.com \
    --cc=chenhuacai@kernel.org \
    --cc=david@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=farosas@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=isaku.yamahata@intel.com \
    --cc=james.morse@arm.com \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maz@kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=oliver.upton@linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=yuan.yao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.