Re: [PATCH] kvm: x86: reduce rtc 0x70 access vm-exit time

From: Paolo Bonzini
Date: Wed Aug 02 2017 - 06:06:49 EST


On 02/08/2017 11:02, peng.hao2@xxxxxxxxxx wrote:
>
>> On 02/08/2017 10:45, peng.hao2@xxxxxxxxxx wrote:
>> >>On 02/08/2017 17:24, Peng Hao wrote:
>> > coalesced MMIO is async and io port should be sync . I don't need to
>> > coalese io port access.
>
>> Coalesced MMIO access is resolved on the next read from a coalesced MMIO
>> address or the next write to a non-coalescecd MMIO address. So it would
>> work perfectly for port 0x70. You would have to modify QEMU to split
>> the RTC I/O ports into two MemoryRegions.
>
> ok , it sounds simpler. I will try it.

My suggestion is to repurpose the "pad" field of "struct
kvm_coalesced_mmio_zone" to be 0 for memory and -1 for I/O. It should
be enough for an RFC.

Later we can look into how to handle backwards compatibility.

Thanks,

Paolo