Re: [PATCH 4/8] KVM: MMU: hypercall based pte updates and TLB flushes

Avi Kivity
2008-03-04T09:33:46Z

Marcelo Tosatti wrote:
> Hi Avi,
>
> Looks nice.
>
> On Sun, Mar 02, 2008 at 06:31:17PM +0200, Avi Kivity wrote:
>
>> +int kvm_pv_mmu_op(struct kvm_vcpu *vcpu, unsigned long bytes,
>> + gpa_t addr, unsigned long *ret)
>> +{
>> + int r;
>> + struct kvm_pv_mmu_op_buffer buffer;
>>
>
> Perhaps this structure is a little large to be on stack.
>
>

512 bytes should be fine as this isn't part of a particularly deep
path. If it gives us trouble we can reduce it as the size is
independent from the guest buffer size.

>> + down_read(&current->mm->mmap_sem);
>> + down_read(&vcpu->kvm->slots_lock);
>>
>
> The order should be slots_locks then mmap_sem. Need some comment in the
> code.
>

Changed, thanks.

As the patchset (less cr3 caching) passed the regression tests I'll
apply it.

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