diff options
Diffstat (limited to 'xen/arch/x86/cpu/microcode/core.c')
-rw-r--r-- | xen/arch/x86/cpu/microcode/core.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.c index ac3ceb567c..ceec1f1edc 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -608,16 +608,24 @@ static long microcode_update_helper(void *data) * that ucode revision. */ spin_lock(µcode_mutex); - if ( microcode_cache && - microcode_ops->compare_patch(patch, microcode_cache) != NEW_UCODE ) + if ( microcode_cache ) { - spin_unlock(µcode_mutex); - printk(XENLOG_WARNING "microcode: couldn't find any newer revision " - "in the provided blob!\n"); - microcode_free_patch(patch); - ret = -ENOENT; + enum microcode_match_result result; - goto put; + result = microcode_ops->compare_patch(patch, microcode_cache); + + if ( result != NEW_UCODE && + !(opt_ucode_allow_same && result == SAME_UCODE) ) + { + spin_unlock(µcode_mutex); + printk(XENLOG_WARNING + "microcode: couldn't find any newer%s revision in the provided blob!\n", + opt_ucode_allow_same ? " (or the same)" : ""); + microcode_free_patch(patch); + ret = -ENOENT; + + goto put; + } } spin_unlock(µcode_mutex); |