From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnGUP-0001Op-T0 for qemu-devel@nongnu.org; Wed, 21 May 2014 20:04:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnGUJ-00052g-Ki for qemu-devel@nongnu.org; Wed, 21 May 2014 20:04:05 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:39971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnGUJ-00052a-EZ for qemu-devel@nongnu.org; Wed, 21 May 2014 20:03:59 -0400 Received: by mail-wi0-f175.google.com with SMTP id f8so8459913wiw.14 for ; Wed, 21 May 2014 17:03:58 -0700 (PDT) From: James Hogan Date: Thu, 22 May 2014 01:03:55 +0100 Message-ID: <4276173.dYlcVoRku8@radagast> In-Reply-To: <1400264014-78911-3-git-send-email-petar.jovanovic@rt-rk.com> References: <1400264014-78911-1-git-send-email-petar.jovanovic@rt-rk.com> <1400264014-78911-3-git-send-email-petar.jovanovic@rt-rk.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Petar Jovanovic , aurelien@aurel32.net, petar.jovanovic@imgtec.com Hi Petar, On Friday 16 May 2014 20:13:34 Petar Jovanovic wrote: > From: Petar Jovanovic > > From MIPS documentation (Volume III): > > UserLocal Register (CP0 Register 4, Select 2) > Compliance Level: Recommended. > > The UserLocal register is a read-write register that is not interpreted by > the hardware and conditionally readable via the RDHWR instruction. > > This register only exists if the Config3-ULRI register field is set. > > Privileged software may write this register with arbitrary information and > make it accessable to unprivileged software via register 29 (ULR) of the > RDHWR instruction. To do so, bit 29 of the HWREna register must be set to a > 1 to enable unprivileged access to the register. > > Signed-off-by: Petar Jovanovic > --- > target-mips/cpu.h | 2 ++ > target-mips/helper.h | 1 + > target-mips/op_helper.c | 20 +++++++++++++++++++- > target-mips/translate.c | 43 +++++++++++++++++++++++++++++++++++++++++-- > 4 files changed, 63 insertions(+), 3 deletions(-) I think you need to add it to cpu_save/cpu_load in target-mips/machine.c too, otherwise snapshotting and live migration may break. Cheers James