Received: by 10.192.165.148 with SMTP id m20csp1079652imm; Fri, 27 Apr 2018 12:17:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrIfYsaDLpDOiXF2bIJT5AoYciY9BoLZ9Sb4In+1TTo114BYB3haALvflgXqNJZd7Wc94A9 X-Received: by 2002:a17:902:7d95:: with SMTP id a21-v6mr3420474plm.12.1524856650837; Fri, 27 Apr 2018 12:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524856650; cv=none; d=google.com; s=arc-20160816; b=SEcCz0wWfATcwIppUAP45beFGRWwb9QxQKjgv2r4yRssdRXO7Es320CXf7qpIPiX9f WpNeKzSWeAvR4kdQGGQHXj1hPKeCWxinEX3X/TlRlLbyb8LVH1tx55Y6Zu12ra3tBtha 5oqJ5zJdah+wbzwbtWFf/wlY1rAtDmlEV2iL9VFMa7XTuYag9t/1FVpvPg78IxWCZaPi Eu2+R7P2QuBJ7Vid8fx275NBHYEcJsxXpZp5Fx/VeCWb2dC7OZE29eoXrpbIB+qIU8g9 lzFCxhA4QcBi4GmZ/5C6nd1bSjX6Aom0WjjS+cXpkLp7RGsb/iIjzEw1WTlAPWvEAiD+ thuA== 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=lxLXXYxYKzUPqHbXUWPNx29dQcjyJkSbglicvtMG1Fw=; b=cytCeVqtK5PM9BC3pPvlaDGqjsGIl0bEV8NYgSayDsB27PkXBvUp3h1o2htAf1TLRG VOp4UdXNHcEt4qjyvcx8SQctx/BacBZzAUaoxkn9HYsnbWyBKtk59yr26AO+Vc8nCvV9 3Kev+lFhr7j6JNOehzSql6vHZAFpS6A6h8uj4fwOSPUCycinTzR9la+wxSbt/lcQmI1z AAfuFxjs/1ftHOEY8L5seRHdLESmuDWNthRE63nayPj5DJNT3TdKhqZ7e0+Qm6dE3MFm +leKMjIOFzexu8E+EetJi/OL8f/hK1el8cF/FP7ULmBUIFo21jwJ1HXGJjw6Vexsag8s 2RwA== 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 y13-v6si1814395pge.491.2018.04.27.12.17.16; Fri, 27 Apr 2018 12:17: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 S1758949AbeD0TPv (ORCPT + 99 others); Fri, 27 Apr 2018 15:15:51 -0400 Received: from foss.arm.com ([217.140.101.70]:45408 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758707AbeD0TPs (ORCPT ); Fri, 27 Apr 2018 15:15:48 -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 3946C1529; Fri, 27 Apr 2018 12:15:48 -0700 (PDT) Received: from localhost (unknown [10.37.9.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9950C3F487; Fri, 27 Apr 2018 12:15:47 -0700 (PDT) Date: Fri, 27 Apr 2018 21:15:44 +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, peter.maydell@linaro.org, andre.przywara@arm.com Subject: Re: [PATCH v4 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Message-ID: <20180427191544.GP13249@C02W217FHV2R.local> References: <1524838505-3823-1-git-send-email-eric.auger@redhat.com> <1524838505-3823-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: <1524838505-3823-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 Fri, Apr 27, 2018 at 04:14:55PM +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 > Reviewed-by: Peter Maydell Acked-by: Christoffer Dall > > --- > v3 -> v4: > - Added Peter's R-b > --- > 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 > > _______________________________________________ > kvmarm mailing list > kvmarm@lists.cs.columbia.edu > https://lists.cs.columbia.edu/mailman/listinfo/kvmarm