Skip to contentSkip to conversation

KVM: arm64: Mark a couple of variables static

PATCH Applied Quentin Perret 3 participants 6 messages May 14, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover KVM: arm64: Mark a couple of variables static

The kernel test bot is complaining (and rightfully so) about variables introduced by the host stage-2 series that should be static. This series fixes all of them.

Thanks!

Quentin Perret (2):
KVM: arm64: Mark pkvm_pgtable_mm_ops static
KVM: arm64: Mark the host stage-2 memory pools static

 arch/arm64/kvm/hyp/nvhe/mem_protect.c | 4 ++--
 arch/arm64/kvm/hyp/nvhe/setup.c       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
#1 lore raw

PATCH 1/2 KVM: arm64: Mark pkvm_pgtable_mm_ops static

It is not used outside of setup.c, mark it static.

Fixes f320bc742bc2 ("KVM: arm64: Prepare the creation of s1 mappings at EL2")
---
 arch/arm64/kvm/hyp/nvhe/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/hyp/nvhe/setup.c +1 -1
index 7488f53b0aa2..a3d3a275344e 100644
@@ -17,7 +17,6 @@
 #include <nvhe/trap_handler.h>
 
 struct hyp_pool hpool;
-struct kvm_pgtable_mm_ops pkvm_pgtable_mm_ops;
 unsigned long hyp_nr_cpus;
 
 #define hyp_percpu_size ((unsigned long)__per_cpu_end - \
@@ -27,6 +26,7 @@ static void *vmemmap_base;
 static void *hyp_pgt_base;
 static void *host_s2_mem_pgt_base;
 static void *host_s2_dev_pgt_base;
+static struct kvm_pgtable_mm_ops pkvm_pgtable_mm_ops;
 
 static int divide_memory_pool(void *virt, unsigned long size)
 {
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
#2 lore raw

PATCH 2/2 KVM: arm64: Mark the host stage-2 memory pools static

In reply to Quentin Perret

The host stage-2 memory pools are not used outside of mem_protect.c, mark them static.

Fixes 1025c8c0c6ac ("KVM: arm64: Wrap the host with a stage 2")
---
 arch/arm64/kvm/hyp/nvhe/mem_protect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kvm/hyp/nvhe/mem_protect.c +2 -2
index e342f7f4f4fb..4b60c0056c04 100644
@@ -23,8 +23,8 @@
 extern unsigned long hyp_nr_cpus;
 struct host_kvm host_kvm;
 
-struct hyp_pool host_s2_mem;
-struct hyp_pool host_s2_dev;
+static struct hyp_pool host_s2_mem;
+static struct hyp_pool host_s2_dev;
 
 /*
  * Copies of the host's CPU features registers holding sanitized values.
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog
maintainer
#3 lore raw

Re: [PATCH 2/2] KVM: arm64: Mark the host stage-2 memory pools static

Quoted 5 lines · Quentin Perret

The host stage-2 memory pools are not used outside of mem_protect.c, mark them static.

Fixes 1025c8c0c6ac ("KVM: arm64: Wrap the host with a stage 2")

^^^ nit, but this tag has gone wonky.

Will

maintainer
#4 lore raw

Re: [PATCH 2/2] KVM: arm64: Mark the host stage-2 memory pools static

Quoted 8 lines · Will Deacon
Quoted 5 lines · Quentin Perret

The host stage-2 memory pools are not used outside of mem_protect.c, mark them static.

Fixes 1025c8c0c6ac ("KVM: arm64: Wrap the host with a stage 2")

^^^ nit, but this tag has gone wonky.

Well spotted. I'll fix it locally, though the SHA1 will change...

         M.
Signature · 1 line
Jazz is not dead. It just smells funny...
maintainer Applied
#5 lore raw
In reply to Quentin Perret
Quoted 11 lines · Quentin Perret

The kernel test bot is complaining (and rightfully so) about variables introduced by the host stage-2 series that should be static. This series fixes all of them.

Thanks!

Quentin Perret (2):
KVM: arm64: Mark pkvm_pgtable_mm_ops static
KVM: arm64: Mark the host stage-2 memory pools static

[...]

Applied to fixes, thanks!

[1/2] KVM: arm64: Mark pkvm_pgtable_mm_ops static

      commit: 8030d45936f2c526ace7b8404c8272239289b5b7
[2/2] KVM: arm64: Mark the host stage-2 memory pools static
      commit: 72799c362520f37abd929799190350e466890336

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.