lkml.org 
[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 01/22] KVM: MMU: fix walking shadow page table
    On Wed, Jun 22, 2011 at 10:28:04PM +0800, Xiao Guangrong wrote:
    > Properly check the last mapping, and do not walk to the next level if last spte
    > is met
    >
    > Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
    > ---
    > arch/x86/kvm/mmu.c | 9 +++++----
    > 1 files changed, 5 insertions(+), 4 deletions(-)
    >
    > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
    > index 9c629b5..f474e93 100644
    > --- a/arch/x86/kvm/mmu.c
    > +++ b/arch/x86/kvm/mmu.c
    > @@ -1517,10 +1517,6 @@ static bool shadow_walk_okay(struct kvm_shadow_walk_iterator *iterator)
    > if (iterator->level < PT_PAGE_TABLE_LEVEL)
    > return false;
    >
    > - if (iterator->level == PT_PAGE_TABLE_LEVEL)

    Change to >= PT_PAGE_TABLE_LEVEL, checks should be in shadow_walk_okay.

    > - if (is_large_pte(*iterator->sptep))
    > - return false;
    > -
    > iterator->index = SHADOW_PT_INDEX(iterator->addr, iterator->level);
    > iterator->sptep = ((u64 *)__va(iterator->shadow_addr)) + iterator->index;
    > return true;


    \
     
     \ /
      Last update: 2011-06-22 22:05    [W:0.032 / U:1.796 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site