On 09/16/2012 08:07 PM, Avi Kivity wrote:
>
> - pt_access = ACC_ALL;
> + pt_access = pte_access = ACC_ALL;
> + ++walker->level;
>
> - for (;;) {
> + do {
> gfn_t real_gfn;
> unsigned long host_addr;
>
> + pt_access &= pte_access;
> + --walker->level;
Any reason increase walker->level before the loop and decrease here?
Can not use the origin style? :)
> + gfn = gpte_to_gfn_lvl(pte, walker->level);
> + gfn += (addr & PT_LVL_OFFSET_MASK(walker->level)) >> PAGE_SHIFT;
> +
> + if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL &&
> is_cpuid_PSE36())
> + gfn += pse36_gfn_delta(pte);
> +
> + ac = write_fault | fetch_fault | user_fault;
Can use 'access' instead.
Otherwise looks good to me.
Reviewed-by: Xiao Guangrong <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html