linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: MIPS: Make kvm_mips_callbacks const
@ 2023-02-24 19:28 Sean Christopherson
  2023-02-26 22:06 ` Philippe Mathieu-Daudé
  2023-03-24 23:35 ` Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2023-02-24 19:28 UTC (permalink / raw)
  To: Huacai Chen, Aleksandar Markovic
  Cc: linux-mips, kvm, linux-kernel, Philippe Mathieu-Daudé,
	Sean Christopherson

Make kvm_mips_callbacks fully const as it's now hardcoded to point at
kvm_vz_callbacks, the only remaining the set of callbacks.

Link: https://lore.kernel.org/all/beb697c2-dfad-780e-4638-76b229f28731@linaro.org
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/mips/include/asm/kvm_host.h | 2 +-
 arch/mips/kvm/vz.c               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index 2803c9c21ef9..957121a495f0 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -757,7 +757,7 @@ struct kvm_mips_callbacks {
 	int (*vcpu_run)(struct kvm_vcpu *vcpu);
 	void (*vcpu_reenter)(struct kvm_vcpu *vcpu);
 };
-extern struct kvm_mips_callbacks *kvm_mips_callbacks;
+extern const struct kvm_mips_callbacks * const kvm_mips_callbacks;
 int kvm_mips_emulation_init(void);
 
 /* Debug: dump vcpu state */
diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c
index dafab003ea0d..3d21cbfa7443 100644
--- a/arch/mips/kvm/vz.c
+++ b/arch/mips/kvm/vz.c
@@ -3305,7 +3305,7 @@ static struct kvm_mips_callbacks kvm_vz_callbacks = {
 };
 
 /* FIXME: Get rid of the callbacks now that trap-and-emulate is gone. */
-struct kvm_mips_callbacks *kvm_mips_callbacks = &kvm_vz_callbacks;
+const struct kvm_mips_callbacks * const kvm_mips_callbacks = &kvm_vz_callbacks;
 
 int kvm_mips_emulation_init(void)
 {

base-commit: 3ad108511e1c19ff3a3fcb9a39b3eaebf4dd4054
-- 
2.39.2.722.g9855ee24e9-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: MIPS: Make kvm_mips_callbacks const
  2023-02-24 19:28 [PATCH] KVM: MIPS: Make kvm_mips_callbacks const Sean Christopherson
@ 2023-02-26 22:06 ` Philippe Mathieu-Daudé
  2023-03-24 23:35 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-26 22:06 UTC (permalink / raw)
  To: Sean Christopherson, Huacai Chen, Aleksandar Markovic
  Cc: linux-mips, kvm, linux-kernel

On 24/2/23 20:28, Sean Christopherson wrote:
> Make kvm_mips_callbacks fully const as it's now hardcoded to point at
> kvm_vz_callbacks, the only remaining the set of callbacks.
> 
> Link: https://lore.kernel.org/all/beb697c2-dfad-780e-4638-76b229f28731@linaro.org
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>   arch/mips/include/asm/kvm_host.h | 2 +-
>   arch/mips/kvm/vz.c               | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: MIPS: Make kvm_mips_callbacks const
  2023-02-24 19:28 [PATCH] KVM: MIPS: Make kvm_mips_callbacks const Sean Christopherson
  2023-02-26 22:06 ` Philippe Mathieu-Daudé
@ 2023-03-24 23:35 ` Sean Christopherson
  1 sibling, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2023-03-24 23:35 UTC (permalink / raw)
  To: Sean Christopherson, Huacai Chen, Aleksandar Markovic
  Cc: linux-mips, kvm, linux-kernel, Philippe Mathieu-Daudé

On Fri, 24 Feb 2023 11:28:32 -0800, Sean Christopherson wrote:
> Make kvm_mips_callbacks fully const as it's now hardcoded to point at
> kvm_vz_callbacks, the only remaining the set of callbacks.
> 
> 

Applied to kvm-x86 generic, thanks!

[1/1] KVM: MIPS: Make kvm_mips_callbacks const
      https://github.com/kvm-x86/linux/commit/7ffc2e89518a

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-24 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 19:28 [PATCH] KVM: MIPS: Make kvm_mips_callbacks const Sean Christopherson
2023-02-26 22:06 ` Philippe Mathieu-Daudé
2023-03-24 23:35 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).