All of lore.kernel.org
 help / color / mirror / Atom feed
* Is BIT() in arch/x86/include/uapi/asm/kvm.h defined? Where?
@ 2016-05-05  0:49 Brooks Moses
  2016-05-05  8:24 ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: Brooks Moses @ 2016-05-05  0:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ian Kasprzak, Paolo Bonzini, Borislav Petkov

Hello!

Ian and I have run into what looks like a bug in
arch/x86/include/uapi/asm/kvm.h, but it also looks so obvious that we
surely must be doing something wrong.  So I request enlightenment.

We discovered this problem on the 4.5.2 release, but the relevant code
appears unchanged from 2013 until current trunk.

When I run "make ARCH=x86 headers_install", and then write a simple C
file that #includes "asm/kvm.h" from the resulting tree, I get a
compiler error: the BIT() macro used on line 219 of that file is
undefined:
https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/kvm.h#L219

I attempted to find where it was supposed to be defined, and the only
match for "define BIT(" in the whole tree is in
include/linux/bitops.h:
https://github.com/torvalds/linux/blob/master/include/linux/bitops.h#L6

However, that's not in a "uapi" directory, and it's not listed in
include/uapi/linux/Kbuild, so "make headers_install" doesn't install
it.  Further, kvm.h doesn't reference it with a #include, so even if
it were installed, it wouldn't be included.

It seems that we must be missing something obvious.  But what?

Thanks,
- Brooks


P.S. The change that appears to have added this reference is this
one, signed-off-on by Borislav and Paolo, which is why I've added you
to the cc line.
https://github.com/torvalds/linux/commit/9c15bb1d0a8411f9bb3395d21d5309bde7da0c1c

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

end of thread, other threads:[~2016-05-09 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05  0:49 Is BIT() in arch/x86/include/uapi/asm/kvm.h defined? Where? Brooks Moses
2016-05-05  8:24 ` Borislav Petkov
2016-05-05 19:15   ` Brooks Moses
2016-05-09 14:00   ` Paolo Bonzini
2016-05-09 14:47     ` Radim Krčmář
2016-05-09 15:15       ` Paolo Bonzini
2016-05-09 15:25         ` Radim Krčmář
2016-05-09 15:46           ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.