From: "Joerg Roedel" <joerg.roedel@amd.com>
To: tglx@linutronix.de, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, "Joerg Roedel" <joerg.roedel@amd.com>
Subject: [PATCH] X86: don't print a warning when MTRR are blank and running in KVM
Date: Thu, 21 Feb 2008 15:50:14 +0100 [thread overview]
Message-ID: <1203605414-4958-1-git-send-email-joerg.roedel@amd.com> (raw)
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 <joerg.roedel@amd.com>
---
arch/x86/kernel/cpu/mtrr/main.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index b6e136f..47e624c 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -43,6 +43,7 @@
#include <asm/uaccess.h>
#include <asm/processor.h>
#include <asm/msr.h>
+#include <asm/kvm_para.h>
#include "mtrr.h"
u32 num_var_ranges = 0;
@@ -687,12 +688,14 @@ 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) {
+ if (!highest_pfn && !kvm_para_available()) {
printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n");
WARN_ON(1);
- return 0;
}
+ if (!highest_pfn)
+ return 0;
+
if (highest_pfn < end_pfn) {
printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
" all of memory, losing %luMB of RAM.\n",
--
1.5.3.7
next reply other threads:[~2008-02-21 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 14:50 Joerg Roedel [this message]
2008-02-21 19:54 ` Yinghai Lu
2008-02-22 11:18 ` Joerg Roedel
2008-02-21 20:37 ` Ingo Molnar
2008-02-21 22:31 ` H. Peter Anvin
2008-02-22 9:45 ` Ingo Molnar
2008-02-22 9:58 ` H. Peter Anvin
2008-02-22 10:00 ` Ingo Molnar
2008-02-22 10:04 ` H. Peter Anvin
2008-02-22 11:15 ` Joerg Roedel
2008-02-22 12:48 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203605414-4958-1-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®