Skip to content

Fix reserved bits calculation errors caused by MKTME

Kai Huang kvm 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.carch/x86/kvm/mmu.c arch/x86/kvm/x86.c+31 -310 replies
2/2kvm: x86: Fix reserved bits related calculation errors caused by MKTMEarch/x86/kvm/mmu.c+28 -60 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSean Christopherson
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix reserved bits calculation errors caused by MKTME

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(-)
Signature · 1 line
2.13.6