kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix reserved bits calculation errors caused by MKTME
@ 2019-05-03 10:08 Kai Huang
  2019-05-03 10:08 ` [PATCH 1/2] kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.c Kai Huang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Kai Huang @ 2019-05-03 10:08 UTC (permalink / raw)
  To: kvm, pbonzini, rkrcmar
  Cc: sean.j.christopherson, junaids, thomas.lendacky, brijesh.singh,
	guangrong.xiao, tglx, bp, hpa, kai.huang

This series fix reserved bits related calculation errors caused by MKTME. MKTME
repurposes high bits of physical address bits as 'keyID' thus they are not
reserved bits, and to honor such HW behavior those reduced bits are taken away
from boot_cpu_data.x86_phys_bits when MKTME is detected (exactly how many bits
are taken away is configured by BIOS). Currently KVM asssumes bits from
boot_cpu_data.x86_phys_bits to 51 are reserved bits, which is not true anymore
with MKTME, and needs fix.

This series was splitted from the old patch I sent out around 2 weeks ago:

kvm: x86: Fix several SPTE mask calculation errors caused by MKTME

Changes to old patch:

  - splitted one patch into two patches. First patch is to move
    kvm_set_mmio_spte_mask() as prerequisite. It doesn't impact functionality.
    Patch 2 does the real fix.

  - renamed shadow_first_rsvd_bits to shadow_phys_bits suggested by Sean.

  - refined comments and commit msg to be more concise.

Btw sorry that I will be out next week and won't be able to reply email.

Kai Huang (2):
  kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.c
  kvm: x86: Fix reserved bits related calculation errors caused by MKTME

 arch/x86/kvm/mmu.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 arch/x86/kvm/x86.c | 31 ---------------------------
 2 files changed, 57 insertions(+), 35 deletions(-)

-- 
2.13.6


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-04 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-03 10:08 [PATCH 0/2] Fix reserved bits calculation errors caused by MKTME Kai Huang
2019-05-03 10:08 ` [PATCH 1/2] kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.c Kai Huang
2019-05-03 10:08 ` [PATCH 2/2] kvm: x86: Fix reserved bits related calculation errors caused by MKTME Kai Huang
2019-05-13  3:31 ` [PATCH 0/2] Fix reserved bits " Huang, Kai
2019-05-27  0:12   ` Kai Huang
2019-06-04 17:04 ` Paolo Bonzini

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).