From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1uSX-0001Q2-9p for qemu-devel@nongnu.org; Mon, 08 Jun 2015 06:39:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1uST-0001FL-Vc for qemu-devel@nongnu.org; Mon, 08 Jun 2015 06:39:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1uST-0001F7-Qh for qemu-devel@nongnu.org; Mon, 08 Jun 2015 06:39:09 -0400 Date: Mon, 8 Jun 2015 12:39:05 +0200 From: Igor Mammedov Message-ID: <20150608123905.1effcca3@nial.brq.redhat.com> In-Reply-To: <024701d0a1cf$15092f10$3f1b8d30$@samsung.com> References: <1433436037-5476-1-git-send-email-shlomopongratz@gmail.com> <1433436037-5476-2-git-send-email-shlomopongratz@gmail.com> <01ca01d0a1bf$ca206310$5e612930$@samsung.com> <024701d0a1cf$15092f10$3f1b8d30$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC V3 1/4] Use Aff1 with mpidr This is an improved and KVM-aware alternative to List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: 'Peter Maydell' , 'Eric Auger' , 'Shlomo Pongratz' , 'Shlomo Pongratz' , 'QEMU Developers' , 'Shannon Zhao' , 'Ashok Kumar' On Mon, 08 Jun 2015 12:39:56 +0300 Pavel Fedin wrote: > Hello! > > > > I thought about it when i developed this, but in my implementation > > > affinity bits are assigned during CPU instantiation, while feature > > > bits can be added later, during realize. I could tweak set_feature() > > > to sync up MPIDR value but perhaps it isn't the best thing to do. > > > > Can we not just assign the whole thing at realize? > > kvm_arch_init_vcpu() is called before realize, therefore i would have to track down whether KVM is active or not. that's because call flow looks wrong. If KVM would be fixed to use QEMU's mpidr then you can like x86 target 1. create vcpu 2. set mpidr property on it from board code 3. call cpu.realize() -> which will push mpidr to KVM > > > You need to fix the 32-bit side anyway. > > Actually already done in my working tree. > > > I still think that having the whole mpidr in the struct will > > be less confusing. > > Ok, if you are really insisting on that, i can assign IDs where this is currently done and add feature bits in arm_cpu_realizefn(). > Last argument: the rest of qemu code (property assignment, lookup in PSCI, etc) actually needs IDs without feature bits. The only function which needs full version is mpidr_read(). So does it still worth of putting AND with bitmasks everywhere? May be just rename 'mpidr' to something like 'mp_id' ? > > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia >