Received: by 10.192.165.148 with SMTP id m20csp5124519imm; Tue, 24 Apr 2018 14:13:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSJ1j1WIE2IFtTs7j7c9739WdzdxJM5SDxUPJVUGfx3wN1zAMX3gT5EL2NzHpN+KK32cJM X-Received: by 10.167.133.131 with SMTP id w3mr5337976pfn.197.1524604412057; Tue, 24 Apr 2018 14:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524604412; cv=none; d=google.com; s=arc-20160816; b=MgtV9btxpebMsoy1gtycyh/BCcpnjCrSJTQGpj6H16NtK0qxu+daDSG0CFtpQJN3Ct CiLt87KX+5deBYg9m8L9TlDbOocnISBBWIF9Cv1no6szubkjkUM0M07Xk1v5QwonFoSJ POMfjHJV0GNKXm8vlJTCxIFnb+Q1jCrVMIu4sJ21o+xrVPN2UX266m42nuHPCbO1F/3S ZksWI2vFS5FAlt2dfBNCWc7NBqfCCjt73zumBQNkIakt8jveM2MKWOzTVSyZHG4nXh2N AM6S/Vf/hgZCi+YfNwEEKhzTEWKqp+IQvHU2TVtrudXZH9f0hpXqSJpjw6Bl00kbaaL9 rVyA== 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=c38YlW5Z+8bqkEH4cSW9T0vLeeaocVLfB7TvpA5VvUw=; b=lM953Bb4ULU246OpEFxp5TUllkHr8NdhcGFwAl/RrFov4onznDAkF5L7dANjE6Zmy+ 1aS1waU2t78zrJ5B9bUQxzKN8SBDSS0wTEJRlvDMT7rPWhaBsrlnroPerKCD2SY4xaXC 6WwukFikm3y/253y2TEojHkWyN+WlwPH04lsAX2yYSAkhkPRYkA4djuKJP596GnYvvW3 EaAtu1sGddyMA3doftyDjhXMzmPZFQ1rLQ8lce6e0XhQnFGvg5JDio7/W7YUly9XvMEE QYOKW7ocmUIFlhgkyEysPFGYN8BCJ9K+Fr8IS6zFqS4NLAWZYnHHQe+XIXnCUmV+T2/F i++g== 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 59-v6si14579180plp.179.2018.04.24.14.13.17; Tue, 24 Apr 2018 14:13:32 -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 S1751417AbeDXVML (ORCPT + 99 others); Tue, 24 Apr 2018 17:12:11 -0400 Received: from foss.arm.com ([217.140.101.70]:60082 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbeDXVMH (ORCPT ); Tue, 24 Apr 2018 17:12:07 -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 934C080D; Tue, 24 Apr 2018 14:12:07 -0700 (PDT) Received: from localhost (unknown [10.37.8.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B5B73F25D; Tue, 24 Apr 2018 14:12:06 -0700 (PDT) Date: Tue, 24 Apr 2018 23:12:03 +0200 From: Christoffer Dall To: Peter Maydell Cc: Eric Auger , Eric Auger , lkml - Kernel Mailing List , kvm-devel , kvmarm@lists.cs.columbia.edu, Marc Zyngier , Christoffer Dall , Andre Przywara , Andrew Jones , Wei Huang Subject: Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Message-ID: <20180424211203.GA10555@C02W217FHV2R.local> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Apr 24, 2018 at 05:50:37PM +0100, 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. ah, right. This could be implied by the order creating the regions though, but ok, in that case it's nicer for userspace to state it explicitly. Thanks, -Christoffer