Commit 4147c874 authored by Joerg Roedel's avatar Joerg Roedel Committed by Ingo Molnar

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5d119b2c
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/kvm_para.h>
#include "mtrr.h" #include "mtrr.h"
u32 num_var_ranges = 0; u32 num_var_ranges = 0;
...@@ -689,8 +690,11 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) ...@@ -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 */ /* kvm/qemu doesn't have mtrr set right, don't trim them all */
if (!highest_pfn) { if (!highest_pfn) {
printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n"); if (!kvm_para_available()) {
WARN_ON(1); printk(KERN_WARNING
"WARNING: strange, CPU MTRRs all blank?\n");
WARN_ON(1);
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment