From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Maydell Subject: Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG. Date: Wed, 29 Aug 2012 16:36:52 +0100 Message-ID: References: <877gsia8rm.fsf@rustcorp.com.au> <87pq6a8toa.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Avi Kivity , Christoffer Dall , Alexander Graf , kvmarm@lists.cs.columbia.edu, kvm-devel To: Rusty Russell Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:59619 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658Ab2H2Pgw (ORCPT ); Wed, 29 Aug 2012 11:36:52 -0400 Received: by ialo24 with SMTP id o24so1315209ial.19 for ; Wed, 29 Aug 2012 08:36:52 -0700 (PDT) In-Reply-To: <87pq6a8toa.fsf@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: On 29 August 2012 00:48, Rusty Russell wrote: > No structures at all any more. I'm not fussed whether we use structs for the core regs or not; they're not exactly going to change in future so it's purely a question of whether you think it's aesthetically prettier to have everything funneled through the one ioctl. > + /* 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. -- PMM