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

From: Ingo Molnar <[email-masked]>
Date: Fri, 29 May 2015 09:54:08 +0200

* Stephen Rothwell <[email-masked]> 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 <[email-masked]>
> 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 <[email-masked]>
> ---
>  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