public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: stefan.bader@canonical.com, toshi.kani@hp.com, x86@kernel.org,
	ville.syrjala@linux.intel.com,
	xen-devel <xen-devel@lists.xenproject.org>,
	konrad.wilk@oracle.com, linux-kernel@vger.kernel.org,
	hpa@zytor.com
Subject: Re: [Xen-devel] [PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables
Date: Mon, 25 Aug 2014 14:22:35 +0200	[thread overview]
Message-ID: <53FB2A8B.1040500@suse.com> (raw)
In-Reply-To: <53F72A46020000780002C957@mail.emea.novell.com>

On 08/22/2014 11:32 AM, Jan Beulich wrote:
>>>> On 19.08.14 at 15:25, <JGross@suse.com> wrote:
>> @@ -118,8 +167,14 @@ void pat_init(void)
>>   	      PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC);
>>
>>   	/* Boot CPU check */
>> -	if (!boot_pat_state)
>> +	if (!boot_pat_state) {
>>   		rdmsrl(MSR_IA32_CR_PAT, boot_pat_state);
>> +		/*
>> +		 * Init cache mode tables before writing MSR to give Xen a
>> +		 * chance to correct the changes when doing the write.
>> +		 */
>
> This comment seems pretty odd to me: For one, a PV guest on Xen
> shouldn't be trying to write PAT MSR at all under the current ABI
> (the write will be ignored, yes, but accompanied with a warning
> message, which PV kernels - by the mere fact that they're PV -
> should try to avoid). And then "correct the changes" both gives
> the impression as if they were wrong and as if some of what the
> kernel writes may be under the kernel's control. Hence I think this
> code and comment should either be consistently assuming that the
> kernel has no control at all, or should read back the value after
> having written it, and set the internal tables based on the value
> read back.

I think the latter alternative is the better one. I'll change the
patch.

Juergen


  reply	other threads:[~2014-08-25 12:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 13:25 [PATCH RFC 0/3] x86: Full support of PAT jgross
2014-08-19 13:25 ` [PATCH RFC 1/3] x86: Make page cache mode a real type jgross
2014-08-20 19:26   ` Toshi Kani
2014-08-21  9:30     ` [Xen-devel] " Juergen Gross
2014-08-22  9:24       ` Jan Beulich
2014-08-22 17:43         ` Toshi Kani
2014-08-21 22:09   ` Toshi Kani
2014-08-22  5:25     ` Juergen Gross
2014-08-19 13:25 ` [PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables jgross
2014-08-22  9:32   ` [Xen-devel] " Jan Beulich
2014-08-25 12:22     ` Juergen Gross [this message]
2014-08-19 13:25 ` [PATCH RFC 3/3] Support Xen pv-domains using PAT jgross
2014-08-20 12:05 ` [PATCH RFC 0/3] x86: Full support of PAT One Thousand Gnomes
2014-08-20 12:21   ` [Xen-devel] " Jan Beulich
2014-08-20 22:00     ` H. Peter Anvin
2014-08-20 12:35   ` Juergen Gross
2014-08-20 21:59   ` 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=53FB2A8B.1040500@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.bader@canonical.com \
    --cc=toshi.kani@hp.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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