From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG. Date: Sat, 01 Sep 2012 02:16:57 -0700 Message-ID: <5041D289.60307@redhat.com> References: <877gsia8rm.fsf@rustcorp.com.au> <87pq6a8toa.fsf@rustcorp.com.au> <87pq69sgnk.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Peter Maydell , Christoffer Dall , Alexander Graf , kvmarm@lists.cs.columbia.edu, kvm-devel To: Rusty Russell Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950Ab2IAJRI (ORCPT ); Sat, 1 Sep 2012 05:17:08 -0400 In-Reply-To: <87pq69sgnk.fsf@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: On 08/29/2012 11:21 AM, Rusty Russell wrote: > >> + /* Coprocessor 0 means we want a core register. */ > >> + if ((u32)reg->id >> KVM_REG_ARM_COPROC_START == 0) > >> + return set_core_reg(vcpu, reg); > > > > ...but if we do go this path, you can't use coprocessor 0 > > to mean core register -- cp0 could be a valid coprocessor > > (the ARM ARM reserves cp0..cp7 for "vendor specific features"). > > Use something outside 0..15. > > OK, changed that too (16). > > And tomorrow they will add 16. Have the first byte say where the state belongs (core or coprocessor) second byte refer to the register family (if applicable), the rest identifies the register within that family. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.