From: Joerg Roedel Date: Thu, 21 Feb 2008 14:50:14 +0000 (+0100) Subject: x86: don't print a warning when MTRR are blank and running in KVM X-Git-Tag: v2.6.25-rc4~159^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4147c8747eace9058c606b35e700060297edaf91;p=karo-tx-linux.git x86: don't print a warning when MTRR are blank and running in KVM Inside a KVM virtual machine the MTRRs are usually blank. This confuses Linux and causes a warning message at boot. This patch removes that warning message when running Linux as a KVM guest. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index c8fda3eb3d7e..be83336fddba 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "mtrr.h" u32 num_var_ranges = 0; @@ -689,8 +690,11 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) /* kvm/qemu doesn't have mtrr set right, don't trim them all */ if (!highest_pfn) { - printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n"); - WARN_ON(1); + if (!kvm_para_available()) { + printk(KERN_WARNING + "WARNING: strange, CPU MTRRs all blank?\n"); + WARN_ON(1); + } return 0; }