Received: by 10.192.165.148 with SMTP id m20csp5092401imm; Tue, 24 Apr 2018 13:36:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpgJx+qV4XpxzuX1rPrRrwV3jR/kDOZMmuOV9gxw4qqLwHuJJbsMTNl7AYZuvwvPVxyecU5 X-Received: by 10.101.74.209 with SMTP id c17mr2535569pgu.26.1524602212767; Tue, 24 Apr 2018 13:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524602212; cv=none; d=google.com; s=arc-20160816; b=JV/aCeqgq6VRd8iZgAQtaVnWal1xj+uTWiD/vg/LLgi/x9i0eNyTQTfMzdQbEhrS3z f4DUpt6fN497DgLhDxqR07BNL8yPCs3vCWSKC2hUbAQo2w+e9Keti9masPo/wbOciUE8 ED4HiJU60WXyf5/Gcga/rF7EAs3/ChRtx4p/Cgu3b7IVl7CV3k+WcVD6M85XiZkjj8Mh QeADlDnbKLbNLFo+sY7JRPxeLBnKCsVzOLBkBhAN41e0TFKQa5PB/p0wOZCL7sX+8tIn LeFKpw8lIJiT9ffV9fj0Z4d3Fx00zSVasPZ6eR5Zl7v1qRyA3Gt6uJJHDl1y+m/UN7Mu 2afQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=J1ODPbUzqeNs1IhhkUKjhrk3MvpvpHhWXg2WMLLAVhc=; b=NdPnf73E2uIoeGaiGuS7Wu7LOSy4HcnCShVB8oXs1EaBWmvuZYoXgUSY9vzGq+fsRD t3Ll1a4/PfTSOjrE40SZtDmSlTbAAVmZUV7A6htOelC/RzWDzEP1M6w7LjTGluBQsbL3 k33RKAK+czzLQNwx8VXxWSSR2dFWM2lzOpnSSVAm07KQ/RkZjOnGcbQWQtSZvsWcwmt7 39Dx5SvPD136PvcLzjaZwJ7UQe7lP/23xqUPQJy5k7jQUNglt1Yv/twflzn9LToSYbBq +qGA9LJMDeuYIj/yOlbxPf4r+0CPHxJCncDyBIbypPQUGfMiiL1c7QteQ6K84aFwLc27 hnEQ== 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 99-v6si14615454plc.601.2018.04.24.13.36.38; Tue, 24 Apr 2018 13:36:52 -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 S1752441AbeDXUfE (ORCPT + 99 others); Tue, 24 Apr 2018 16:35:04 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751295AbeDXUfB (ORCPT ); Tue, 24 Apr 2018 16:35:01 -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 A014D81A88BB; Tue, 24 Apr 2018 20:35:00 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-141.ams2.redhat.com [10.36.116.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7821D215CDC8; Tue, 24 Apr 2018 20:34:58 +0000 (UTC) Subject: Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION To: Peter Maydell , Christoffer Dall References: <1523607658-9166-1-git-send-email-eric.auger@redhat.com> <1523607658-9166-3-git-send-email-eric.auger@redhat.com> <20180424164649.GA4533@C02W217FHV2R.local> Cc: Eric Auger , lkml - Kernel Mailing List , kvm-devel , kvmarm@lists.cs.columbia.edu, Marc Zyngier , Christoffer Dall , Andre Przywara , Andrew Jones , Wei Huang From: Auger Eric Message-ID: Date: Tue, 24 Apr 2018 22:34:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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.8]); Tue, 24 Apr 2018 20:35:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Tue, 24 Apr 2018 20:35:00 +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 Hi Christoffer, Peter, On 04/24/2018 06:50 PM, Peter Maydell wrote: > On 24 April 2018 at 17:46, Christoffer Dall wrote: >> On Fri, Apr 13, 2018 at 10:20:48AM +0200, Eric Auger wrote: >>> --- 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 >> >> I'm not entirely sure I understand the purpose of the index field. >> Isn't a redistributor region identified uniquely by its base address? > > You need a way to tell the difference beween: > (1) redistributors for CPUs 0..63 at 0x40000000, redistributors > for 64..127 at 0x80000000 > (2) redistributors for CPUs 0..63 at 0x80000000, redistributors > for 64..127 at 0x40000000 > > The index field tells you which order the redistributor > regions go in. Yes redistributors are filled in the index order. This matches DT description (Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt): <0x0 0x2d000000 0 0x800000>, // GICR 1: CPUs 0-31 <0x0 0x2e000000 0 0x800000>; // GICR 2: CPUs 32-63 Thanks Eric > > thanks > -- PMM >