lkml.org 
[lkml]   [2010]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] KVM: MMU: Don't touch unsync sp in kvm_mmu_pte_write()
  On 09/20/2010 04:21 PM, Xiao Guangrong wrote:
> Gfn may have many shadow pages, when one sp need be synced, we write
> protected sp->gfn and sync this sp but we keep other shadow pages
> asynchronous
>
> So, while gfn happen page fault, let it not touches unsync page, the unsync
> page only updated at invlpg/flush TLB time
>
> @@ -3157,6 +3164,9 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
>
> mask.cr0_wp = mask.cr4_pae = mask.nxe = 1;
> for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn, node) {
> + if (sp->unsync)
> + continue;
> +
>

Not sure this is a win. If a gpte is updated from having p=0 to p=1 (or
permissions upgraded), we may not have an invlpg to sync the spte, since
the hardware doesn't require it. With this change, we may get an extra #PF.

--
error compiling committee.c: too many arguments to function



\
 
 \ /
  Last update: 2010-09-20 17:27    [W:0.107 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site