From: Yu Zhang <yu.c.zhang@linux.intel.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, pbonzini@redhat.com,
rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, xiaoguangrong@tencent.com, joro@8bytes.org
Subject: [PATCH v2 0/5] KVM: MMU: 5 level EPT/shadow support
Date: Fri, 18 Aug 2017 03:52:33 +0800 [thread overview]
Message-ID: <1502999558-2517-1-git-send-email-yu.c.zhang@linux.intel.com> (raw)
Intel's existing processors limit the maximum linear address width to
48 bits, and the maximum physical address width to 46 bits. And the
upcoming processors will extend maximum linear address width to 57 bits
and maximum physical address width can go upto 52 bits in practical.
With linear address width greater than 48, a new paging mode in IA-32e
is introduced - 5 level paging(also known as LA57). And to support VMs
with this feature, KVM MMU code need to be extended.
And to achieve this, this patchset:
1> leverages 2 qemu parameters: +la57 and phys-bits to expose wider linear
address width and physical address width to the VM;
2> extends shadow logic to construct 5 level shadow page for VMs running
in LA57 mode;
3> extends ept logic to construct 5 level ept table for VMs whose maximum
physical width exceeds 48 bits.
Changes in v2:
- Address comments from Paolo Bonzini and Jim Mattson: add a new patch to let
kvm_cpuid() return false when cpuid entry is not found;
- Address comments from Paolo Bonzini: fix a typo in check_cr_write() and use
62 as the upper limit when checking reserved bits for a physical address;
- Address comments from Paolo Bonzini: move definition of PT64_ROOT_MAX_LEVEL
into kvm_host.h;
- Address comments from Paolo Bonzini: add checking for shadow_root_level in
mmu_free_roots();
- Address comments from Paolo Bonzini: set root_level & shadow_root_level both
to PT64_ROOT_4LEVEL for shadow ept situation.
Yu Zhang (5):
KVM: x86: Add return value to kvm_cpuid().
KVM: MMU: check guest CR3 reserved bits based on its physical address
width.
KVM: MMU: Rename PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL.
KVM: MMU: Add 5 level EPT & Shadow page table support.
KVM: MMU: Expose the LA57 feature to VM.
arch/x86/include/asm/kvm_emulate.h | 4 +--
arch/x86/include/asm/kvm_host.h | 31 ++++++--------------
arch/x86/include/asm/vmx.h | 1 +
arch/x86/kvm/cpuid.c | 39 ++++++++++++++++++-------
arch/x86/kvm/cpuid.h | 9 +++++-
arch/x86/kvm/emulate.c | 42 +++++++++++++++++----------
arch/x86/kvm/kvm_cache_regs.h | 2 +-
arch/x86/kvm/mmu.c | 59 ++++++++++++++++++++++++--------------
arch/x86/kvm/mmu.h | 6 +++-
arch/x86/kvm/mmu_audit.c | 4 +--
arch/x86/kvm/svm.c | 8 +++---
arch/x86/kvm/trace.h | 11 ++++---
arch/x86/kvm/vmx.c | 27 ++++++++++-------
arch/x86/kvm/x86.c | 21 ++++++++------
arch/x86/kvm/x86.h | 44 ++++++++++++++++++++++++++++
15 files changed, 205 insertions(+), 103 deletions(-)
--
2.5.0
next reply other threads:[~2017-08-17 11:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 19:52 Yu Zhang [this message]
2017-08-17 19:52 ` [PATCH v2 1/5] KVM: x86: Add return value to kvm_cpuid() Yu Zhang
2017-08-17 12:29 ` Paolo Bonzini
2017-08-17 12:23 ` Yu Zhang
2017-08-17 12:33 ` Yu Zhang
2017-08-17 13:18 ` Paolo Bonzini
2017-08-17 13:17 ` Paolo Bonzini
2017-08-17 13:20 ` Yu Zhang
2017-08-17 14:29 ` Paolo Bonzini
2017-08-17 19:52 ` [PATCH v2 2/5] KVM: MMU: check guest CR3 reserved bits based on its physical address width Yu Zhang
2017-08-17 12:31 ` Paolo Bonzini
2017-08-17 12:25 ` Yu Zhang
2017-08-17 19:52 ` [PATCH v2 3/5] KVM: MMU: Rename PT64_ROOT_LEVEL to PT64_ROOT_4LEVEL Yu Zhang
2017-08-17 19:52 ` [PATCH v2 4/5] KVM: MMU: Add 5 level EPT & Shadow page table support Yu Zhang
2017-08-17 19:52 ` [PATCH v2 5/5] KVM: MMU: Expose the LA57 feature to VM Yu Zhang
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=1502999558-2517-1-git-send-email-yu.c.zhang@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=xiaoguangrong@tencent.com \
/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).