lkml.org 
[lkml]   [2010]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] xen/microcode: partially enable even for non-privileged kernels
    Date
    From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

    Don't attempt to load microcode on non-privileged kernels. Kernels
    compiled without privileged support just get vestigial Xen detection
    to skip loading altogether; kernels with privileged support will
    load microcode if running privileged. In either case, the normal
    Intel/AMD microcode loader is skipped under Xen.

    Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    ---
    arch/x86/include/asm/microcode.h | 2 +-
    arch/x86/kernel/Makefile | 2 +-
    arch/x86/xen/Kconfig | 6 +++++-
    3 files changed, 7 insertions(+), 3 deletions(-)

    diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
    index e15fca1..3e61afe 100644
    --- a/arch/x86/include/asm/microcode.h
    +++ b/arch/x86/include/asm/microcode.h
    @@ -55,7 +55,7 @@ static inline struct microcode_ops * __init init_amd_microcode(void)
    }
    #endif

    -#ifdef CONFIG_MICROCODE_XEN
    +#ifdef CONFIG_MICROCODE_XEN_LOADER
    extern struct microcode_ops * __init init_xen_microcode(void);
    #else
    static inline struct microcode_ops * __init init_xen_microcode(void)
    diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
    index 0036150..768c5dc 100644
    --- a/arch/x86/kernel/Makefile
    +++ b/arch/x86/kernel/Makefile
    @@ -104,7 +104,7 @@ obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o
    microcode-y := microcode_core.o
    microcode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o
    microcode-$(CONFIG_MICROCODE_AMD) += microcode_amd.o
    -microcode-$(CONFIG_MICROCODE_XEN) += microcode_xen.o
    +microcode-$(CONFIG_MICROCODE_XEN_LOADER) += microcode_xen.o
    obj-$(CONFIG_MICROCODE) += microcode.o

    obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
    diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
    index 384e0a5..9a0d2fc 100644
    --- a/arch/x86/xen/Kconfig
    +++ b/arch/x86/xen/Kconfig
    @@ -51,4 +51,8 @@ config XEN_DEBUG_FS

    config MICROCODE_XEN
    def_bool y
    - depends on XEN_DOM0 && MICROCODE
    \ No newline at end of file
    + depends on XEN && MICROCODE
    +
    +config MICROCODE_XEN_LOADER
    + def_bool y
    + depends on MICROCODE_XEN && DOM0
    --
    1.7.2.3


    \
     
     \ /
      Last update: 2010-11-12 01:01    [W:0.043 / U:0.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site