From: Andreas Werner <wernerandy@gmx.de>
To: Borislav Petkov <bp@alien8.de>
Cc: Ingo Molnar <mingo@kernel.org>,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] X86: MM: Add PAT Type write-through in combination with mtrr
Date: Mon, 28 Oct 2013 15:19:24 +0100 [thread overview]
Message-ID: <20131028141923.GA1426@thinkpad.fritz.box> (raw)
In-Reply-To: <20131028135847.GK4314@pd.tnic>
On Mon, Oct 28, 2013 at 02:58:47PM +0100, Borislav Petkov wrote:
> On Mon, Oct 28, 2013 at 01:03:58PM +0100, Andreas Werner wrote:
> > > That doesn't mean you can return _PAGE_CACHE_WB for MTRR_TYPE_WRTHROUGH.
> > > The correct thing to do, IMHO, would be to set the PWT bit in the PTEs
> > > of those pages comprising your buffer.
> > >
> > But why? the combination of PAT=WB and MTRR=WT is allowed isn´t it?
> > What should i return instead of?
>
> Well, since the pat code can't give you PWT, I'm thinking the cleaner
> thing would be to do it yourself. I.e., allocate a WT buffer with
> mtrr_add and then set the PWT bit of each page in that buffer.
>
> Alternatively, your solution - albeit not that correct - is a simple one
> and probably could use a good comment in the code explaining why you're
> doing that if we decide to go that way.
At the moment if you check the function in pat.c there is also UC returned
if the requested type is not WB. So that was my idea to add WT and return WB.
If i understand it right, i have to add a comment why i do that
and if that is good enough, the patch could be submitted to the kernel?
regards
Andy
>
> --
> Regards/Gruss,
> Boris.
>
> Sent from a fat crate under my desk. Formatting is fine.
> --
next prev parent reply other threads:[~2013-10-28 14:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 12:55 [PATCH] X86: MM: Add PAT Type write-through in combination with mtrr Andreas Werner
2013-10-27 13:34 ` Borislav Petkov
2013-10-27 16:51 ` Andreas Werner
2013-10-27 17:31 ` Borislav Petkov
2013-10-27 17:56 ` Andreas Werner
2013-10-27 19:01 ` Borislav Petkov
2013-10-28 6:29 ` Andreas Werner
2013-10-28 10:17 ` Ingo Molnar
2013-10-28 10:29 ` Borislav Petkov
2013-10-28 10:31 ` Ingo Molnar
2013-10-28 10:44 ` Borislav Petkov
2013-10-28 10:45 ` Andreas Werner
2013-10-28 10:51 ` Ingo Molnar
2013-10-28 10:53 ` H. Peter Anvin
2013-10-28 11:02 ` Andreas Werner
2013-10-28 10:31 ` H. Peter Anvin
2013-10-28 10:34 ` Andreas Werner
2013-10-28 10:57 ` Borislav Petkov
2013-10-28 11:25 ` Andreas Werner
2013-10-28 11:45 ` Borislav Petkov
2013-10-28 12:03 ` Andreas Werner
2013-10-28 13:58 ` Borislav Petkov
2013-10-28 14:19 ` Andreas Werner [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-25 7:01 Andreas Werner
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=20131028141923.GA1426@thinkpad.fritz.box \
--to=wernerandy@gmx.de \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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).