* [PATCH] KVM: MMU: Add shadow_accessed_shift
@ 2008-08-29 7:28 Yang, Sheng
2008-08-29 11:49 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Yang, Sheng @ 2008-08-29 7:28 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]
From: Sheng Yang <sheng.yang@intel.com>
Date: Fri, 29 Aug 2008 14:02:29 +0800
Subject: [PATCH] KVM: MMU: Add shadow_accessed_shift
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/mmu.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3008279..0997d82 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -151,6 +151,7 @@ static u64 __read_mostly shadow_nx_mask;
static u64 __read_mostly shadow_x_mask; /* mutual exclusive with nx_mask */
static u64 __read_mostly shadow_user_mask;
static u64 __read_mostly shadow_accessed_mask;
+static u16 __read_mostly shadow_accessed_shift;
static u64 __read_mostly shadow_dirty_mask;
void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte)
@@ -171,6 +172,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64
accessed_mask,
{
shadow_user_mask = user_mask;
shadow_accessed_mask = accessed_mask;
+ shadow_accessed_shift = find_first_bit((unsigned long *)&accessed_mask,
+ sizeof(accessed_mask));
shadow_dirty_mask = dirty_mask;
shadow_nx_mask = nx_mask;
shadow_x_mask = x_mask;
@@ -709,10 +712,10 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long
*rmapp)
int _young;
u64 _spte = *spte;
BUG_ON(!(_spte & PT_PRESENT_MASK));
- _young = _spte & PT_ACCESSED_MASK;
+ _young = _spte & shadow_accessed_mask;
if (_young) {
young = 1;
- clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ clear_bit(shadow_accessed_shift, (unsigned long *)spte);
}
spte = rmap_next(kvm, rmapp, spte);
}
@@ -1785,7 +1788,7 @@ static void kvm_mmu_access_page(struct kvm_vcpu *vcpu,
gfn_t gfn)
&& shadow_accessed_mask
&& !(*spte & shadow_accessed_mask)
&& is_shadow_present_pte(*spte))
- set_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ set_bit(shadow_accessed_shift, (unsigned long *)spte);
}
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
--
1.5.4.5
[-- Attachment #2: 0001-KVM-MMU-Add-shadow_accessed_shift.patch --]
[-- Type: text/x-diff, Size: 2106 bytes --]
From 3a2cc947a656a6eb4e815e64a44cb3e77a162a89 Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Fri, 29 Aug 2008 14:02:29 +0800
Subject: [PATCH] KVM: MMU: Add shadow_accessed_shift
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/mmu.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3008279..0997d82 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -151,6 +151,7 @@ static u64 __read_mostly shadow_nx_mask;
static u64 __read_mostly shadow_x_mask; /* mutual exclusive with nx_mask */
static u64 __read_mostly shadow_user_mask;
static u64 __read_mostly shadow_accessed_mask;
+static u16 __read_mostly shadow_accessed_shift;
static u64 __read_mostly shadow_dirty_mask;
void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte)
@@ -171,6 +172,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
{
shadow_user_mask = user_mask;
shadow_accessed_mask = accessed_mask;
+ shadow_accessed_shift = find_first_bit((unsigned long *)&accessed_mask,
+ sizeof(accessed_mask));
shadow_dirty_mask = dirty_mask;
shadow_nx_mask = nx_mask;
shadow_x_mask = x_mask;
@@ -709,10 +712,10 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp)
int _young;
u64 _spte = *spte;
BUG_ON(!(_spte & PT_PRESENT_MASK));
- _young = _spte & PT_ACCESSED_MASK;
+ _young = _spte & shadow_accessed_mask;
if (_young) {
young = 1;
- clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ clear_bit(shadow_accessed_shift, (unsigned long *)spte);
}
spte = rmap_next(kvm, rmapp, spte);
}
@@ -1785,7 +1788,7 @@ static void kvm_mmu_access_page(struct kvm_vcpu *vcpu, gfn_t gfn)
&& shadow_accessed_mask
&& !(*spte & shadow_accessed_mask)
&& is_shadow_present_pte(*spte))
- set_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ set_bit(shadow_accessed_shift, (unsigned long *)spte);
}
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
--
1.5.4.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] KVM: MMU: Add shadow_accessed_shift
2008-08-29 7:28 Yang, Sheng
@ 2008-08-29 11:49 ` Avi Kivity
2008-08-29 13:19 ` Sheng Yang
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2008-08-29 11:49 UTC (permalink / raw)
To: Yang, Sheng; +Cc: kvm
Yang, Sheng wrote:
> From: Sheng Yang <sheng.yang@intel.com>
> Date: Fri, 29 Aug 2008 14:02:29 +0800
> Subject: [PATCH] KVM: MMU: Add shadow_accessed_shift
>
> static u64 __read_mostly shadow_dirty_mask;
>
> void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte)
> @@ -171,6 +172,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64
> accessed_mask,
> {
> shadow_user_mask = user_mask;
> shadow_accessed_mask = accessed_mask;
> + shadow_accessed_shift = find_first_bit((unsigned long *)&accessed_mask,
> + sizeof(accessed_mask));
>
Ah, I thought ept accessed_mask was zero.
> shadow_dirty_mask = dirty_mask;
> shadow_nx_mask = nx_mask;
> shadow_x_mask = x_mask;
> @@ -709,10 +712,10 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long
> *rmapp)
> int _young;
> u64 _spte = *spte;
> BUG_ON(!(_spte & PT_PRESENT_MASK));
> - _young = _spte & PT_ACCESSED_MASK;
> + _young = _spte & shadow_accessed_mask;
>
_young is an int, so will be set to zero on ept due to truncation.
> if (_young) {
> young = 1;
> - clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
> + clear_bit(shadow_accessed_shift, (unsigned long *)spte);
> }
> spte = rmap_next(kvm, rmapp, spte);
> }
>
Even if the former is fixed, what does it mean? guest memory will never
be considered young by Linux, and so will be swapped sooner.
Maybe we ought to cheat in the other direction and return young = 1 for ept.
> @@ -1785,7 +1788,7 @@ static void kvm_mmu_access_page(struct kvm_vcpu *vcpu,
> gfn_t gfn)
> && shadow_accessed_mask
>
Ah, this is to disable this check for ept (I thought accessed_mask was
zero; why?)
> && !(*spte & shadow_accessed_mask)
> && is_shadow_present_pte(*spte))
> - set_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
> + set_bit(shadow_accessed_shift, (unsigned long *)spte);
> }
>
... but in any case I don't think this code path is ever hit? maybe
doing a movsb from mmio to RAM.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] KVM: MMU: Add shadow_accessed_shift
2008-08-29 11:49 ` Avi Kivity
@ 2008-08-29 13:19 ` Sheng Yang
0 siblings, 0 replies; 6+ messages in thread
From: Sheng Yang @ 2008-08-29 13:19 UTC (permalink / raw)
To: Avi Kivity; +Cc: Yang, Sheng, kvm
On Fri, Aug 29, 2008 at 02:49:38PM +0300, Avi Kivity wrote:
> Yang, Sheng wrote:
>> From: Sheng Yang <sheng.yang@intel.com>
>> Date: Fri, 29 Aug 2008 14:02:29 +0800
>> Subject: [PATCH] KVM: MMU: Add shadow_accessed_shift
>>
>
>> static u64 __read_mostly shadow_dirty_mask;
>>
>> void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte)
>> @@ -171,6 +172,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64
>> accessed_mask,
>> {
>> shadow_user_mask = user_mask;
>> shadow_accessed_mask = accessed_mask;
>> + shadow_accessed_shift = find_first_bit((unsigned long *)&accessed_mask,
>> + sizeof(accessed_mask));
>>
>
> Ah, I thought ept accessed_mask was zero.
Ah... Indeed I gave a FAKE_ACCESSED_MASK(1<<62) to EPT when the patch checked
in. I just want to keep the behaviour consistent with EPT and shadow
rather than do "if xxx_mask == 0" all the time.
I thought the FAKE one can be set when the EPTE is new (and maybe some
rare condition below). But I have neglected the check of
kvm_mmu_access_page() below when I add those fake bits...
>
>> shadow_dirty_mask = dirty_mask;
>> shadow_nx_mask = nx_mask;
>> shadow_x_mask = x_mask;
>> @@ -709,10 +712,10 @@ static int kvm_age_rmapp(struct kvm *kvm,
>> unsigned long *rmapp)
>> int _young;
>> u64 _spte = *spte;
>> BUG_ON(!(_spte & PT_PRESENT_MASK));
>> - _young = _spte & PT_ACCESSED_MASK;
>> + _young = _spte & shadow_accessed_mask;
>>
>
> _young is an int, so will be set to zero on ept due to truncation.
>
>> if (_young) {
>> young = 1;
>> - clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
>> + clear_bit(shadow_accessed_shift, (unsigned long *)spte);
>> }
>> spte = rmap_next(kvm, rmapp, spte);
>> }
>>
>
> Even if the former is fixed, what does it mean? guest memory will never
> be considered young by Linux, and so will be swapped sooner.
>
> Maybe we ought to cheat in the other direction and return young = 1 for ept.
If I understand correctly, now I don't have idea when we can return young=1
except ept entry was just created. For EPT, we may return 0 for the most of
time, after this clear_bit action.
>
>> @@ -1785,7 +1788,7 @@ static void kvm_mmu_access_page(struct kvm_vcpu
>> *vcpu, gfn_t gfn)
>> && shadow_accessed_mask
>>
>
> Ah, this is to disable this check for ept (I thought accessed_mask was
> zero; why?)
My fault. Overlook this from the beginning... The check here no longer
fit for EPT, for shadow_accessed_mask of EPT is not zero now. I will
remove that.
>
>> && !(*spte & shadow_accessed_mask)
>> && is_shadow_present_pte(*spte))
>> - set_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
>> + set_bit(shadow_accessed_shift, (unsigned long *)spte);
>> }
>>
>
> ... but in any case I don't think this code path is ever hit? maybe
> doing a movsb from mmio to RAM.
Thanks... movsb seems reasonable, maybe I just thought it's "in case"... :)
--
regards
Yang, Sheng
>
> --
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] KVM: MMU: Add shadow_accessed_shift
@ 2008-08-30 16:18 yasker
2008-08-31 15:13 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: yasker @ 2008-08-30 16:18 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, Sheng Yang
From: Sheng Yang <sheng.yang@intel.com>
We use a "fake" A/D bit for EPT, to keep epte behaviour consistent with shadow
spte. But it's not that good for MMU notifier. Now we can only expect return
young=0 for clean_flush_young() in most condition.
Also fix a unproper judgement based on shadow_accessed_mask=0 for EPT.
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/mmu.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9bc31fc..1e9f9b4 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -158,6 +158,7 @@ static u64 __read_mostly shadow_nx_mask;
static u64 __read_mostly shadow_x_mask; /* mutual exclusive with nx_mask */
static u64 __read_mostly shadow_user_mask;
static u64 __read_mostly shadow_accessed_mask;
+static u16 __read_mostly shadow_accessed_shift;
static u64 __read_mostly shadow_dirty_mask;
void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte)
@@ -178,6 +179,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
{
shadow_user_mask = user_mask;
shadow_accessed_mask = accessed_mask;
+ shadow_accessed_shift = find_first_bit((unsigned long *)&accessed_mask,
+ sizeof(accessed_mask));
shadow_dirty_mask = dirty_mask;
shadow_nx_mask = nx_mask;
shadow_x_mask = x_mask;
@@ -716,10 +719,10 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp)
int _young;
u64 _spte = *spte;
BUG_ON(!(_spte & PT_PRESENT_MASK));
- _young = _spte & PT_ACCESSED_MASK;
+ _young = _spte & shadow_accessed_mask;
if (_young) {
young = 1;
- clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ clear_bit(shadow_accessed_shift, (unsigned long *)spte);
}
spte = rmap_next(kvm, rmapp, spte);
}
@@ -1789,10 +1792,9 @@ static void kvm_mmu_access_page(struct kvm_vcpu *vcpu, gfn_t gfn)
if (spte
&& vcpu->arch.last_pte_gfn == gfn
- && shadow_accessed_mask
&& !(*spte & shadow_accessed_mask)
&& is_shadow_present_pte(*spte))
- set_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+ set_bit(shadow_accessed_shift, (unsigned long *)spte);
}
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
--
1.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] KVM: MMU: Add shadow_accessed_shift
2008-08-30 16:18 [PATCH] KVM: MMU: Add shadow_accessed_shift yasker
@ 2008-08-31 15:13 ` Avi Kivity
2008-09-01 5:39 ` Yang, Sheng
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2008-08-31 15:13 UTC (permalink / raw)
To: yasker; +Cc: kvm, Sheng Yang
yasker@gmail.com wrote:
> From: Sheng Yang <sheng.yang@intel.com>
>
> We use a "fake" A/D bit for EPT, to keep epte behaviour consistent with shadow
> spte. But it's not that good for MMU notifier. Now we can only expect return
> young=0 for clean_flush_young() in most condition.
>
>
Perhaps we are better off setting shadow_accessed_mask to 0 for ept, and
adding a test for clear_flush_young()? This is the only place that
needs adjusting as far as I can tell.
I don't see what having a fake accessed bit buys us, and I'd like the
patch to be as small as possible, since it needs to go into
2.6.26-stable and 2.6.27-rc.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] KVM: MMU: Add shadow_accessed_shift
2008-08-31 15:13 ` Avi Kivity
@ 2008-09-01 5:39 ` Yang, Sheng
0 siblings, 0 replies; 6+ messages in thread
From: Yang, Sheng @ 2008-09-01 5:39 UTC (permalink / raw)
To: Avi Kivity; +Cc: yasker, kvm
[-- Attachment #1: Type: text/plain, Size: 2992 bytes --]
On Sunday 31 August 2008 23:13:54 Avi Kivity wrote:
> yasker@gmail.com wrote:
> > From: Sheng Yang <sheng.yang@intel.com>
> >
> > We use a "fake" A/D bit for EPT, to keep epte behaviour consistent with
> > shadow spte. But it's not that good for MMU notifier. Now we can only
> > expect return young=0 for clean_flush_young() in most condition.
>
> Perhaps we are better off setting shadow_accessed_mask to 0 for ept, and
> adding a test for clear_flush_young()? This is the only place that
> needs adjusting as far as I can tell.
>
> I don't see what having a fake accessed bit buys us, and I'd like the
> patch to be as small as possible, since it needs to go into
> 2.6.26-stable and 2.6.27-rc.
Though I still think fake accessed bit here makes logic consistent, here is
the patch follow your comment. But I think it may not necessary for the
2.6.26-stable?
----
From: Sheng Yang <sheng.yang@intel.com>
Date: Mon, 1 Sep 2008 13:22:09 +0800
Subject: [PATCH] KVM: VMX: Always return 0 for clear_flush_young() when using
EPT
As well as discard fake accessed bit and dirty bit of EPT.
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/mmu.c | 15 +++++++++++----
arch/x86/kvm/vmx.c | 3 +--
arch/x86/kvm/vmx.h | 2 --
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index f33c594..e437985 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -716,10 +716,17 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long
*rmapp)
int _young;
u64 _spte = *spte;
BUG_ON(!(_spte & PT_PRESENT_MASK));
- _young = _spte & PT_ACCESSED_MASK;
- if (_young) {
- young = 1;
- clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+
+ /* always return old for EPT */
+ if (!shadow_accessed_mask)
+ _young = 0;
+ else {
+ _young = _spte & PT_ACCESSED_MASK;
+ if (_young) {
+ young = 1;
+ clear_bit(PT_ACCESSED_SHIFT,
+ (unsigned long *)spte);
+ }
}
spte = rmap_next(kvm, rmapp, spte);
}
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 81c121c..d637897 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3557,8 +3557,7 @@ static int __init vmx_init(void)
kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |
VMX_EPT_WRITABLE_MASK |
VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT);
- kvm_mmu_set_mask_ptes(0ull, VMX_EPT_FAKE_ACCESSED_MASK,
- VMX_EPT_FAKE_DIRTY_MASK, 0ull,
+ kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
VMX_EPT_EXECUTABLE_MASK);
kvm_enable_tdp();
} else
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h
index 0c22e5f..41e8c10 100644
--- a/arch/x86/kvm/vmx.h
+++ b/arch/x86/kvm/vmx.h
@@ -370,8 +370,6 @@ enum vmcs_field {
#define VMX_EPT_READABLE_MASK 0x1ull
#define VMX_EPT_WRITABLE_MASK 0x2ull
#define VMX_EPT_EXECUTABLE_MASK 0x4ull
-#define VMX_EPT_FAKE_ACCESSED_MASK (1ull << 62)
-#define VMX_EPT_FAKE_DIRTY_MASK (1ull << 63)
#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
--
1.5.4.5
[-- Attachment #2: 0001-KVM-VMX-Always-return-0-for-clear_flush_young-wh.patch --]
[-- Type: text/x-diff, Size: 2261 bytes --]
From 23229946e717294091bf54cee704fb3b1cd4167d Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Mon, 1 Sep 2008 13:22:09 +0800
Subject: [PATCH] KVM: VMX: Always return 0 for clear_flush_young() when using EPT
As well as discard fake accessed bit and dirty bit of EPT.
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
arch/x86/kvm/mmu.c | 15 +++++++++++----
arch/x86/kvm/vmx.c | 3 +--
arch/x86/kvm/vmx.h | 2 --
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index f33c594..e437985 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -716,10 +716,17 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp)
int _young;
u64 _spte = *spte;
BUG_ON(!(_spte & PT_PRESENT_MASK));
- _young = _spte & PT_ACCESSED_MASK;
- if (_young) {
- young = 1;
- clear_bit(PT_ACCESSED_SHIFT, (unsigned long *)spte);
+
+ /* always return old for EPT */
+ if (!shadow_accessed_mask)
+ _young = 0;
+ else {
+ _young = _spte & PT_ACCESSED_MASK;
+ if (_young) {
+ young = 1;
+ clear_bit(PT_ACCESSED_SHIFT,
+ (unsigned long *)spte);
+ }
}
spte = rmap_next(kvm, rmapp, spte);
}
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 81c121c..d637897 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3557,8 +3557,7 @@ static int __init vmx_init(void)
kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |
VMX_EPT_WRITABLE_MASK |
VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT);
- kvm_mmu_set_mask_ptes(0ull, VMX_EPT_FAKE_ACCESSED_MASK,
- VMX_EPT_FAKE_DIRTY_MASK, 0ull,
+ kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
VMX_EPT_EXECUTABLE_MASK);
kvm_enable_tdp();
} else
diff --git a/arch/x86/kvm/vmx.h b/arch/x86/kvm/vmx.h
index 0c22e5f..41e8c10 100644
--- a/arch/x86/kvm/vmx.h
+++ b/arch/x86/kvm/vmx.h
@@ -370,8 +370,6 @@ enum vmcs_field {
#define VMX_EPT_READABLE_MASK 0x1ull
#define VMX_EPT_WRITABLE_MASK 0x2ull
#define VMX_EPT_EXECUTABLE_MASK 0x4ull
-#define VMX_EPT_FAKE_ACCESSED_MASK (1ull << 62)
-#define VMX_EPT_FAKE_DIRTY_MASK (1ull << 63)
#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
--
1.5.4.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-09-01 5:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-30 16:18 [PATCH] KVM: MMU: Add shadow_accessed_shift yasker
2008-08-31 15:13 ` Avi Kivity
2008-09-01 5:39 ` Yang, Sheng
-- strict thread matches above, loose matches on Subject: below --
2008-08-29 7:28 Yang, Sheng
2008-08-29 11:49 ` Avi Kivity
2008-08-29 13:19 ` Sheng Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox