Received: by 10.192.165.148 with SMTP id m20csp4881791imm; Tue, 24 Apr 2018 09:54:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+xQI6rIFE51cRhL38NoFYV3WoOnCOY+2dizt35HOOepr8Jw4z0oZiN/96OXjq9n/ZWe+Z4 X-Received: by 10.99.168.13 with SMTP id o13mr20669109pgf.198.1524588856468; Tue, 24 Apr 2018 09:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524588856; cv=none; d=google.com; s=arc-20160816; b=D2amfJYJw0wtyHEtL/53kJreXiY/y2ll0Tz5BIa05B8SnlccqoBIjfMur8Dt1HAo2y looRFZkNhx3WiLR9L3KqBAnnlTKbyTdXTIfVgMklMAob+wtSJOAAHyyIlGThLz824VXU HDh1vd5Ggjz9tomlXk3Q4pOHo2Sn9xQKaNetqvST/NLYizjPJ9NSKYMSsn+9fiGvTc1W hnsYKZSWi1pKIyT7sWDDqfk+e4VR4paTjPXdB8lQJ8+c8lnRsLSKjzdHjs8aVli55e3Z miu9+tre6bL2Dq3J9Sr7BEHN2WgRk9qNpzoeZZwlDQAChQTC6A1oTmyFI3MaU+hxevH/ jtTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=4nqs58JbCKV2M2pXag5hsQQ0/EvPTdvwq5S3c1mOxDQ=; b=itpK1oIdEF4BSBCrHeqB6Dq0mb6lbPmDo8nyN+vw3qobwuTIs1xHQYpOauguaFKxwi FPFzuKTTNuBkfoJ/BZj9UPSMvg98g7hBgln1liHR3MTBBff5Rv1UG8sEYflxXWb27O3R MFONfPIhsKy4X8OHnaai5zvs7s8mrx/GNmqU7DfU1A6g7jRwLa8/bCaG8u51KRyPeG55 LovAeM75ATiPgj73dDe3RGYRVH31INNjBsRA+Zaa3kBZmyf1Tpnjnxl/EqgkbNdgds2B 6Mx+mThvY/FtS51BDGfzuLQWzcCvRO9i6YDFZpP/9iJwDjZHLyRnlnvOOiX2cb1//gNi 7lbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NHv4+SR1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b73si12245856pga.106.2018.04.24.09.54.02; Tue, 24 Apr 2018 09:54:16 -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; dkim=pass header.i=@linaro.org header.s=google header.b=NHv4+SR1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752092AbeDXQvE (ORCPT + 99 others); Tue, 24 Apr 2018 12:51:04 -0400 Received: from mail-ot0-f176.google.com ([74.125.82.176]:36834 "EHLO mail-ot0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbeDXQu6 (ORCPT ); Tue, 24 Apr 2018 12:50:58 -0400 Received: by mail-ot0-f176.google.com with SMTP id p2-v6so22040283otf.3 for ; Tue, 24 Apr 2018 09:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4nqs58JbCKV2M2pXag5hsQQ0/EvPTdvwq5S3c1mOxDQ=; b=NHv4+SR10V9jehAEZ0Tl2A8oojFyLu1TvfV/2+GE9Xaeeymzhuy2ibnY7fWwc7OA4/ /lf6D6I58FALxu9saC+8FrDoPORyRc79md3n4V3pFnWfpfltYT+Ht6Q9nKkcaTkfqAhs DqcIFZgbJPUONMiE9Y2Nnw9n+eluJ986XI1mc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4nqs58JbCKV2M2pXag5hsQQ0/EvPTdvwq5S3c1mOxDQ=; b=tNebvCqAL1TfrZFSZOWn3CV1G6FYwxgHSU6x/9/AAGNxcyI+/DI812/KLCaz7sxiRJ voO6ji9AllSkMz9fbiI3WJ3L/OqTbF/oBe6J+FFxzycqOCMfpTzM7ifXtt06Go/y2GwL iWiD1UoE4U5r+ex1KA0Sdd9msxVKL3/5AW19EWDxIn4QMNJksV4NSN9Q2wzGc6Janu1T p8J3+jxE0mQunQokhVN2UxBYBPSbCp9NMYBS3pRLgXWKfMi3oHw+J4JWm1JE7dctZxKy TVpGVAtB8//yuaPq//idYf7CjauewxSbUrFO7wsl6LR17jKxoExaawtpHJ2gNrw9syur 9MdQ== X-Gm-Message-State: ALQs6tCvlNDt467/ZIZBNKHxRros70HQz+KCMe2kisatipV+vnoBpw3h mSdgFen11o579ahJSPzc6IyEqkz2Zj2fQD8HU3jrGiba X-Received: by 2002:a9d:2842:: with SMTP id h2-v6mr12774410otd.210.1524588658418; Tue, 24 Apr 2018 09:50:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:40fb:0:0:0:0:0 with HTTP; Tue, 24 Apr 2018 09:50:37 -0700 (PDT) In-Reply-To: <20180424164649.GA4533@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> From: Peter Maydell Date: Tue, 24 Apr 2018 17:50:37 +0100 Message-ID: Subject: Re: [PATCH v3 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION To: Christoffer Dall 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. thanks -- PMM