kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kvm: x86-32 fails to link with tdp_mmu
@ 2020-10-24  2:13 Daniel Díaz
  2020-10-24  2:17 ` Sean Christopherson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Díaz @ 2020-10-24  2:13 UTC (permalink / raw)
  To: Ben Gardon
  Cc: Paolo Bonzini, Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li,
	Jim Mattson, Joerg Roedel, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, X86 ML, H. Peter Anvin, kvm list, open list

Hello!

We found the following problem building torvalds/master, which
recently merged the for-linus tag from the KVM tree, when building
with gcc 7.3.0 and glibc 2.27 for x86 32-bits under OpenEmbedded:

|   LD      vmlinux.o
|   MODPOST vmlinux.symvers
|   MODINFO modules.builtin.modinfo
|   GEN     modules.builtin
|   LD      .tmp_vmlinux.kallsyms1
| arch/x86/kvm/mmu/tdp_mmu.o: In function `__handle_changed_spte':
| tdp_mmu.c:(.text+0x78a): undefined reference to `__umoddi3'
| /srv/oe/build/tmp-lkft-glibc/work-shared/intel-core2-32/kernel-source/Makefile:1164:
recipe for target 'vmlinux' failed
| make[1]: *** [vmlinux] Error 1
| /srv/oe/build/tmp-lkft-glibc/work-shared/intel-core2-32/kernel-source/Makefile:185:
recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2

This builds fine for x86 (64 bits) and arm (32/64 bits) with the same
toolchain. This also builds correctly (outside OpenEmbedded) with
gcc-8, gcc-9 and gcc-10 for: x86 (32/64 bits), arm (32/64 bits), MIPS,
and RISCV; and gcc-8 and gcc-9 for ARC.

We first noticed this when 0adc313c4f20 was pushed, but reverting
f9a705ad1c07 ("Merge tag 'for-linus' of
git://git.kernel.org/pub/scm/virt/kvm/kvm") brought it back into
building.

A follow-up bisection led to faaf05b00aec ("kvm: x86/mmu: Support
zapping SPTEs in the TDP MMU"). In that commit, the problematic code
was:

        handle_changed_spte(kvm, as_id, iter->gfn, iter->old_spte, new_spte,
                            iter->level);

which was later changed by f8e144971c68 ("kvm: x86/mmu: Add access
tracking for tdp_mmu") to:

        __handle_changed_spte(kvm, as_id, iter->gfn, iter->old_spte, new_spte,
                              iter->level);

Greetings!

Daniel Díaz
daniel.diaz@linaro.org

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

* Re: kvm: x86-32 fails to link with tdp_mmu
  2020-10-24  2:13 kvm: x86-32 fails to link with tdp_mmu Daniel Díaz
@ 2020-10-24  2:17 ` Sean Christopherson
  2020-10-24  3:04   ` Sean Christopherson
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Christopherson @ 2020-10-24  2:17 UTC (permalink / raw)
  To: Daniel Díaz
  Cc: Ben Gardon, Paolo Bonzini, Vitaly Kuznetsov, Wanpeng Li,
	Jim Mattson, Joerg Roedel, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, X86 ML, H. Peter Anvin, kvm list, open list

On Fri, Oct 23, 2020 at 09:13:21PM -0500, Daniel Díaz wrote:
> Hello!
> 
> We found the following problem building torvalds/master, which
> recently merged the for-linus tag from the KVM tree, when building
> with gcc 7.3.0 and glibc 2.27 for x86 32-bits under OpenEmbedded:
> 
> |   LD      vmlinux.o
> |   MODPOST vmlinux.symvers
> |   MODINFO modules.builtin.modinfo
> |   GEN     modules.builtin
> |   LD      .tmp_vmlinux.kallsyms1
> | arch/x86/kvm/mmu/tdp_mmu.o: In function `__handle_changed_spte':
> | tdp_mmu.c:(.text+0x78a): undefined reference to `__umoddi3'

The problem is a % on a 64-bit value.  Patches incoming, there's also a goof
in similar code that was tweaked last minute to avoid the %.

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

* Re: kvm: x86-32 fails to link with tdp_mmu
  2020-10-24  2:17 ` Sean Christopherson
@ 2020-10-24  3:04   ` Sean Christopherson
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-10-24  3:04 UTC (permalink / raw)
  To: Daniel Díaz
  Cc: Ben Gardon, Paolo Bonzini, Vitaly Kuznetsov, Wanpeng Li,
	Jim Mattson, Joerg Roedel, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, X86 ML, H. Peter Anvin, kvm list, open list

On Fri, Oct 23, 2020 at 07:17:54PM -0700, Sean Christopherson wrote:
> On Fri, Oct 23, 2020 at 09:13:21PM -0500, Daniel Díaz wrote:
> > Hello!
> > 
> > We found the following problem building torvalds/master, which
> > recently merged the for-linus tag from the KVM tree, when building
> > with gcc 7.3.0 and glibc 2.27 for x86 32-bits under OpenEmbedded:
> > 
> > |   LD      vmlinux.o
> > |   MODPOST vmlinux.symvers
> > |   MODINFO modules.builtin.modinfo
> > |   GEN     modules.builtin
> > |   LD      .tmp_vmlinux.kallsyms1
> > | arch/x86/kvm/mmu/tdp_mmu.o: In function `__handle_changed_spte':
> > | tdp_mmu.c:(.text+0x78a): undefined reference to `__umoddi3'
> 
> The problem is a % on a 64-bit value.  Patches incoming, there's also a goof
> in similar code that was tweaked last minute to avoid the %.

Just the one patch actually, I misread some cleverness.  Patch still inbound...

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

end of thread, other threads:[~2020-10-24  3:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24  2:13 kvm: x86-32 fails to link with tdp_mmu Daniel Díaz
2020-10-24  2:17 ` Sean Christopherson
2020-10-24  3:04   ` 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).