Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1992994imm; Sat, 13 Oct 2018 07:59:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV62dZhsejlnb6iBQm1RUYOsVKSC7BYZ3pyxaFw0OAzvgJkUEDUBaSQBlXXzqI5DTuKUnvCUP X-Received: by 2002:a17:902:562:: with SMTP id 89-v6mr10317833plf.315.1539442770494; Sat, 13 Oct 2018 07:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539442770; cv=none; d=google.com; s=arc-20160816; b=t6vsai93sutL2V22uBwhhjEoGDL7ex5P3SHDXgYt3uzNQfAdVQT9gnzrRpMQ3Pehk/ qk+RSgP/80f1yFNgABIX+YvYyKhkZQNnJi5xGbOU8c/aCGBfdVfZd0cBxXoTpV2x7KTu UdwJulLT6JeDhxrHi5YdJ0+aBOXjaeik3J+mDqoFe8jsf2Vm3hneFdI7J8CjwgN40540 HmZpuSN2I+27ec+Xaw2bfBfmN5iKNsswXVyqEcqBlrWnpEgHzMeT8FWkhwngOGrSOc0o M32be0xJ7tn/pPZ8r2afUhQccpXO7yTlbXfto8HLyohb8ovMnZTvzhCOng1f09BanEpV NxpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=6rS1DHEhacmgHXpy1V/pO3Dzp9VeMZJmtxj7WC2Wq8U=; b=LuEdRYqdrUeW9RhuSxLnBFjaXZq5iclJYsiEzTF86nJKv3n5fQnSwp6KuWkEryHWsK gDWpZgy4lkMYnaBrc+5lX663QP2DZ1uyigo04QJTTTySOTIlz1ZZ9u9I671aUXzCo1sT mlFD+ENUpGHRUc3p9S+0sL0yPSa4hRSBLk1WE0uXksCKZVA1ri4b69oaFwJ0d9mW5Ykf i00fLJ1/uzycPo4zVhReRXMm1QcUmPW9wDPtd+DMqjfX3bp5RBs/lUMKNZVAqQhsH09i BwH8QNASydy66Melo76eKVEHlafr3idU3h2NjW2D2JWnmE+8DUR+s/HFlx6Q9KhKJvdv j+lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3-v6si4351272pgb.72.2018.10.13.07.59.15; Sat, 13 Oct 2018 07:59:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbeJMWf5 (ORCPT + 99 others); Sat, 13 Oct 2018 18:35:57 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:41598 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbeJMWf4 (ORCPT ); Sat, 13 Oct 2018 18:35:56 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 6C22B3E9898AC1AA4B48; Sat, 13 Oct 2018 22:58:27 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w9DEwKbH096874; Sat, 13 Oct 2018 22:58:20 +0800 (GMT-8) (envelope-from peng.hao2@zte.com.cn) Received: from localhost.localdomain.localdomain ([10.74.120.59]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018101322590341-4289345 ; Sat, 13 Oct 2018 22:59:03 +0800 From: Peng Hao To: pbonzini@redhat.com, rkrcmar@redhat.com, stefanha@gmail.com Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Peng Hao Subject: [PATCH V5 3/3] kvm/x86 : add document for coalesced pio Date: Sun, 14 Oct 2018 07:09:57 +0800 Message-Id: <1539472197-111085-4-git-send-email-peng.hao2@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539472197-111085-1-git-send-email-peng.hao2@zte.com.cn> References: <1539472197-111085-1-git-send-email-peng.hao2@zte.com.cn> X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-10-13 22:59:03, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-10-13 22:58:00, Serialize complete at 2018-10-13 22:58:00 X-MAIL: mse01.zte.com.cn w9DEwKbH096874 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Peng Hao --- Documentation/virtual/kvm/api.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 9615b9e..d3a0497 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -3678,18 +3678,19 @@ the definition of struct kvm_nested_state, see KVM_GET_NESTED_STATE. 4.116 KVM_(UN)REGISTER_COALESCED_MMIO -Capability: KVM_CAP_COALESCED_MMIO +Capability: KVM_CAP_COALESCED_MMIO (for coalesced mmio) + KVM_CAP_COALESCED_PIO (for coalesced pio) Architectures: all Type: vm ioctl Parameters: struct kvm_coalesced_mmio_zone Returns: 0 on success, < 0 on error -Coalesced mmio is a performance optimization that defers hardware +Coalesced I/O is a performance optimization that defers hardware register write emulation so that userspace exits are avoided. It is typically used to reduce the overhead of emulating frequently accessed hardware registers. -When a hardware register is configured for coalesced mmio, write accesses +When a hardware register is configured for coalesced I/O, write accesses do not exit to userspace and their value is recorded in a shared coalesced ring in the kernel. @@ -3700,6 +3701,9 @@ will cause the shared coalesced ring to be processed by userspace before emulating the current access. That will reduce the first write access to userspace. +Coalesced pio is based on coalesced mmio. There is little difference between +coalesced mmio and pio except that coalesced pio is used for ioport. + 5. The kvm_run structure ------------------------ -- 1.8.3.1