lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] KVM:X86 simply update A/D bits route
Date
update_accessed_dirty_bits return 0 when dirty/accessed bits are
not supported. So walk_addr_generic just call update_accessed_dirty_bits
with supporting dirty/accessed bits.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
arch/x86/kvm/paging_tmpl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 86b68dc..b40f23e 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -422,7 +422,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
accessed_dirty &= pte >>
(PT_GUEST_DIRTY_SHIFT - PT_GUEST_ACCESSED_SHIFT);

- if (unlikely(!accessed_dirty)) {
+ if (unlikely(!accessed_dirty && have_ad)) {
ret = FNAME(update_accessed_dirty_bits)(vcpu, mmu, walker, write_fault);
if (unlikely(ret < 0))
goto error;
--
1.8.3.1
\
 
 \ /
  Last update: 2017-10-12 15:09    [W:0.035 / U:1.596 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site