lkml.org 
[lkml]   [2017]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kvm: x86: disable KVM_FAST_MMIO_BUS
From
Date
On 17/08/2017 00:31, Michael S. Tsirkin wrote:
> On Wed, Aug 16, 2017 at 11:25:35PM +0200, Paolo Bonzini wrote:
>> Yes, I agree. EMULTYPE_SKIP is fine because failed decoding still
>> causes an exception to be injected. Maybe it's better to gate the
>> EMULTYPE_SKIP emulation on the exit qualification saying this is a write
>
> I thought it's already limited to writes. I agree that's a reasonable
> limitation in any case.
>
>> and also not a page table walk---just in case.
>
> I still don't get it, sorry. Let's assume for the sake of argument
> that it's a PT walk causing the MMIO access. Just why do you think
> that it makes sense to skip the instruction that caused the walk?

I think it doesn't. I think in that case it's better to skip the fast
write and proceed with full emulation.

>>> It's just that this has been there for 3 years and people have built a
>>> product around this.
>>
>> Around 700 clock cycles?
>
> About 30% the cost of exit, isn't it? There are definitely workloads
> where cost of exit gates performance. We didn't work on fast mmio based
> on theoretical assumptions. But maybe I am wrong. We'll see. Jason here
> volunteered to test your patch and we'll see what comes out of it. If
> I'm wrong and it's about 1%, I won't split hairs.

Note that we still get the latency benefit from fast MMIO, and maybe we
can cut a couple hundred clock cycles more---which would benefit all
emulation, not just fast MMIO.

Paolo

\
 
 \ /
  Last update: 2017-08-17 11:00    [W:0.041 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site