Received: by 10.192.165.148 with SMTP id m20csp3569764imm; Mon, 30 Apr 2018 02:32:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo6Ob4rpMD05gUp4bSlZY0AYyi+3KWZmh1IIE8pxBXlwkAs9/WRNfkX/u99DU5XKYMI5YV8 X-Received: by 10.98.80.145 with SMTP id g17mr11128340pfj.71.1525080741490; Mon, 30 Apr 2018 02:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525080741; cv=none; d=google.com; s=arc-20160816; b=QG4jVzk6cTNuvjovi7UVuDqDyYz5zQFwZeTkSAZcgz8/wlvOiVLd58bWw2F9TLqqUK F/IpfButOAOETZ+ibFRuN4rDtkRfQad/cA9O5j5IlR+aPQCKV4S3+peqb6wA+FSvIeMC U2mO6KFKd6yE4TV7FOlr6oBvsoGfzx76fyCi0hvlpHaLJ3ZHNfAxL5sh/asLJEhwwcNx xg8WRaEcs3UAEgGbVg/wCjEjHy42/OlBLkNujq89YbgaTPRejblmYPJ11fZWJlb3guPI P4K9T90zdqDnt8VnLWT4XFN0YPoprRtwT9vQiX1Chd6+1CSxDeABtrO155LLKv6lhW4D 6wGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=s2Ji8i5ZyHk4IB1yECd7xughLVCjYsAn/NuhLkug5U8=; b=IT+eO9Z8DzyN3psOcULInF6bWuwcJxF/dBSqNzJFulopVk54TrLjmzlsLxGO1w3DWt Lj4PE0P00HxjNbdr4A18egfxXXRP28LZ4/W8MqERyAarWTg2Fd7jmPXY1ux9Ezg0Q6Fg HUC0atAzo1h5wbFJbKSCvFzqlf99uAaejlZHxZfu1XRaaYO671kQCesVSXzjKXfOYIUj Z1nJ530XjFDXIcrWAM0s9Vo/wHC0CWc5mZ2ycXK5uZv8N8M3Tv558k+wvdwdAeLeWImA F/Xo8ezwnqHha1Jh8JkP0OsG7JpvAMgwz1rc2VvA9vIrtmnXKksfLmrX9tsBPp4Drioo QV0g== 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 w61-v6si7089476plb.155.2018.04.30.02.32.07; Mon, 30 Apr 2018 02:32:21 -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 S1752391AbeD3Jbo (ORCPT + 99 others); Mon, 30 Apr 2018 05:31:44 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:56810 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbeD3Jbn (ORCPT ); Mon, 30 Apr 2018 05:31:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 37DB815AB; Mon, 30 Apr 2018 02:31:43 -0700 (PDT) Received: from localhost (unknown [10.37.8.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 980433F587; Mon, 30 Apr 2018 02:31:42 -0700 (PDT) Date: Mon, 30 Apr 2018 11:31:39 +0200 From: Christoffer Dall To: Eric Auger Cc: eric.auger.pro@gmail.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, andre.przywara@arm.com Subject: Re: [PATCH v5 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Message-ID: <20180430093139.GA12204@C02W217FHV2R.local> References: <1525079264-25533-1-git-send-email-eric.auger@redhat.com> <1525079264-25533-3-git-send-email-eric.auger@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525079264-25533-3-git-send-email-eric.auger@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 30, 2018 at 11:07:34AM +0200, Eric Auger wrote: > 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 Acked-by: Christoffer Dall > > --- > v4 -> v5: > - Document read access > - removed Peter's R-b > > v3 -> v4: > - Added Peter's R-b > --- > Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 30 +++++++++++++++++++++-- > 1 file changed, 28 insertions(+), 2 deletions(-) > > diff --git a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt > index 9293b45..dcb7504 100644 > --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt > +++ b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt > @@ -27,16 +27,42 @@ 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 attribute data pointed by kvm_device_attr.addr is a __u64 value: > + 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. > + The characteristics of a specific redistributor region can be read > + by presetting the index field in the attr data. > + 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 > + -ENOENT: Attempt to read the characteristics of a non existing > + redistributor region > -ENXIO: The group or attribute is unknown/unsupported for this device > or hardware support is missing. > -EFAULT: Invalid user pointer for attr->addr. > > > - > KVM_DEV_ARM_VGIC_GRP_DIST_REGS > KVM_DEV_ARM_VGIC_GRP_REDIST_REGS > Attributes: > -- > 2.5.5 > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm