Re: Is BIT() in arch/x86/include/uapi/asm/kvm.h defined? Where?

From: Brooks Moses
Date: Thu May 05 2016 - 15:15:49 EST

On Thu, May 5, 2016 at 1:24 AM, Borislav Petkov <bp@xxxxxxx> wrote:
> On Wed, May 04, 2016 at 05:49:27PM -0700, Brooks Moses wrote:
>> 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:
> The below patch should help...

Thanks for the quick reply! Yes, this should fix things for us -- and
answers my implicit question of whether it was better to fix this by
avoiding the macro or whether bitops.h was expected to be exported.

> @Paulo: btw, any chance we can fix that "signifcant" typo :-) in
> KVM_CPUID_FLAG_SIGNIFCANT_INDEX or is it user-visible and cast in
> stone?

It's user-visible, but since it's been defined to something that
doesn't work in user-space, it seems unlikely to me that it has any
actual users....

- Brooks