From: Isaku Yamahata <isaku.yamahata@gmail.com>
To: "Kani, Toshi" <toshi.kani@hpe.com>
Cc: "isaku.yamahata@gmail.com" <isaku.yamahata@gmail.com>,
"bp@alien8.de" <bp@alien8.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"fei1.li@intel.com" <fei1.li@intel.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 0/3] x86/mtrr, pat: make PAT independent from MTRR
Date: Tue, 13 Aug 2019 00:49:20 -0700 [thread overview]
Message-ID: <20190813074920.GA24196@private.email.ne.jp> (raw)
In-Reply-To: <3355d77da5e094ad1d3149b9236cdd204486fd69.camel@hpe.com>
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?
> > > This patch series makes PAT available on such environments without MTRR.
> >
> > And this "justification" is not even trying. Which "VM technologies" are
> > those? Why do we care? What's the impact? Why do we want this?
> >
> > You need to sell this properly.
>
> Agreed. If the situation is still the same, Xen does not support MTRR,
> and the kernel sets the PAT table to the BIOS hand-off state when MTRR
> is disabled. The change below accommodated the fact that Xen hypervisor
> enables WC before hand-off, which is different from the default BIOS
> hand-off state. The kernel does not support setting PAT when MTRR is
> disabled due to the dependency Isaku mentioned.
>
>
> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1107094.html
Thanks for supplement.
In addition to Xen, KVM+qemu can enable/disable MTRR, PAT independently.
So user may want to disable MTRR to reduce attack surface.
ACRN doesn't support MTRR.
Let me include those description for next respin.
--
Isaku Yamahata <isaku.yamahata@gmail.com>
next prev parent reply other threads:[~2019-08-13 7:49 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 [this message]
2019-08-13 8:04 ` Borislav Petkov
2019-08-13 15:07 ` Kani, Toshi
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=20190813074920.GA24196@private.email.ne.jp \
--to=isaku.yamahata@gmail.com \
--cc=bp@alien8.de \
--cc=fei1.li@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=toshi.kani@hpe.com \
--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).