Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

Avi Kivity
2010-06-28T08:04:19Z

On 06/28/2010 10:30 AM, Dong, Eddie wrote:
>>
>> Several milliseconds of non-responsiveness may not be acceptable for
>> some applications. So I think queue_work_on() and a clflush loop is
>> better than an IPI and wbinvd.
>>
>>
> Probably we should make it configurable. For RT usage models, we do care about responsiveness more than performance, but for typical server useg model, we'd better focus on performance in this issue. WBINVD may perform much much better than CLFLUSH, and a mallicious guest repeatedly issuing wbinvd may greatly impact the system performance.
>

I'm not even sure clflush can work. I thought you could loop on just
the cache size, but it appears you'll need to loop over the entire guest
address space, which could take ages.

So I guess we'll have to settle for wbinvd, just avoiding it when the
hardware allows us to.

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