Re: [PATCH 4/4] KVM: MMU: cleanup update_pte, pte_prefetch and sync_pagefunctions

From: Xiao Guangrong
Date: Tue Nov 16 2010 - 20:54:11 EST


On 11/17/2010 04:52 AM, Marcelo Tosatti wrote:

>> + else
>> + mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0,
>> + dirty, NULL, PT_PAGE_TABLE_LEVEL, gfn,
>> + pfn, true, host_writeable);
>
> For example, the update path should always go through mmu_set_spte to
> update last_pte_updated, last_pte_gfn.
>

Actually, the set_spte() just works for sync path ;-)

> Also the callbacks make it harder to read the code. Maybe the
> unification works if you use common functions for common parts.
>

Um. your advice is reasonable, i'll improve it. Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/