From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
"Duran, Leo" <leo.duran@amd.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs prior to MTRR change.
Date: Tue, 18 Sep 2018 16:34:28 +0800 [thread overview]
Message-ID: <5349de2c-8a15-c599-f966-84b87a517453@Intel.com> (raw)
In-Reply-To: <85b907c0-1d7d-98f1-6e86-6bb3a3f86ffb@redhat.com>
On 9/18/2018 12:38 AM, Laszlo Ersek wrote:
> On 09/17/18 18:20, Duran, Leo wrote:
>>
>>> -----Original Message-----
>>> From: Ni, Ruiyu <ruiyu.ni@Intel.com>
>>> Sent: Thursday, September 13, 2018 11:44 PM
>>> To: Duran, Leo <leo.duran@amd.com>; Laszlo Ersek <lersek@redhat.com>;
>>> edk2-devel@lists.01.org
>>> Cc: Dong, Eric <eric.dong@intel.com>
>>> Subject: Re: [edk2] [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling
>>> MTRRs prior to MTRR change.
>>>
>>> On 9/14/2018 3:31 AM, Duran, Leo wrote:
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Ni, Ruiyu <ruiyu.ni@intel.com>
>>>>> Sent: Wednesday, September 12, 2018 9:39 PM
>>>>> To: Duran, Leo <leo.duran@amd.com>; Laszlo Ersek
>>> <lersek@redhat.com>;
>>>>> edk2-devel@lists.01.org
>>>>> Cc: Dong, Eric <eric.dong@intel.com>
>>>>> Subject: RE: [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling
>>>>> MTRRs prior to MTRR change.
>>>>>
>>>>> Leo,
>>>>> Sorry I was in leave yesterday so didn't see the mail.
>>>>> Which MSRs are shared? Only the
>>> MSR_IA32_MTRR_DEF_TYPE_REGISTER?
>>>>> Or all the MSRs that configures the CPU MTRR setting?
>>>>>
>>>>
>>>> Hi Ray,
>>>> The MTTR config MSRs are also shared by threads within a core.
>>>>
>>>
>>> Hi Leo,
>>> Do you think that fixing the caller is more proper?
>>
>> Hi Ray,
>> Actually,
>> The proposed PCD is the simplest solution, as that works for us and does not change the existing (default) flow.
>>
>> That is,
>> I'd prefer making a decision about the PCD in platform-specific code, rather than introducing complex detection and heuristics at the caller level in EDK2 (just for AMD).
>>
>> So, please approve the PCD.
Leo,
I agree with you on the first part "the PCD is the simplest solution".
But this really looks like a workaround of the real issue.
For a multiple-socket system, it may contain S sockets, each socket
contains C cores and each core contains T threads. In summary the system
contains S * C * T threads.
As you said all threads inside a core share the MTRR setting.
Do all cores inside a socket share the MTRR setting?
Do all sockets share the MTRR setting?
If one of the answer of above questions is "no", how can we configure
the PCD?
>
> - From my side, if it works for you, it works for me. (The general trend
> has been to avoid adding more PCDs to the "core" package DEC files, but
> I'm 100% neutral on that.)
>
> Laszlo
>
Laszlo,
Thanks for pointing out the general trend. Yes less PCDs are very
welcomed. To me, PCD is no different from protocol. And even worse,
because it's very easily to be over-used.
But I am not sure whether a PCD has to be introduced for this issue.
Maybe even we choose to fix the caller, the PCD is still needed. I am
not sure.
--
Thanks,
Ray
next prev parent reply other threads:[~2018-09-18 8:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 15:41 [PATCH] Add flag to skip disabling MTRRs Leo Duran
2018-09-11 15:41 ` [PATCH] UefiCpuPkg/MtrrLib: Add flag to skip disabling MTRRs prior to MTRR change Leo Duran
2018-09-11 18:49 ` Laszlo Ersek
2018-09-11 19:47 ` Duran, Leo
2018-09-12 9:54 ` Laszlo Ersek
2018-09-12 15:17 ` Duran, Leo
2018-09-12 17:59 ` Laszlo Ersek
2018-09-12 18:21 ` Duran, Leo
2018-09-13 2:39 ` Ni, Ruiyu
2018-09-13 19:31 ` Duran, Leo
2018-09-14 4:44 ` Ni, Ruiyu
2018-09-17 16:20 ` Duran, Leo
2018-09-17 16:38 ` Laszlo Ersek
2018-09-18 8:34 ` Ni, Ruiyu [this message]
2018-09-18 14:57 ` Duran, Leo
2018-09-19 8:58 ` Ni, Ruiyu
2018-09-21 16:52 ` Duran, Leo
2018-09-21 17:13 ` Duran, Leo
2018-09-25 14:29 ` Duran, Leo
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-list 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=5349de2c-8a15-c599-f966-84b87a517453@Intel.com \
--to=devel@edk2.groups.io \
/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