From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdHBKGp (ORCPT ); Wed, 2 Aug 2017 06:06:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46630 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbdHBKGn (ORCPT ); Wed, 2 Aug 2017 06:06:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 17D8B3680E Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH] kvm: x86: reduce rtc 0x70 access vm-exit time To: peng.hao2@zte.com.cn Cc: rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <201708021702599158875@zte.com.cn> From: Paolo Bonzini Message-ID: <079b077b-a0e8-7c93-62d6-62abc67168b3@redhat.com> Date: Wed, 2 Aug 2017 12:06:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201708021702599158875@zte.com.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 02 Aug 2017 10:06:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2017 11:02, peng.hao2@zte.com.cn wrote: > >> On 02/08/2017 10:45, peng.hao2@zte.com.cn 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