lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 37/37] KVM: Avoid using CONFIG_ in userspace visible headers
    Date
    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>
    ---
    arch/x86/include/asm/kvm.h | 1 +
    include/linux/kvm.h | 6 +++---
    2 files changed, 4 insertions(+), 3 deletions(-)

    diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
    index 54bcf22..dc3f6cf 100644
    --- a/arch/x86/include/asm/kvm.h
    +++ b/arch/x86/include/asm/kvm.h
    @@ -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
    diff --git a/include/linux/kvm.h b/include/linux/kvm.h
    index 7a5d73a..869462c 100644
    --- a/include/linux/kvm.h
    +++ b/include/linux/kvm.h
    @@ -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

    --
    1.6.0.6


    \
     
     \ /
      Last update: 2009-02-27 11:35    [W:7.542 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site