Skip to contentSkip to conversation

linux-next: build failure after merge of the kvm tree

PATCH Stephen Rothwell 1 participant 2 messages Jul 17, 2020 – Jul 29, 2020

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

Hi all,

After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) failed like this:

arch/x86/kernel/kvm.c: In function '__sysvec_kvm_asyncpf_interrupt':
arch/x86/kernel/kvm.c:275:13: error: implicit declaration of function 'idtentry_enter_cond_rcu'; did you mean 'idtentry_enter_nmi'? [-Werror=implicit-function-declaration]

  275 |  rcu_exit = idtentry_enter_cond_rcu(regs);
      |             ^~~~~~~~~~~~~~~~~~~~~~~
      |             idtentry_enter_nmi
arch/x86/kernel/kvm.c:286:2: error: implicit declaration of function 'idtentry_exit_cond_rcu'; did you mean 'idtentry_exit_nmi'? [-Werror=implicit-function-declaration]
  286 |  idtentry_exit_cond_rcu(regs, rcu_exit);
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  idtentry_exit_nmi

Caused by commit

b037b09b9058 ("x86/entry: Rename idtentry_enter/exit_cond_rcu() to idtentry_enter/exit()")

from the tip tree interacting with commit

26d05b368a5c ("Merge branch 'kvm-async-pf-int' into HEAD")

from the kvm tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Fri, 17 Jul 2020 15:51:27 +1000
Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming

---
 arch/x86/kernel/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/kvm.c +3 -3
index cebd96687194..91dd322f768d 100644
@@ -270,9 +270,9 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 {
 	struct pt_regs *old_regs = set_irq_regs(regs);
 	u32 token;
-	bool rcu_exit;
+	idtentry_state_t state;
 
-	rcu_exit = idtentry_enter_cond_rcu(regs);
+	state = idtentry_enter(regs);
 
 	inc_irq_stat(irq_hv_callback_count);
 
@@ -283,7 +283,7 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 		wrmsrl(MSR_KVM_ASYNC_PF_ACK, 1);
 	}
 
-	idtentry_exit_cond_rcu(regs, rcu_exit);
+	idtentry_exit(regs, state);
 	set_irq_regs(old_regs);
 }
 
Signature · 5 lines
2.27.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 52 lines · On Fri, 17 Jul 2020 15:57:01 +1000 Stephen Rothwell <[email protected]>…

After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) failed like this:

arch/x86/kernel/kvm.c: In function '__sysvec_kvm_asyncpf_interrupt':
arch/x86/kernel/kvm.c:275:13: error: implicit declaration of function 'idtentry_enter_cond_rcu'; did you mean 'idtentry_enter_nmi'? [-Werror=implicit-function-declaration]

  275 |  rcu_exit = idtentry_enter_cond_rcu(regs);
      |             ^~~~~~~~~~~~~~~~~~~~~~~
      |             idtentry_enter_nmi
arch/x86/kernel/kvm.c:286:2: error: implicit declaration of function 'idtentry_exit_cond_rcu'; did you mean 'idtentry_exit_nmi'? [-Werror=implicit-function-declaration]
  286 |  idtentry_exit_cond_rcu(regs, rcu_exit);
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  idtentry_exit_nmi

Caused by commit

b037b09b9058 ("x86/entry: Rename idtentry_enter/exit_cond_rcu() to idtentry_enter/exit()")

from the tip tree interacting with commit

26d05b368a5c ("Merge branch 'kvm-async-pf-int' into HEAD")

from the kvm tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Fri, 17 Jul 2020 15:51:27 +1000
Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming

---
 arch/x86/kernel/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/kvm.c +2 -2
index cebd96687194..91dd322f768d 100644
@@ -270,9 +270,9 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 {
 	struct pt_regs *old_regs = set_irq_regs(regs);
 	u32 token;
-	bool rcu_exit;
+	idtentry_state_t state;
 
-	rcu_exit = idtentry_enter_cond_rcu(regs);
+	state = idtentry_enter(regs);
 
 	inc_irq_stat(irq_hv_callback_count);
 

arch/x86/kernel/kvm.c DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt) · line 289

Quoted 8 lines
arch/x86/kernel/kvm.c +1 -1
@@ -283,7 +283,7 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 		wrmsrl(MSR_KVM_ASYNC_PF_ACK, 1);
 	}
 
-	idtentry_exit_cond_rcu(regs, rcu_exit);
+	idtentry_exit(regs, state);
 	set_irq_regs(old_regs);
 }
 

Now due to commits

bdcd178ada90 ("x86/entry: Use generic interrupt entry/exit code") a27a0a55495c ("x86/entry: Cleanup idtentry_enter/exit")

The above patch now looks like this:

From: Stephen Rothwell <[email protected]>
Date: Fri, 17 Jul 2020 15:51:27 +1000
Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming

---
 arch/x86/kernel/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/kvm.c +3 -3
index cebd96687194..91dd322f768d 100644
@@ -270,9 +270,9 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 {
 	struct pt_regs *old_regs = set_irq_regs(regs);
 	u32 token;
-	bool rcu_exit;
+	irqentry_state_t state;
 
-	rcu_exit = idtentry_enter_cond_rcu(regs);
+	state = irqentry_enter(regs);
 
 	inc_irq_stat(irq_hv_callback_count);
 
@@ -283,7 +283,7 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_kvm_asyncpf_interrupt)
 		wrmsrl(MSR_KVM_ASYNC_PF_ACK, 1);
 	}
 
-	idtentry_exit_cond_rcu(regs, rcu_exit);
+	irqentry_exit(regs, state);
 	set_irq_regs(old_regs);
 }
 
Signature · 5 lines
2.27.0

-- 
Cheers,
Stephen Rothwell