Skip to contentSkip to conversation

KVM: Add EPT support in kvm_arch

RFC PATCH In review Yang, Sheng 1 participant 1 message Feb 1, 2008 KVM

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/7 KVM: Add EPT support in kvm_arch

From 51705fa4cee9ee6eb4244599a4eb26bb055199c9 Mon Sep 17 00:00:00 2001
From: Sheng Yang <[email protected]>
Date: Fri, 1 Feb 2008 05:08:35 +0800
Subject: [PATCH] KVM: Add EPT support in kvm_arch

EPT pointer is a per-domain data, and it contains info more than root_hpa. It may can be put in a better place, but we haven't found yet.

---
 include/asm-x86/kvm_host.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
include/asm-x86/kvm_host.h +15 -0
index 67ae307..f6028c6 100644
@@ -269,6 +269,17 @@ struct kvm_mem_alias {
 	gfn_t target_gfn;
 };
 
+typedef union {
+	struct {
+		u64 etmt	:   3,
+		    gaw		:   3,
+		    rsvd1	:   6,
+		    asr_mfn	:   45,
+		    rsvd2	:   7;
+	} fields;
+	u64 entry;
+} eptp_t;
+
 struct kvm_arch{
 	int naliases;
 	struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
@@ -287,6 +298,10 @@ struct kvm_arch{
 	int round_robin_prev_vcpu;
 	unsigned int tss_addr;
 	struct page *apic_access_page;
+
+	eptp_t eptp;
+	atomic_t ept_npages, guest_npages;
+	struct mutex ept_mutex;
 };
 
 struct kvm_vm_stat {

--
debian.1.5.3.7.1-dirty

From 51705fa4cee9ee6eb4244599a4eb26bb055199c9 Mon Sep 17 00:00:00 2001
From: Sheng Yang <[email protected]>
Date: Fri, 1 Feb 2008 05:08:35 +0800
Subject: [PATCH] KVM: Add EPT support in kvm_arch

EPT pointer is a per-domain data, and it contains info more than root_hpa. It may can be put in a better place, but we haven't found yet.

---
 include/asm-x86/kvm_host.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
include/asm-x86/kvm_host.h +15 -0
index 67ae307..f6028c6 100644
@@ -269,6 +269,17 @@ struct kvm_mem_alias {
 	gfn_t target_gfn;
 };
 
+typedef union {
+	struct {
+		u64 etmt	:   3,
+		    gaw		:   3,
+		    rsvd1	:   6,
+		    asr_mfn	:   45,
+		    rsvd2	:   7;
+	} fields;
+	u64 entry;
+} eptp_t;
+
 struct kvm_arch{
 	int naliases;
 	struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
@@ -287,6 +298,10 @@ struct kvm_arch{
 	int round_robin_prev_vcpu;
 	unsigned int tss_addr;
 	struct page *apic_access_page;
+
+	eptp_t eptp;
+	atomic_t ept_npages, guest_npages;
+	struct mutex ept_mutex;
 };
 
 struct kvm_vm_stat {
Signature · 1 line
debian.1.5.3.7.1-dirty

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel