Received: by 10.192.165.156 with SMTP id m28csp426416imm; Fri, 13 Apr 2018 01:25:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HIs9ariH0c7Xv9FBRi2oO7+gZ4aieTxuMiiV6L8FuQi8PqwKR3h+LBIyT14eFHIwgBTs7 X-Received: by 2002:a17:902:28c4:: with SMTP id f62-v6mr4369435plb.19.1523607939421; Fri, 13 Apr 2018 01:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523607939; cv=none; d=google.com; s=arc-20160816; b=W9P1UjjjRP5oMfyD8Tqt0feSn1LBPV0mYc0nFp6ZjRDxzVf3f6lvsiqTbtfnnCfqJX dOidOyQxJ+lxdZO/1+qCL4Z+orSQW6dct+Q6mWWKPytFs2te219+cude/BOl3X1AzXs2 CL9uYJb6ogKK3oMM6+iKu4LyzGJ3tFOawTISSbIOoqPCX8DvwZiNk889EZ30/dkIKwT7 8y3D/BiZh8ZfcYGrVu/LIKgp9SIpDwPD6H0GdgSKMSQaF+uZ0a+q73g9Mat+Ig2q2/Tv 0e+3ah4qsjjVS0dj8k7FONXSXOa7DE0ILMR+sS4OpSphv6PaEY8gcMwZaHMI1wV01SP9 mKvA== 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:arc-authentication-results; bh=4kdHLBYmesmcNOotjEqKwLp+mbxHzYPDHUQm9NHMVIc=; b=PpAYrzUCuFNM2Hvx+U0mSusW/QGnBtiC75EPlM4iKePRRn0t61/Oek4VmjXmX4L8PD p3/MfCEpa3BEtS8SLnG/0cxF8o2hcjdJEwUZxFHSbY+Drlnv5Vt8EeuyDB+Nz1IBujWP 4oFQNo9EJfPtcoxrPulVXuAPYdZ2ay9SCkAmkDWGMQREntzQJIK4eWbeMhCWMFmL7/4Y BFVBt2N3oN7XvXBAzFHwu9T/U336t5IC8dfgZpNLCZC/39/Zg8Bzir1i7KD6d7liNrGX mpXYAqZMPnrWwr4gRAt6XvfiFtQ2kefev6uhFenZ+XKXnqSkwOsrkxYhQjOM9l/PboZG FhuQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8-v6si5253509plq.668.2018.04.13.01.25.25; Fri, 13 Apr 2018 01:25:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753317AbeDMIVO (ORCPT + 99 others); Fri, 13 Apr 2018 04:21:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750973AbeDMIVI (ORCPT ); Fri, 13 Apr 2018 04:21:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72B2A9BA4B; Fri, 13 Apr 2018 08:21:07 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-192.ams2.redhat.com [10.36.116.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7359A215CDCF; Fri, 13 Apr 2018 08:21:05 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, cdall@kernel.org, peter.maydell@linaro.org Cc: andre.przywara@arm.com, drjones@redhat.com, wei@redhat.com Subject: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Date: Fri, 13 Apr 2018 10:20:48 +0200 Message-Id: <1523607658-9166-3-git-send-email-eric.auger@redhat.com> In-Reply-To: <1523607658-9166-1-git-send-email-eric.auger@redhat.com> References: <1523607658-9166-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 13 Apr 2018 08:21:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 13 Apr 2018 08:21:07 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'eric.auger@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the base address and size of a redistributor region Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST, this new attribute allows to declare several separate redistributor regions. So the whole redist space does not need to be contiguous anymore. Signed-off-by: Eric Auger --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt index 9293b45..cbc4328 100644 --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt +++ b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt @@ -27,9 +27,32 @@ Groups: VCPU and all of the redistributor pages are contiguous. Only valid for KVM_DEV_TYPE_ARM_VGIC_V3. This address needs to be 64K aligned. + + KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION (rw, 64-bit) + The attr field of kvm_device_attr encodes 3 values: + bits: | 63 .... 52 | 51 .... 16 | 15 - 12 |11 - 0 + values: | count | base | flags | index + - index encodes the unique redistributor region index + - flags: reserved for future use, currently 0 + - base field encodes bits [51:16] of the guest physical base address + of the first redistributor in the region. + - count encodes the number of redistributors in the region. Must be + greater than 0. + There are two 64K pages for each redistributor in the region and + redistributors are laid out contiguously within the region. Regions + are filled with redistributors in the index order. The sum of all + region count fields must be greater than or equal to the number of + VCPUs. Redistributor regions must be registered in the incremental + index order, starting from index 0. + Only valid for KVM_DEV_TYPE_ARM_VGIC_V3. + + It is invalid to mix calls with KVM_VGIC_V3_ADDR_TYPE_REDIST and + KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attributes. + Errors: -E2BIG: Address outside of addressable IPA range - -EINVAL: Incorrectly aligned address + -EINVAL: Incorrectly aligned address, bad redistributor region + count/index, mixed redistributor region attribute usage -EEXIST: Address already configured -ENXIO: The group or attribute is unknown/unsupported for this device or hardware support is missing. -- 2.5.5