Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1992797imm; Sat, 13 Oct 2018 07:59:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV63GVlV6iCMWW9tplK56jzMLP5sm3e0MScaMYzI7eu/YsTnbt93rI2NnFxrU0trOHrc+MyAi X-Received: by 2002:a63:e601:: with SMTP id g1-v6mr9690361pgh.290.1539442753732; Sat, 13 Oct 2018 07:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539442753; cv=none; d=google.com; s=arc-20160816; b=QTJU6Lt+TY8+55xUYwYJau2W4yRAMCwEyQKGMiH8dVVtUd7diYw3JBjTUbplJhRz4G IQVoHeWMWEEIKqs8fM5ZhrZ0oCuGU4BN9EinMcA/5EkQx8PbK3CkbypRjgHEGR60gOvX iD981lIZt50q2H94d8Xy58GK7S1XKk1I0bqrkU/G5hYE/ar5xZag1/Iu+MsFoAzzjRZ8 vps/NXDJTgJwZyMWofWMW+WNieWvZhqPFNR6MZwGc3sBc8eo08QDtAE6EUyIxYud/RZq pt61yjj+XzSU4Fq4TsggdRkCqlvQbRCtrX6gVq493zlrvQWrYcjZLs78PNji1fj0UdsA jrKA== 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=a/npft44/CgFmTr0NjN4YT1rPv99MrBcN3u8SqLYJS4=; b=ZRoQ8DMydhfqebdDxxOcVmPT8da0OFa/Dkx2hNVwzc37isd9kkuVNr75vQEqv4uARl 7yKaFCJW82bYoW4YAKmNA6YMfsJw+FlP0Aza7STG5kkFiizrvMAOtESWT83O9YUQJyo9 XvOKbmaEoY+viViis7twToWGvpKDs0nBiIRSiJjRO6sb/epW7JAPJdX8SqmXkorbkzWn 6yU5CsF2seePJD9PYVX6DeSLNYhOaXNXSIpX0mdI7oUDvsKXF6HhMiMoIhVqGGCfpzxJ z6m2smKxIjsQM0ZM/EuUjRHZ+0/4I7nFrPjvRIHdnJn/Y2HxAXxTm7OEAYF6WP32hULx Ma2A== 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 u18-v6si4703117pgl.59.2018.10.13.07.58.59; Sat, 13 Oct 2018 07:59:13 -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 S1726920AbeJMWfy (ORCPT + 99 others); Sat, 13 Oct 2018 18:35:54 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:58390 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbeJMWfx (ORCPT ); Sat, 13 Oct 2018 18:35:53 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 47F495B7C20281D83FAE; Sat, 13 Oct 2018 22:58:24 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w9DEwIGb096843; Sat, 13 Oct 2018 22:58:18 +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 2018101322590136-4289338 ; Sat, 13 Oct 2018 22:59:01 +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 2/3] kvm/x86 : add document for coalesced mmio Date: Sun, 14 Oct 2018 07:09:56 +0800 Message-Id: <1539472197-111085-3-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:01, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-10-13 22:57:58, Serialize complete at 2018-10-13 22:57:58 X-MAIL: mse01.zte.com.cn w9DEwIGb096843 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 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 647f941..9615b9e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -3676,6 +3676,30 @@ Returns: 0 on success, -1 on error This copies the vcpu's kvm_nested_state struct from userspace to the kernel. For the definition of struct kvm_nested_state, see KVM_GET_NESTED_STATE. +4.116 KVM_(UN)REGISTER_COALESCED_MMIO + +Capability: KVM_CAP_COALESCED_MMIO +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 +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 +do not exit to userspace and their value is recorded in a shared coalesced +ring in the kernel. + +Coalesced mmio is applied to the following scenario typically. +If a write access to a hardware register can be deferred, following a +read/write access to another hardware register on the same device +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. + 5. The kvm_run structure ------------------------ -- 1.8.3.1