Re: guest PTE write emulation

Avi Kivity
2007-05-30T12:25:58Z

Dong, Eddie wrote:
> Avi Kivity wrote:
>
>> On a pte update, npte will always be 1. On a pde update, we won't do
>> anything in mmu_pte_write_new_pte because it doesn't handle
>> pdes. If we
>> extend it to handle pdes, then we need either to modify the
>> new gpde or
>> to have the update take the quadrant into account.
>>
>
> Agree, so we either just skip npte=2 branch or polish it.
> How about following changes?
>

Isn't it all dead code, as gpte[1] will never be used?

Maybe just move the page->role.level test from mmu_pte_write_new_pte()
back to kvm_mmu_pte_write(), so that it's clear that the new data isn't
used for the non-pte case?

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