[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1009281818490.2864@kaball-desktop>
Date: Tue, 28 Sep 2010 18:19:37 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
CC: Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@...rix.com>,
"sct@...hat.com" <sct@...hat.com>
Subject: Re: [PATCH 12/12] xen/mtrr: Add mtrr_if support for Xen mtrr
On Tue, 28 Sep 2010, Jeremy Fitzhardinge wrote:
> On 09/28/2010 07:00 AM, Stefano Stabellini wrote:
> > On Tue, 28 Sep 2010, Ingo Molnar wrote:
> >> * stefano.stabellini@...citrix.com <stefano.stabellini@...citrix.com> wrote:
> >>
> >>> From: Stephen Tweedie <sct@...hat.com>
> >>>
> >>> Add a Xen mtrr type, and reorganise mtrr initialisation slightly to
> >>> allow the mtrr driver to set up num_var_ranges (Xen needs to do this by
> >>> querying the hypervisor itself.)
> >>>
> >>> [ Impact: add basic MTRR support ]
> >>>
> >>> Signed-off-by: Stephen Tweedie <sct@...hat.com>
> >>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> >>> Signed-off-by: Stefano Stabellini <stefano.stabellini@...citrix.com>
> >>> ---
> >>> arch/x86/kernel/cpu/mtrr/Makefile | 2 +-
> >>> arch/x86/kernel/cpu/mtrr/main.c | 3 +
> >>> arch/x86/kernel/cpu/mtrr/mtrr.h | 7 ++
> >>> arch/x86/kernel/cpu/mtrr/xen.c | 110 +++++++++++++++++++++++++++++++++++++
> >>> 4 files changed, 121 insertions(+), 1 deletions(-)
> >>> create mode 100644 arch/x86/kernel/cpu/mtrr/xen.c
> >> Still NAK, for the very same reasons as we NAK-ed it the previous time:
> >> /proc/mtrr is a problematic and complicated legacy interface that should
> >> die. Any modern X server will do the right thing via PAT.
> >>
> > Sorry I should have read the original thread more carefully: I didn't
> > realize this patch had been NAK-ed.
> >
> > However it is not a problem because we can easily disable MTRRs from Xen
> > and with no cpu_has_mtrr the kernel would still boot fine on Xen.
> > Also I think we do have PAT support nowadays but I'll let Jeremy comment
> > on that.
>
> Yes, we could just mask out the MTRR CPU feature and rely entirely on PAT.
>
> The alternative would be to use the wrmsr hooks to emulate the Intel
> MTRR registers by mapping them to hypercalls, but that seems needlessly
> complex.
Yeah, I have already tested a prototype patch to xen to mask the MTRR
cpu features and everything seems to run fine on my testbox.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists