Re: [patch 05/13] KVM: MMU: do not write-protect large mappings

Avi Kivity
2008-09-07T09:05:01Z

Marcelo Tosatti wrote:
> There is not much point in write protecting large mappings. This
> can only happen when a page is shadowed during the window between
> is_largepage_backed and mmu_lock acquision. Zap the entry instead, so
> the next pagefault will find a shadowed page via is_largepage_backed and
> fallback to 4k translations.
>
> Simplifies out of sync shadow.
>
> @@ -1222,6 +1221,14 @@ static void mmu_set_spte(struct kvm_vcpu
> if (write_fault)
> *ptwrite = 1;
> }
> + /*
> + * Do not create write protected large translations.
> + */
> + if (largepage && has_wrprotected_page(vcpu->kvm, gfn)) {
> + spte = shadow_trap_nonpresent_pte;
> + was_writeble = 0;
> + *ptwrite = 0;
> + }
> }
>
>

Why are you clearing was_writable?

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