From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Jeremy Fitzhardinge" <jeremy@goop.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, "Ingo Molnar" <mingo@elte.hu>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: trim ram need to check if mtrr is there v2
Date: Fri, 25 Jan 2008 00:39:25 -0800 [thread overview]
Message-ID: <86802c440801250039m3db374em458b1f15c8a71ad5@mail.gmail.com> (raw)
In-Reply-To: <86802c440801250013p1a35b126l30fb7479b110e97d@mail.gmail.com>
On Jan 25, 2008 12:13 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>
> On Jan 24, 2008 11:43 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> >
> > Yinghai Lu wrote:
> > > [PATCH] x86: trim ram need to check if mtrr is there v2
> > >
> > >
> > >>> Jeremy Fitzhardinge wrote:
> > >>> When booting a current x86.git kernel under kvm, I get this:
> > >>>
> > >>> (qemu) Linux version 2.6.24-rc8 (jeremy@ezr) (gcc version 4.1.2 20070925
> > >>> (Red Hat 4.1.2-33)) #1928 SMP PREEMPT Thu Jan 24 17:09:04 PST 2008
> > >>> early_ioremap_init()
> > >>> BIOS-provided physical RAM map:
> > >>> BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
> > >>> BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
> > >>> BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
> > >>> BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
> > >>> BIOS-e820: 000000001fff0000 - 0000000020000000 (ACPI data)
> > >>> BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
> > >>> console [earlyser0] enabled
> > >>> 0MB HIGHMEM available.
> > >>> 511MB LOWMEM available.
> > >>> Scan SMP from c0000000 for 1024 bytes.
> > >>> Scan SMP from c009fc00 for 1024 bytes.
> > >>> Scan SMP from c00f0000 for 65536 bytes.
> > >>> Scan SMP from c009fc00 for 1024 bytes.
> > >>> ***************
> > >>> **** WARNING: likely BIOS bug
> > >>> **** MTRRs don't cover all of memory, trimmed 131056 pages
> > >>> ***************
> > >>>
> > >> H. Peter Anvin wrote:
> > >> Looks like the code doesn't check that the CPU *has* MTRRs...
> > >>
> > >
> > > so check it mtrr is there, also check if mem less 4G and is AMD as early
> > >
> >
> > Thanks, this gets me to usermode under kvm.
>
> i think the is 0xffffffff to 0xffffffffUL make the difference.
>
> the cpu mode in KVM/qemu may cpu_has_mtrr, but doesn't really have
> return mtrr msr with correct value.
>
> is_cpu(INTEL) already make sure we have mtrr_if got assigned and cpu_has_mtrr.
>
> may need to fix qemu instead...
>
> Can you try post /proc/mtrr for your guest in kvm/qemu?
jeremy,
can you try v3 patch?
Thanks
YH
next prev parent reply other threads:[~2008-01-25 8:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 1:44 x86.git: mtrr trimming removes all memory under kvm Jeremy Fitzhardinge
2008-01-25 1:49 ` H. Peter Anvin
2008-01-25 2:21 ` Yinghai Lu
2008-01-25 2:32 ` Yinghai Lu
2008-01-25 10:52 ` Andi Kleen
2008-01-25 3:47 ` [PATCH] x86: trim ram need to check if mtrr is there v2 Yinghai Lu
2008-01-25 5:44 ` H. Peter Anvin
2008-01-25 7:50 ` Yinghai Lu
2008-01-25 7:43 ` Jeremy Fitzhardinge
2008-01-25 8:13 ` Yinghai Lu
2008-01-25 8:39 ` Yinghai Lu [this message]
2008-01-25 11:12 ` Ingo Molnar
2008-01-25 15:47 ` H. Peter Anvin
2008-01-25 8:42 ` [PATCH] x86: trim ram need to check if mtrr is there v3 Yinghai Lu
2008-01-25 11:09 ` Ingo Molnar
2008-01-25 18:55 ` Jeremy Fitzhardinge
2008-01-25 18:59 ` Ingo Molnar
2008-01-25 19:01 ` Jeremy Fitzhardinge
2008-01-25 19:04 ` Ingo Molnar
2008-01-25 19:27 ` Jeremy Fitzhardinge
2008-01-25 19:30 ` Ingo Molnar
2008-01-25 19:32 ` Yinghai Lu
2008-01-25 19:39 ` Jeremy Fitzhardinge
2008-01-25 19:19 ` Yinghai Lu
2008-01-25 19:04 ` Jeremy Fitzhardinge
2008-01-25 18:59 ` Jeremy Fitzhardinge
2008-01-25 19:02 ` Ingo Molnar
2008-01-25 14:21 ` Ingo Molnar
2008-01-25 14:57 ` Andi Kleen
2008-01-25 15:10 ` Ingo Molnar
2008-01-25 15:57 ` H. Peter Anvin
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=86802c440801250039m3db374em458b1f15c8a71ad5@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
Powered by JetHome