Skip to content

Commit

Permalink
KVM: Avoid using CONFIG_ in userspace visible headers
Browse files Browse the repository at this point in the history
Kconfig symbols are not available in userspace, and are not stripped by
headers-install.  Avoid their use by adding #defines in <asm/kvm.h> to
suit each architecture.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Mar 24, 2009
1 parent 399ec80 commit 91b2ae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/x86/include/asm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define __KVM_HAVE_DEVICE_ASSIGNMENT
#define __KVM_HAVE_MSI
#define __KVM_HAVE_USER_NMI
#define __KVM_HAVE_GUEST_DEBUG

/* Architectural interrupt line count. */
#define KVM_NR_INTERRUPTS 256
Expand Down
6 changes: 3 additions & 3 deletions include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,13 @@ struct kvm_trace_rec {
#ifdef __KVM_HAVE_USER_NMI
#define KVM_CAP_USER_NMI 22
#endif
#if defined(CONFIG_X86)
#ifdef __KVM_HAVE_GUEST_DEBUG
#define KVM_CAP_SET_GUEST_DEBUG 23
#endif
#if defined(CONFIG_X86)
#ifdef __KVM_HAVE_PIT
#define KVM_CAP_REINJECT_CONTROL 24
#endif
#if defined(CONFIG_X86)||defined(CONFIG_IA64)
#ifdef __KVM_HAVE_IOAPIC
#define KVM_CAP_IRQ_ROUTING 25
#endif

Expand Down

0 comments on commit 91b2ae7

Please sign in to comment.