linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Tom Lendacky <thomas.lendacky@amd.com>
Cc: Dave Hansen <dave.hansen@intel.com>,
	Kai Huang <kai.huang@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 1/2] x86/mm: Fix comment in detect_tme() regarding x86_phys_bits
Date: Thu, 15 Mar 2018 16:49:06 +0300	[thread overview]
Message-ID: <20180315134907.9311-2-kirill.shutemov@linux.intel.com> (raw)
In-Reply-To: <20180315134907.9311-1-kirill.shutemov@linux.intel.com>

As Kai pointed, we adjust x86_phys_bits not only to communicate
available physical address space to virtual machines, but mainly to
reflect the fact that the address space is reduced.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggested-by: Kai Huang <kai.huang@linux.intel.com>
---
 arch/x86/kernel/cpu/intel.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index f0481b85c39d..fd379358c58d 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -619,11 +619,8 @@ static void detect_tme(struct cpuinfo_x86 *c)
 #endif
 
 	/*
-	 * Exclude KeyID bits from physical address bits.
-	 *
-	 * We have to do this even if we are not going to use KeyID bits
-	 * ourself. VM guests still have to know that these bits are not usable
-	 * for physical address.
+	 * KeyID bits effectively lower number of physical address bits.
+	 * Let's update cpuinfo_x86::x86_phys_bits to reflect the fact.
 	 */
 	c->x86_phys_bits -= keyid_bits;
 }
-- 
2.16.1

  reply	other threads:[~2018-03-15 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 13:49 [PATCH 0/2] x86/mm: Fix couple MKTME-related issues Kirill A. Shutemov
2018-03-15 13:49 ` Kirill A. Shutemov [this message]
2018-03-27  9:55   ` [tip:x86/mm] x86/mm: Update comment in detect_tme() regarding x86_phys_bits tip-bot for Kirill A. Shutemov
2018-03-15 13:49 ` [PATCH 2/2] x86/mm: Do not lose cpuinfo_x86:x86_phys_bits adjustment Kirill A. Shutemov
2018-03-27  9:23   ` Thomas Gleixner
2018-03-27 12:15     ` [PATCHv2] x86/mm: Do not lose cpuinfo_x86::x86_phys_bits adjustment Kirill A. Shutemov

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=20180315134907.9311-2-kirill.shutemov@linux.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=kai.huang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.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).