Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: build failure after merge of the kvm tree
@ 2020-07-17  5:57 Stephen Rothwell
  2020-07-29  7:06 ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2020-07-17  5:57 UTC (permalink / raw)
  To: Paolo Bonzini, KVM, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List


[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]

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 <sfr@canb.auug.org.au>
Date: Fri, 17 Jul 2020 15:51:27 +1000
Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kernel/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index cebd96687194..91dd322f768d 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -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);
 }
 
-- 
2.27.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2020-07-17  5:57 linux-next: build failure after merge of the kvm tree Stephen Rothwell
@ 2020-07-29  7:06 ` Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2020-07-29  7:06 UTC (permalink / raw)
  To: Paolo Bonzini, KVM, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List


[-- Attachment #1: Type: text/plain, Size: 3526 bytes --]

Hi all,

On Fri, 17 Jul 2020 15:57:01 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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 <sfr@canb.auug.org.au>
> Date: Fri, 17 Jul 2020 15:51:27 +1000
> Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/x86/kernel/kvm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> index cebd96687194..91dd322f768d 100644
> --- a/arch/x86/kernel/kvm.c
> +++ b/arch/x86/kernel/kvm.c
> @@ -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);
>  }
>  

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 <sfr@canb.auug.org.au>
Date: Fri, 17 Jul 2020 15:51:27 +1000
Subject: [PATCH] fix up for idtentry_{enter,exit}_cond_rcu() renaming

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kernel/kvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index cebd96687194..91dd322f768d 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -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);
 }
 
-- 
2.27.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2020-05-21  6:28 Stephen Rothwell
@ 2020-06-04  2:54 ` Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2020-06-04  2:54 UTC (permalink / raw)
  To: Paolo Bonzini, KVM, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Uros Bizjak


[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

Hi all,

On Thu, 21 May 2020 16:28:54 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kvm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> arch/x86/kvm/svm/svm.c: In function 'kvm_machine_check':
> arch/x86/kvm/svm/svm.c:1834:2: error: too many arguments to function 'do_machine_check'
>  1834 |  do_machine_check(&regs, 0);
>       |  ^~~~~~~~~~~~~~~~
> In file included from arch/x86/kvm/svm/svm.c:36:
> arch/x86/include/asm/mce.h:254:6: note: declared here
>   254 | void do_machine_check(struct pt_regs *pt_regs);
>       |      ^~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   1c164cb3ffd0 ("KVM: SVM: Use do_machine_check to pass MCE to the host")
> 
> interacting with commit
> 
>   aaa4947defff ("x86/entry: Convert Machine Check to IDTENTRY_IST")
> 
> from the tip tree.
> 
> I added the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 21 May 2020 16:24:59 +1000
> Subject: [PATCH] KVM: SVM: fix up for do_machine_check() API change
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/x86/kvm/svm/svm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index ae287980c027..7488c8abe825 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -1831,7 +1831,7 @@ static void kvm_machine_check(void)
>  		.flags = X86_EFLAGS_IF,
>  	};
>  
> -	do_machine_check(&regs, 0);
> +	do_machine_check(&regs);
>  #endif
>  }
>  
> -- 
> 2.26.2

This fix is now needed whe the tip tree merges with Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2020-05-21  6:28 Stephen Rothwell
  2020-06-04  2:54 ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2020-05-21  6:28 UTC (permalink / raw)
  To: Paolo Bonzini, KVM, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Uros Bizjak


[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

Hi all,

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

arch/x86/kvm/svm/svm.c: In function 'kvm_machine_check':
arch/x86/kvm/svm/svm.c:1834:2: error: too many arguments to function 'do_machine_check'
 1834 |  do_machine_check(&regs, 0);
      |  ^~~~~~~~~~~~~~~~
In file included from arch/x86/kvm/svm/svm.c:36:
arch/x86/include/asm/mce.h:254:6: note: declared here
  254 | void do_machine_check(struct pt_regs *pt_regs);
      |      ^~~~~~~~~~~~~~~~

Caused by commit

  1c164cb3ffd0 ("KVM: SVM: Use do_machine_check to pass MCE to the host")

interacting with commit

  aaa4947defff ("x86/entry: Convert Machine Check to IDTENTRY_IST")

from the tip tree.

I added the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 21 May 2020 16:24:59 +1000
Subject: [PATCH] KVM: SVM: fix up for do_machine_check() API change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kvm/svm/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index ae287980c027..7488c8abe825 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -1831,7 +1831,7 @@ static void kvm_machine_check(void)
 		.flags = X86_EFLAGS_IF,
 	};
 
-	do_machine_check(&regs, 0);
+	do_machine_check(&regs);
 #endif
 }
 
-- 
2.26.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2019-02-19 15:36 ` Sean Christopherson
@ 2019-02-19 18:17   ` Paolo Bonzini
  0 siblings, 0 replies; 28+ messages in thread
From: Paolo Bonzini @ 2019-02-19 18:17 UTC (permalink / raw)
  To: Sean Christopherson, Stephen Rothwell
  Cc: Radim Krčmář,
	KVM, Linux Next Mailing List, Linux Kernel Mailing List

On 19/02/19 16:36, Sean Christopherson wrote:
> On Mon, Feb 18, 2019 at 02:42:00PM +1100, Stephen Rothwell wrote:
>> Hi all,
> 
> ...
> 
>> Caused by commits
>>
>>   1561fcbc8e16 ("KVM: x86: Explicitly #define the VCPU_REGS_* indices")
>>   a46e726511f4 ("KVM: VMX: Move vCPU-run code to a proper assembly routine")
>>
>> It looks like a file was not git added :-(
> 
> Yep, 1561fcbc8e16 should have introduced arch/x86/include/asm/kvm_vcpu_regs.h.
> 
> I assume there's nothing to do but wait for Paolo or Radim to fixup the
> KVM tree?

Yes, I'll do it shortly.

Paolo

> 
> Original patch:
> 
>   https://patchwork.kernel.org/patch/10781575/
> 

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

* Re: linux-next: build failure after merge of the kvm tree
  2019-02-18  3:42 Stephen Rothwell
@ 2019-02-19 15:36 ` Sean Christopherson
  2019-02-19 18:17   ` Paolo Bonzini
  0 siblings, 1 reply; 28+ messages in thread
From: Sean Christopherson @ 2019-02-19 15:36 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Paolo Bonzini, Radim Krčmář,
	KVM, Linux Next Mailing List, Linux Kernel Mailing List

On Mon, Feb 18, 2019 at 02:42:00PM +1100, Stephen Rothwell wrote:
> Hi all,

...

> Caused by commits
> 
>   1561fcbc8e16 ("KVM: x86: Explicitly #define the VCPU_REGS_* indices")
>   a46e726511f4 ("KVM: VMX: Move vCPU-run code to a proper assembly routine")
> 
> It looks like a file was not git added :-(

Yep, 1561fcbc8e16 should have introduced arch/x86/include/asm/kvm_vcpu_regs.h.

I assume there's nothing to do but wait for Paolo or Radim to fixup the
KVM tree?


Original patch:

  https://patchwork.kernel.org/patch/10781575/

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

* linux-next: build failure after merge of the kvm tree
@ 2019-02-18  3:42 Stephen Rothwell
  2019-02-19 15:36 ` Sean Christopherson
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2019-02-18  3:42 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář, KVM
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Sean Christopherson


[-- Attachment #1: Type: text/plain, Size: 3262 bytes --]

Hi all,

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

In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:14:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/kvm_main.c:21:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/eventfd.c:24:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/irqchip.c:27:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/async_pf.c:23:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/../../../virt/kvm/vfio.c:14:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/x86.c:22:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/irq.h:27,
                 from arch/x86/kvm/mmu.c:21:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from arch/x86/kvm/emulate.c:23:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:38,
                 from drivers/gpu/drm/i915/gvt/kvmgt.c:42:
arch/x86/include/asm/kvm_host.h:38:10: fatal error: asm/kvm_vcpu_regs.h: No such file or directory
 #include <asm/kvm_vcpu_regs.h>
          ^~~~~~~~~~~~~~~~~~~~~

Caused by commits

  1561fcbc8e16 ("KVM: x86: Explicitly #define the VCPU_REGS_* indices")
  a46e726511f4 ("KVM: VMX: Move vCPU-run code to a proper assembly routine")

It looks like a file was not git added :-(

I have used the kvm tree from next-20190215 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2018-12-19  4:33 Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2018-12-19  4:33 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář,
	KVM, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dave Hansen,
	Sean Christopherson


[-- Attachment #1: Type: text/plain, Size: 5372 bytes --]

Hi all,

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

arch/x86/kvm/vmx/nested.c: In function 'prepare_vmcs02_full':
arch/x86/kvm/vmx/nested.c:2242:6: error: implicit declaration of function 'kvm_mpx_supported'; did you mean 'vmx_mpx_supported'? [-Werror=implicit-function-declaration]
  if (kvm_mpx_supported()) {
      ^~~~~~~~~~~~~~~~~
      vmx_mpx_supported

Caused by commit

  55d2375e58a6 ("KVM: nVMX: Move nested code to dedicated files")

interacting with commit

  eb012ef3b4e3 ("x86: Remove Intel MPX")

from the tip tree.

I applied the following merge fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 19 Dec 2018 15:28:31 +1100
Subject: [PATCH] kvm: tidy up from MPX removal

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kvm/vmx/nested.c | 13 -------------
 arch/x86/kvm/vmx/vmx.c    | 40 +++------------------------------------
 2 files changed, 3 insertions(+), 50 deletions(-)

diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 3f019aa63341..59e6da4171a8 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -2238,14 +2238,6 @@ static void prepare_vmcs02_full(struct vcpu_vmx *vmx, struct vmcs12 *vmcs12)
 	vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, vmx->msr_autoload.guest.nr);
 
 	set_cr4_guest_host_mask(vmx);
-
-	if (kvm_mpx_supported()) {
-		if (vmx->nested.nested_run_pending &&
-			(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_BNDCFGS))
-			vmcs_write64(GUEST_BNDCFGS, vmcs12->guest_bndcfgs);
-		else
-			vmcs_write64(GUEST_BNDCFGS, vmx->nested.vmcs01_guest_bndcfgs);
-	}
 }
 
 /*
@@ -2971,9 +2963,6 @@ int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry)
 
 	if (!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS))
 		vmx->nested.vmcs01_debugctl = vmcs_read64(GUEST_IA32_DEBUGCTL);
-	if (kvm_mpx_supported() &&
-		!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_BNDCFGS))
-		vmx->nested.vmcs01_guest_bndcfgs = vmcs_read64(GUEST_BNDCFGS);
 
 	vmx_switch_vmcs(vcpu, &vmx->nested.vmcs02);
 
@@ -3496,8 +3485,6 @@ static void sync_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
 	vmcs12->guest_sysenter_cs = vmcs_read32(GUEST_SYSENTER_CS);
 	vmcs12->guest_sysenter_esp = vmcs_readl(GUEST_SYSENTER_ESP);
 	vmcs12->guest_sysenter_eip = vmcs_readl(GUEST_SYSENTER_EIP);
-	if (kvm_mpx_supported())
-		vmcs12->guest_bndcfgs = vmcs_read64(GUEST_BNDCFGS);
 }
 
 /*
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c90fffdc5a93..ccab822be9cd 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -1527,12 +1527,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 		msr_info->data = vmcs_readl(GUEST_SYSENTER_ESP);
 		break;
 	case MSR_IA32_BNDCFGS:
-		if (!kvm_mpx_supported() ||
-		    (!msr_info->host_initiated &&
-		     !guest_cpuid_has(vcpu, X86_FEATURE_MPX)))
-			return 1;
-		msr_info->data = vmcs_read64(GUEST_BNDCFGS);
-		break;
+		return 1;
 	case MSR_IA32_MCG_EXT_CTL:
 		if (!msr_info->host_initiated &&
 		    !(vmx->msr_ia32_feature_control &
@@ -1610,15 +1605,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 		vmcs_writel(GUEST_SYSENTER_ESP, data);
 		break;
 	case MSR_IA32_BNDCFGS:
-		if (!kvm_mpx_supported() ||
-		    (!msr_info->host_initiated &&
-		     !guest_cpuid_has(vcpu, X86_FEATURE_MPX)))
-			return 1;
-		if (is_noncanonical_address(data & PAGE_MASK, vcpu) ||
-		    (data & MSR_IA32_BNDCFGS_RSVD))
-			return 1;
-		vmcs_write64(GUEST_BNDCFGS, data);
-		break;
+		return 1;
 	case MSR_IA32_SPEC_CTRL:
 		if (!msr_info->host_initiated &&
 		    !guest_cpuid_has(vcpu, X86_FEATURE_SPEC_CTRL))
@@ -3868,8 +3855,6 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
 	vmcs_write32(GUEST_ACTIVITY_STATE, GUEST_ACTIVITY_ACTIVE);
 	vmcs_write32(GUEST_INTERRUPTIBILITY_INFO, 0);
 	vmcs_writel(GUEST_PENDING_DBG_EXCEPTIONS, 0);
-	if (kvm_mpx_supported())
-		vmcs_write64(GUEST_BNDCFGS, 0);
 
 	setup_msrs(vmx);
 
@@ -6636,23 +6621,6 @@ static void nested_vmx_cr_fixed1_bits_update(struct kvm_vcpu *vcpu)
 #undef cr4_fixed1_update
 }
 
-static void nested_vmx_entry_exit_ctls_update(struct kvm_vcpu *vcpu)
-{
-	struct vcpu_vmx *vmx = to_vmx(vcpu);
-
-	if (kvm_mpx_supported()) {
-		bool mpx_enabled = guest_cpuid_has(vcpu, X86_FEATURE_MPX);
-
-		if (mpx_enabled) {
-			vmx->nested.msrs.entry_ctls_high |= VM_ENTRY_LOAD_BNDCFGS;
-			vmx->nested.msrs.exit_ctls_high |= VM_EXIT_CLEAR_BNDCFGS;
-		} else {
-			vmx->nested.msrs.entry_ctls_high &= ~VM_ENTRY_LOAD_BNDCFGS;
-			vmx->nested.msrs.exit_ctls_high &= ~VM_EXIT_CLEAR_BNDCFGS;
-		}
-	}
-}
-
 static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
@@ -6669,10 +6637,8 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
 		to_vmx(vcpu)->msr_ia32_feature_control_valid_bits &=
 			~FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX;
 
-	if (nested_vmx_allowed(vcpu)) {
+	if (nested_vmx_allowed(vcpu))
 		nested_vmx_cr_fixed1_bits_update(vcpu);
-		nested_vmx_entry_exit_ctls_update(vcpu);
-	}
 }
 
 static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
-- 
2.19.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2017-02-08  3:23 Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2017-02-08  3:23 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov, KVM
  Cc: linux-next, linux-kernel, Paolo Bonzini

Hi all,

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

arch/x86/kvm/x86.c: In function 'kvm_pv_clock_pairing':
arch/x86/kvm/x86.c:6157:2: error: unknown type name 'cycle_t'
  cycle_t cycle;
  ^
arch/x86/kvm/x86.c:6163:42: error: passing argument 2 of 'kvm_get_walltime_and_clockread' from incompatible pointer type [-Werror=incompatible-pointer-types]
  if (kvm_get_walltime_and_clockread(&ts, &cycle) == false)
                                          ^
arch/x86/kvm/x86.c:1665:13: note: expected 'u64 * {aka long long unsigned int *}' but argument is of type 'int *'
 static bool kvm_get_walltime_and_clockread(struct timespec *ts,
             ^

Caused by commit

  55dd00a73a51 ("KVM: x86: add KVM_HC_CLOCK_PAIRING hypercall")

I have used the version fo the kvm tree from next-20170207 for today.

-- 
Cheers,
Stephen Rothwell

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

* linux-next: build failure after merge of the kvm tree
@ 2016-12-19  1:11 Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2016-12-19  1:11 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov, KVM
  Cc: linux-next, linux-kernel, Paolo Bonzini

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 '__kvm_vcpu_is_preempted':
arch/x86/kernel/kvm.c:596:14: error: 'struct kvm_steal_time' has no member named 'preempted'
  return !!src->preempted;
              ^
arch/x86/kernel/kvm.c:597:1: warning: control reaches end of non-void function [-Wreturn-type]  
 }
 ^

Caused by commit

  b94c3698b4b0 ("Revert "x86/kvm: Support the vCPU preemption check"")

I have used the kvm tree from next-20161216 for today.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the kvm tree
  2015-09-08  2:10 ` Wanpeng Li
@ 2015-09-08  9:24   ` Paolo Bonzini
  0 siblings, 0 replies; 28+ messages in thread
From: Paolo Bonzini @ 2015-09-08  9:24 UTC (permalink / raw)
  To: Wanpeng Li, Stephen Rothwell, Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel



On 08/09/2015 04:10, Wanpeng Li wrote:
> 
> I miss place the trace codes under CONFIG_KVM_ASYNC_PF, the patch in the
> attachment rewrite the commit and fix it. Sorry for that.

Thanks.  I cannot rewind kvm/next, so I committed just the incremental change:

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 0d1bc478833b..d6f83222a6a1 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -356,6 +356,8 @@ TRACE_EVENT(
 		  __entry->address)
 );
 
+#endif
+
 TRACE_EVENT(kvm_halt_poll_ns,
 	TP_PROTO(bool grow, unsigned int vcpu_id, int new, int old),
 	TP_ARGS(grow, vcpu_id, new, old),
@@ -386,8 +388,6 @@ TRACE_EVENT(kvm_halt_poll_ns,
 #define trace_kvm_halt_poll_ns_shrink(vcpu_id, new, old) \
 	trace_kvm_halt_poll_ns(false, vcpu_id, new, old)
 
-#endif
-
 #endif /* _TRACE_KVM_MAIN_H */
 
 /* This part must be outside protection */

Paolo

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

* Re: linux-next: build failure after merge of the kvm tree
  2015-09-08  1:35 Stephen Rothwell
@ 2015-09-08  2:10 ` Wanpeng Li
  2015-09-08  9:24   ` Paolo Bonzini
  0 siblings, 1 reply; 28+ messages in thread
From: Wanpeng Li @ 2015-09-08  2:10 UTC (permalink / raw)
  To: Stephen Rothwell, Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, Paolo Bonzini


[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Hi Paolo, Stephen,
On 9/8/15 9:35 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'grow_halt_poll_ns':
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1931:2: error: implicit declaration of function 'trace_kvm_halt_poll_ns_grow' [-Werror=implicit-function-declaration]
>    trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old);
>    ^
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'shrink_halt_poll_ns':
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1945:2: error: implicit declaration of function 'trace_kvm_halt_poll_ns_shrink' [-Werror=implicit-function-declaration]
>    trace_kvm_halt_poll_ns_shrink(vcpu->vcpu_id, val, old);
>    ^
>
> Caused by commit
>
>    2cbd78244fb2 ("KVM: trace kvm_halt_poll_ns grow/shrink")
>
> I have reverted that commit for today.

I miss place the trace codes under CONFIG_KVM_ASYNC_PF, the patch in the 
attachment rewrite the commit and fix it. Sorry for that.

Regards,
Wanpeng Li

[-- Attachment #2: 0001-KVM-trace-kvm_halt_poll_ns-grow-shrink.patch --]
[-- Type: text/plain, Size: 2578 bytes --]

>From c06ca8fec43a7ccc1fe265afe8b2fd3b84085368 Mon Sep 17 00:00:00 2001
From: Wanpeng Li <wanpeng.li@hotmail.com>
Date: Tue, 8 Sep 2015 10:03:38 +0800
Subject: [PATCH] KVM: trace kvm_halt_poll_ns grow/shrink

Tracepoint for dynamic halt_pool_ns, fired on every potential change.

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
---
 include/trace/events/kvm.h | 30 ++++++++++++++++++++++++++++++
 virt/kvm/kvm_main.c        |  8 ++++++--
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index a44062d..d6f8322 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -358,6 +358,36 @@ TRACE_EVENT(
 
 #endif
 
+TRACE_EVENT(kvm_halt_poll_ns,
+	TP_PROTO(bool grow, unsigned int vcpu_id, int new, int old),
+	TP_ARGS(grow, vcpu_id, new, old),
+
+	TP_STRUCT__entry(
+		__field(bool, grow)
+		__field(unsigned int, vcpu_id)
+		__field(int, new)
+		__field(int, old)
+	),
+
+	TP_fast_assign(
+		__entry->grow           = grow;
+		__entry->vcpu_id        = vcpu_id;
+		__entry->new            = new;
+		__entry->old            = old;
+	),
+
+	TP_printk("vcpu %u: halt_poll_ns %d (%s %d)",
+			__entry->vcpu_id,
+			__entry->new,
+			__entry->grow ? "grow" : "shrink",
+			__entry->old)
+);
+
+#define trace_kvm_halt_poll_ns_grow(vcpu_id, new, old) \
+	trace_kvm_halt_poll_ns(true, vcpu_id, new, old)
+#define trace_kvm_halt_poll_ns_shrink(vcpu_id, new, old) \
+	trace_kvm_halt_poll_ns(false, vcpu_id, new, old)
+
 #endif /* _TRACE_KVM_MAIN_H */
 
 /* This part must be outside protection */
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 8ab49cf..4662a88 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1918,8 +1918,9 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_mark_page_dirty);
 
 static void grow_halt_poll_ns(struct kvm_vcpu *vcpu)
 {
-	int val = vcpu->halt_poll_ns;
+	int old, val;
 
+	old = val = vcpu->halt_poll_ns;
 	/* 10us base */
 	if (val == 0 && halt_poll_ns_grow)
 		val = 10000;
@@ -1927,18 +1928,21 @@ static void grow_halt_poll_ns(struct kvm_vcpu *vcpu)
 		val *= halt_poll_ns_grow;
 
 	vcpu->halt_poll_ns = val;
+	trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old);
 }
 
 static void shrink_halt_poll_ns(struct kvm_vcpu *vcpu)
 {
-	int val = vcpu->halt_poll_ns;
+	int old, val;
 
+	old = val = vcpu->halt_poll_ns;
 	if (halt_poll_ns_shrink == 0)
 		val = 0;
 	else
 		val /= halt_poll_ns_shrink;
 
 	vcpu->halt_poll_ns = val;
+	trace_kvm_halt_poll_ns_shrink(vcpu->vcpu_id, val, old);
 }
 
 static int kvm_vcpu_check_block(struct kvm_vcpu *vcpu)
-- 
1.9.1


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

* linux-next: build failure after merge of the kvm tree
@ 2015-09-08  1:35 Stephen Rothwell
  2015-09-08  2:10 ` Wanpeng Li
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2015-09-08  1:35 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, Wanpeng Li, Paolo Bonzini

Hi all,

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

arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'grow_halt_poll_ns':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1931:2: error: implicit declaration of function 'trace_kvm_halt_poll_ns_grow' [-Werror=implicit-function-declaration]
  trace_kvm_halt_poll_ns_grow(vcpu->vcpu_id, val, old);
  ^
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'shrink_halt_poll_ns':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1945:2: error: implicit declaration of function 'trace_kvm_halt_poll_ns_shrink' [-Werror=implicit-function-declaration]
  trace_kvm_halt_poll_ns_shrink(vcpu->vcpu_id, val, old);
  ^

Caused by commit

  2cbd78244fb2 ("KVM: trace kvm_halt_poll_ns grow/shrink")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

* Re: linux-next: build failure after merge of the kvm tree
  2015-05-29  7:36 Stephen Rothwell
  2015-05-29  7:54 ` Ingo Molnar
@ 2015-05-29 12:08 ` Paolo Bonzini
  1 sibling, 0 replies; 28+ messages in thread
From: Paolo Bonzini @ 2015-05-29 12:08 UTC (permalink / raw)
  To: Stephen Rothwell, Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 29/05/2015 09:36, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kvm tree, today's linux-next build (x86_64 
> allmodconfig) failed like this:
> 
> arch/x86/kvm/cpuid.c: In function 'kvm_update_cpuid': 
> arch/x86/kvm/cpuid.c:98:2: error: implicit declaration of function 
> 'use_eager_fpu' [-Werror=implicit-function-declaration] 
> vcpu->arch.eager_fpu = use_eager_fpu() || 
> guest_cpuid_has_mpx(vcpu); ^
> 
> Caused by a bad automatic merge resolution which didn't add the 
> includes of one of its parents.

Thanks; I'll wait for Ingo's 4.1 FPU changes to land, and then note
the semantic conflict in my own pull request.

Also can you please add me and kvm@vger.kernel.org to the list of
addresses that are notified about the KVM tree in linux-next?

Regards,

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVaFbHAAoJEL/70l94x66DaAEIAINFmHxlKGpajfWibnDqc4yW
AEuqFlN02JYNTUL+ZPXEpnjYT2eHnZUm+Q3BcwewnsoHcJL+KKKnHkNLlJQCpBc5
iBPPZQvMsbExEF7NsHDioPiZj1BK9IcQQOejRatEystOO9r9Mmw42L09t2M/+lUo
iIoDjpgUp/BegMqC4c3xG682k5v+jH+UIqsBUy7OWvfbTF7Eej98wUXpuuw/rfLU
1JLM9gUo7CEUWYhjH9LfymQ84pFM0iQ7sEm1VUOmxwaRJ2EqF6AueyKB2uqqgGY/
a5uYx88AVMT2wxBpMhsnM9OMkGqZ8uykWAiWhgIhX6JR6Ygk+OgC+d2sKsREQgc=
=PRiY
-----END PGP SIGNATURE-----

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

* Re: linux-next: build failure after merge of the kvm tree
  2015-05-29  7:36 Stephen Rothwell
@ 2015-05-29  7:54 ` Ingo Molnar
  2015-05-29 12:08 ` Paolo Bonzini
  1 sibling, 0 replies; 28+ messages in thread
From: Ingo Molnar @ 2015-05-29  7:54 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Marcelo Tosatti, Gleb Natapov, linux-next, linux-kernel,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the kvm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> arch/x86/kvm/cpuid.c: In function 'kvm_update_cpuid':
> arch/x86/kvm/cpuid.c:98:2: error: implicit declaration of function 'use_eager_fpu' [-Werror=implicit-function-declaration]
>   vcpu->arch.eager_fpu = use_eager_fpu() || guest_cpuid_has_mpx(vcpu);
>   ^
> 
> Caused by a bad automatic merge resolution which didn't add the
> includes of one of its parents.
> 
> I added the following merge fix patch:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 29 May 2015 17:24:42 +1000
> Subject: [PATCH] kvm: bad merge fix patch for arch/x86/kvm/cpuid.c
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/x86/kvm/cpuid.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index e243f2ed54c0..8285bc73a5a2 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -16,6 +16,8 @@
>  #include <linux/module.h>
>  #include <linux/vmalloc.h>
>  #include <linux/uaccess.h>
> +#include <asm/fpu/api.h> /* For use_eager_fpu.  Ugh! */
> +#include <asm/fpu/internal.h> /* For use_eager_fpu.  Ugh! */

The comments are incorrect, otherwise the resolution is OK.

Thanks,

	Ingo

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

* linux-next: build failure after merge of the kvm tree
@ 2015-05-29  7:36 Stephen Rothwell
  2015-05-29  7:54 ` Ingo Molnar
  2015-05-29 12:08 ` Paolo Bonzini
  0 siblings, 2 replies; 28+ messages in thread
From: Stephen Rothwell @ 2015-05-29  7:36 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Peter Zijlstra


[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

Hi all,

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

arch/x86/kvm/cpuid.c: In function 'kvm_update_cpuid':
arch/x86/kvm/cpuid.c:98:2: error: implicit declaration of function 'use_eager_fpu' [-Werror=implicit-function-declaration]
  vcpu->arch.eager_fpu = use_eager_fpu() || guest_cpuid_has_mpx(vcpu);
  ^

Caused by a bad automatic merge resolution which didn't add the
includes of one of its parents.

I added the following merge fix patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 29 May 2015 17:24:42 +1000
Subject: [PATCH] kvm: bad merge fix patch for arch/x86/kvm/cpuid.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kvm/cpuid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index e243f2ed54c0..8285bc73a5a2 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -16,6 +16,8 @@
 #include <linux/module.h>
 #include <linux/vmalloc.h>
 #include <linux/uaccess.h>
+#include <asm/fpu/api.h> /* For use_eager_fpu.  Ugh! */
+#include <asm/fpu/internal.h> /* For use_eager_fpu.  Ugh! */
 #include <asm/user.h>
 #include <asm/fpu/xstate.h>
 #include "cpuid.h"
-- 
2.1.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2014-11-24  6:19 Stephen Rothwell
@ 2014-11-24  9:38 ` Paolo Bonzini
  0 siblings, 0 replies; 28+ messages in thread
From: Paolo Bonzini @ 2014-11-24  9:38 UTC (permalink / raw)
  To: Stephen Rothwell, Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, KVM list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 24/11/2014 07:19, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kvm tree, today's linux-next build (x86_64 
> allmodconfig) failed like this:
> 
> ERROR: "get_xsave_addr" [arch/x86/kvm/kvm.ko] undefined!
> 
> Caused by commit 1d7fe1d1fb18 ("KVM: x86: support XSAVES usage in 
> the host").
> 
> I have used the kvm tree from next-20141121 for today.

Indeed this patch wasn't supposed to be pushed yet.  I will rewind
kvm/next by two commits.  Sorry.

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJUcvyjAAoJEL/70l94x66DqS0H/2KZIYQ2De2dc0xY4tV6fpPV
qHWlQADg4rPJ1Y0nx3f4y3Xbqypp+Jrh9kgc2j3QNj66jcNoE8iYvXTmaCBJx4x8
mex8eurjcP9S+wOHCiWoT/JAnK/jnmkdaxQSWSaGmAaTw+G7Zeui5KUHE/dG9QGK
MNbNJOF1Uksz6Anqd/wNyXAbZcQJAyIiz0sujnOFeZOMG6EY3N9HTYaaYf7hbmtV
q3lZJZOASAOj2+SOWsIaFP6LgcPFW5dQSMpiuZ3aH48VrISHdFnZxoFt5REWiDQZ
ct2HyERItNvjUze/e/b2jjn0KYWswYQgBH7WKUBRvLj291WAepiP8W1dxO2KmaY=
=o6gf
-----END PGP SIGNATURE-----

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

* linux-next: build failure after merge of the kvm tree
@ 2014-11-24  6:19 Stephen Rothwell
  2014-11-24  9:38 ` Paolo Bonzini
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2014-11-24  6:19 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov, Paolo Bonzini; +Cc: linux-next, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hi all,

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

ERROR: "get_xsave_addr" [arch/x86/kvm/kvm.ko] undefined!

Caused by commit 1d7fe1d1fb18 ("KVM: x86: support XSAVES usage in the
host").

I have used the kvm tree from next-20141121 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2014-08-06  4:39 Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2014-08-06  4:39 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov
  Cc: linux-next, linux-kernel, Paul Mackerras, Paolo Bonzini,
	Eric Auger, Cornelia Huck


[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

Hi all,

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


In file included from /scratch/sfr/next/include/linux/preempt.h:10:0,
                 from /scratch/sfr/next/include/linux/preempt_mask.h:4,
                 from /scratch/sfr/next/include/linux/hardirq.h:4,
                 from /scratch/sfr/next/include/linux/kvm_host.h:10,
                 from /scratch/sfr/next/arch/powerpc/kvm/../../../virt/kvm/eventfd.c:24:
/scratch/sfr/next/arch/powerpc/kvm/../../../virt/kvm/eventfd.c: In function 'kvm_irq_has_notifier':
/scratch/sfr/next/arch/powerpc/kvm/../../../virt/kvm/eventfd.c:879:38: error: 'struct kvm' has no member named 'irq_ack_notifier_list'
   hlist_for_each_entry_rcu(kian, &kvm->irq_ack_notifier_list,
                                      ^

And several more of the same ...

Caused by commit e4d57e1ee1ab ("KVM: Move irq notifier implementation
into eventfd.c").  This build does not have CONFIG_HAVE_KVM_IRQCHIP
set ...

I have used the kvm tree from next-20140805 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2014-03-11 23:55 Mark Brown
  0 siblings, 0 replies; 28+ messages in thread
From: Mark Brown @ 2014-03-11 23:55 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov; +Cc: linux-next, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Hi all,

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

/home/broonie/next/next/arch/x86/kvm/vmx.c: In function 'nested_vmx_setup_ctls_msrs':
/home/broonie/next/next/arch/x86/kvm/vmx.c:2292:2: error: implicit declaration of function 'vmx_mpx_supported' [-Werror=implicit-function-declaration]
  if (vmx_mpx_supported())
  ^
/home/broonie/next/next/arch/x86/kvm/vmx.c: At top level:
/home/broonie/next/next/arch/x86/kvm/vmx.c:7036:13: error: conflicting types for 'vmx_mpx_supported'
 static bool vmx_mpx_supported(void)
             ^
/home/broonie/next/next/arch/x86/kvm/vmx.c:2292:6: note: previous implicit declaration of 'vmx_mpx_supported' was here
  if (vmx_mpx_supported())
      ^
cc1: some warnings being treated as errors
make[3]: *** [arch/x86/kvm/vmx.o] Error 1

I have used the version from next-20140307 instead.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2014-01-10  3:00 Stephen Rothwell
@ 2014-01-17  4:03 ` Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2014-01-17  4:03 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov; +Cc: linux-next, linux-kernel, Stephen Hemminger


[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

Hi all,

On Fri, 10 Jan 2014 14:00:43 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kvm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vcpu_on_spin':
> arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1807:4: error: implicit declaration of function 'kvm_vcpu_eligible_for_directed_yield' [-Werror=implicit-function-declaration]
>     if (!kvm_vcpu_eligible_for_directed_yield(vcpu))
>     ^
> 
> Caused by commit 7940876e1330 ("kvm: make local functions static").
> 
> I have used the kvm tree from next-20140109 for today.

I am still getting this build failure.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2014-01-10  3:00 Stephen Rothwell
  2014-01-17  4:03 ` Stephen Rothwell
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2014-01-10  3:00 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov; +Cc: linux-next, linux-kernel, Stephen Hemminger


[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

Hi all,

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

arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vcpu_on_spin':
arch/powerpc/kvm/../../../virt/kvm/kvm_main.c:1807:4: error: implicit declaration of function 'kvm_vcpu_eligible_for_directed_yield' [-Werror=implicit-function-declaration]
    if (!kvm_vcpu_eligible_for_directed_yield(vcpu))
    ^

Caused by commit 7940876e1330 ("kvm: make local functions static").

I have used the kvm tree from next-20140109 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build failure after merge of the kvm tree
@ 2012-08-23  3:21 Stephen Rothwell
  0 siblings, 0 replies; 28+ messages in thread
From: Stephen Rothwell @ 2012-08-23  3:21 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-next, linux-kernel, Xiao Guangrong


[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

Hi all,

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

arch/powerpc/kvm/built-in.o: In function `.kvmppc_h_enter':
(.text+0x2494): undefined reference to `.gfn_to_hva_memslot'

Presumably caused by commit 4d8b81abc47b ("KVM: introduce readonly
memslot").

I have used the kvm tree from next-20120822 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2012-03-06  4:53 Stephen Rothwell
@ 2012-03-06 10:34 ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2012-03-06 10:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Marcelo Tosatti, linux-next, linux-kernel, Michael Ellerman

On 03/06/2012 06:53 AM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the kvm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> include/linux/kvm_host.h:813:13: error: 'kvm_vcpu_compatible' defined but not used [-Werror=unused-function]
> cc1: all warnings being treated as errors
>
> Caused by commit ab0bd7dfdaa5 ("KVM: Ensure all vcpus are consistent with
> in-kernel irqchip settings").
>
> This function presumably need to be "static inline bool" in the !
> CONFIG_KVM_APIC_ARCHITECTURE case.

Thanks for the report; fixed.

-- 
error compiling committee.c: too many arguments to function

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

* linux-next: build failure after merge of the kvm tree
@ 2012-03-06  4:53 Stephen Rothwell
  2012-03-06 10:34 ` Avi Kivity
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2012-03-06  4:53 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-next, linux-kernel, Michael Ellerman


[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

Hi all,

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

include/linux/kvm_host.h:813:13: error: 'kvm_vcpu_compatible' defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

Caused by commit ab0bd7dfdaa5 ("KVM: Ensure all vcpus are consistent with
in-kernel irqchip settings").

This function presumably need to be "static inline bool" in the !
CONFIG_KVM_APIC_ARCHITECTURE case.

I have used the kvm tree from next-20120305 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: build failure after merge of the kvm tree
  2010-08-30 10:03 ` Alexander Graf
@ 2010-08-30 10:56   ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2010-08-30 10:56 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Stephen Rothwell, Marcelo Tosatti, linux-next, linux-kernel

  On 08/30/2010 01:03 PM, Alexander Graf wrote:
> On 30.08.2010, at 03:35, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> After merging the kvm tree, today's linux-next build (powerpc
>> ppc64_defconfig) failed like this:
>>
>> arch/powerpc/kernel/asm-offsets.c: In function 'main':
>> arch/powerpc/kernel/asm-offsets.c:470: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>> arch/powerpc/kernel/asm-offsets.c:472: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>> arch/powerpc/kernel/asm-offsets.c:474: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>> arch/powerpc/kernel/asm-offsets.c:476: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>> arch/powerpc/kernel/asm-offsets.c:478: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>> arch/powerpc/kernel/asm-offsets.c:479: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
>>
>> Caused by commits 3623fdb1aa54678f73da95e797eb6e4756d4bd0e ("KVM: PPC:
>> Convert MSR to shared page") and 158a244474a6620715c626d4647fec4d61aaeee7
>> ("KVM: PPC: Generic KVM PV guest support").
>>
>> I have used the kvm tree from next-20100827 for today.
> I sent a fix out to the ML. Avi or Marcelo, could you please merge that one in quickly? The !CONFIG_KVM but CONFIG_KVM_GUEST case was the one combination I didn't try out :(.
>

Done, next linux-next should have the fix.

-- 
error compiling committee.c: too many arguments to function

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

* Re: linux-next: build failure after merge of the kvm tree
  2010-08-30  1:35 Stephen Rothwell
@ 2010-08-30 10:03 ` Alexander Graf
  2010-08-30 10:56   ` Avi Kivity
  0 siblings, 1 reply; 28+ messages in thread
From: Alexander Graf @ 2010-08-30 10:03 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Avi Kivity, Marcelo Tosatti, linux-next, linux-kernel


On 30.08.2010, at 03:35, Stephen Rothwell wrote:

> Hi all,
> 
> After merging the kvm tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> arch/powerpc/kernel/asm-offsets.c: In function 'main':
> arch/powerpc/kernel/asm-offsets.c:470: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> arch/powerpc/kernel/asm-offsets.c:472: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> arch/powerpc/kernel/asm-offsets.c:474: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> arch/powerpc/kernel/asm-offsets.c:476: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> arch/powerpc/kernel/asm-offsets.c:478: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> arch/powerpc/kernel/asm-offsets.c:479: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
> 
> Caused by commits 3623fdb1aa54678f73da95e797eb6e4756d4bd0e ("KVM: PPC:
> Convert MSR to shared page") and 158a244474a6620715c626d4647fec4d61aaeee7
> ("KVM: PPC: Generic KVM PV guest support").
> 
> I have used the kvm tree from next-20100827 for today.

I sent a fix out to the ML. Avi or Marcelo, could you please merge that one in quickly? The !CONFIG_KVM but CONFIG_KVM_GUEST case was the one combination I didn't try out :(.

Alex

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

* linux-next: build failure after merge of the kvm tree
@ 2010-08-30  1:35 Stephen Rothwell
  2010-08-30 10:03 ` Alexander Graf
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Rothwell @ 2010-08-30  1:35 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: linux-next, linux-kernel, Alexander Graf


[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

Hi all,

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

arch/powerpc/kernel/asm-offsets.c: In function 'main':
arch/powerpc/kernel/asm-offsets.c:470: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
arch/powerpc/kernel/asm-offsets.c:472: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
arch/powerpc/kernel/asm-offsets.c:474: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
arch/powerpc/kernel/asm-offsets.c:476: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
arch/powerpc/kernel/asm-offsets.c:478: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'
arch/powerpc/kernel/asm-offsets.c:479: error: invalid use of undefined type 'struct kvm_vcpu_arch_shared'

Caused by commits 3623fdb1aa54678f73da95e797eb6e4756d4bd0e ("KVM: PPC:
Convert MSR to shared page") and 158a244474a6620715c626d4647fec4d61aaeee7
("KVM: PPC: Generic KVM PV guest support").

I have used the kvm tree from next-20100827 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, back to index

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  5:57 linux-next: build failure after merge of the kvm tree Stephen Rothwell
2020-07-29  7:06 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-05-21  6:28 Stephen Rothwell
2020-06-04  2:54 ` Stephen Rothwell
2019-02-18  3:42 Stephen Rothwell
2019-02-19 15:36 ` Sean Christopherson
2019-02-19 18:17   ` Paolo Bonzini
2018-12-19  4:33 Stephen Rothwell
2017-02-08  3:23 Stephen Rothwell
2016-12-19  1:11 Stephen Rothwell
2015-09-08  1:35 Stephen Rothwell
2015-09-08  2:10 ` Wanpeng Li
2015-09-08  9:24   ` Paolo Bonzini
2015-05-29  7:36 Stephen Rothwell
2015-05-29  7:54 ` Ingo Molnar
2015-05-29 12:08 ` Paolo Bonzini
2014-11-24  6:19 Stephen Rothwell
2014-11-24  9:38 ` Paolo Bonzini
2014-08-06  4:39 Stephen Rothwell
2014-03-11 23:55 Mark Brown
2014-01-10  3:00 Stephen Rothwell
2014-01-17  4:03 ` Stephen Rothwell
2012-08-23  3:21 Stephen Rothwell
2012-03-06  4:53 Stephen Rothwell
2012-03-06 10:34 ` Avi Kivity
2010-08-30  1:35 Stephen Rothwell
2010-08-30 10:03 ` Alexander Graf
2010-08-30 10:56   ` Avi Kivity

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git