Re: missing kvm smp tlb flush in invlpg

Andrea Arcangeli
2009-03-15T17:06:24Z

On Sun, Mar 15, 2009 at 06:35:02PM +0200, Avi Kivity wrote:
> Andrea Arcangeli wrote:
>> Ah so this was a proposed fix for this bug, I thought you were talking
>> about different bugs, and you didn't acknowledge this as a bug sorry!
>>
>>
>
> If ignoring bugs could make them go away...

;)

>> About the need_flush that could become a per-vcpu bit too cleared at
>> every exit so perhaps we'll never have to flush, but it'd need to stay
>> in the vcpu structure to avoid cacheline bouncing.
>>
>
> But then we need to set it for all vcpus on every invlpg. I'm assuming
> invlpg is much more frequent than mmu notifiers, so it's better to keep it
> global.
>
> We've already taken a shared cacheline when we acquired mmu_lock.

Ok.

> btw, it's probably better to apply your patch, then adapt it to the
> non-IPIing version; your patch is more suitable for -stable.

It's up to you, I guess it'll make life easier with the compat code ;).