From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: RE: [PATCH v4 3/7] KVM: arm/arm64: Fix the documentation Date: Thu, 08 Oct 2015 09:52:02 +0300 Message-ID: <002f01d10195$d6961550$83c23ff0$@samsung.com> References: <5b6b8e9e002bc6a9cc5e6a881032d6b930830e74.1443451687.git.p.fedin@samsung.com> <20151007200439.GC14315@cbox> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, 'Peter Maydell' , 'Marc Zyngier' , 'Andre Przywara' To: 'Christoffer Dall' Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:36577 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbbJHGwF (ORCPT ); Thu, 8 Oct 2015 02:52:05 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NVW00C4632RKV90@mailout1.w1.samsung.com> for kvm@vger.kernel.org; Thu, 08 Oct 2015 07:52:03 +0100 (BST) In-reply-to: <20151007200439.GC14315@cbox> Content-language: ru Sender: kvm-owner@vger.kernel.org List-ID: Hello! > > --- a/Documentation/virtual/kvm/devices/arm-vgic.txt > > +++ b/Documentation/virtual/kvm/devices/arm-vgic.txt > > @@ -44,28 +44,29 @@ Groups: > > Attributes: > > The attr field of kvm_device_attr encodes two values: > > bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | > > - values: | reserved | cpu id | offset | > > + values: | reserved | cpu idx | offset | > > why should this be changed to cpu idx? Because it's index (from 0 to N - 1), and "cpu id" may confuse readers that it should be MPIDR affinity value. In register access function we do "vcpu = kvm_get_vcpu(dev->kvm, cpuid);" (see here: http://lxr.free-electrons.com/source/virt/kvm/arm/vgic-v2-emul.c#L664), and kvm_get_vcpu just indexes the array: http://lxr.free-electrons.com/source/include/linux/kvm_host.h#L427 I decided to change this after http://www.spinics.net/lists/kvm-arm/msg16359.html, Andre clearly mistook this ID for being affinity value. Before GICv3 nobody saw the difference because we had only up to 16 CPUs, with IDs from 0 to 15, i. e. corresponding to indexes. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia