linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kani, Toshi" <toshi.kani@hpe.com>
To: "isaku.yamahata@gmail.com" <isaku.yamahata@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"fei1.li@intel.com" <fei1.li@intel.com>,
	"bp@alien8.de" <bp@alien8.de>, "x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 0/3] x86/mtrr, pat: make PAT independent from MTRR
Date: Tue, 13 Aug 2019 15:07:24 +0000	[thread overview]
Message-ID: <dd7663d11e02923240f28f1e6f71fb878750ee70.camel@hpe.com> (raw)
In-Reply-To: <20190813074920.GA24196@private.email.ne.jp>

On Tue, 2019-08-13 at 00:49 -0700, Isaku Yamahata wrote:
> On Fri, Aug 09, 2019 at 07:51:17PM +0000,
> "Kani, Toshi" <toshi.kani@hpe.com> wrote:
> 
> > On Fri, 2019-08-09 at 09:06 +0200, Borislav Petkov wrote:
> > > On Thu, Aug 08, 2019 at 08:54:17PM -0700, Isaku Yamahata wrote:
> > > > Make PAT(Page Attribute Table) independent from
> > > > MTRR(Memory Type Range Register).
> > > > Some environments (mainly virtual ones) support only PAT, but not MTRR
> > > > because PAT replaces MTRR.
> > > > It's tricky and no gain to support both MTRR and PAT except compatibility.
> > > > So some VM technologies don't support MTRR, but only PAT.
> > 
> > I do not think it is technically correct on bare metal.  AFAIK, MTRR is
> > still the only way to setup cache attribute in real-mode, which BIOS SMI
> > handler relies on in SMM.
> 
> Then you're claiming if it's baremetal, both MTRR and PAT should be
> enabled/disabled at the same time?

No, I did not say that. My point:
- Your statement of MTTR being useless is not correct. It's still used.
The OS should leave the MTTR hand-off state.

I agree with you in general that PAT and MTTR init should be
independent. However, as Boris said, please verify the impact of your
change. As I mentioned in the Xen's example, hypervisor may have non-
default PAT hand-off setting.

Thanks,
-Toshi


      parent reply	other threads:[~2019-08-13 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  3:54 [PATCH 0/3] x86/mtrr, pat: make PAT independent from MTRR Isaku Yamahata
2019-08-09  3:54 ` [PATCH 1/3] x86/mtrr: split common funcs from mtrr.c Isaku Yamahata
2019-08-09  3:54 ` [PATCH 2/3] x86/mtrr: split common funcs from generic.c Isaku Yamahata
2019-08-09  3:54 ` [PATCH 3/3] x86/mtrr, pat: make PAT independent from MTRR Isaku Yamahata
2019-08-09  7:06 ` [PATCH 0/3] " Borislav Petkov
2019-08-09 19:51   ` Kani, Toshi
2019-08-13  7:49     ` Isaku Yamahata
2019-08-13  8:04       ` Borislav Petkov
2019-08-13 15:07       ` Kani, Toshi [this message]

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=dd7663d11e02923240f28f1e6f71fb878750ee70.camel@hpe.com \
    --to=toshi.kani@hpe.com \
    --cc=bp@alien8.de \
    --cc=fei1.li@intel.com \
    --cc=isaku.yamahata@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).