From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOTGZ-0000Ol-KI for qemu-devel@nongnu.org; Thu, 19 Feb 2015 10:43:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOTGV-0005mQ-OJ for qemu-devel@nongnu.org; Thu, 19 Feb 2015 10:43:51 -0500 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:41745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOTGV-0005lV-Gk for qemu-devel@nongnu.org; Thu, 19 Feb 2015 10:43:47 -0500 Received: by pdno5 with SMTP id o5so477956pdn.8 for ; Thu, 19 Feb 2015 07:43:46 -0800 (PST) Sender: Richard Henderson Message-ID: <54E604AD.8070602@twiddle.net> Date: Thu, 19 Feb 2015 07:43:41 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1424271115-7885-1-git-send-email-leon.alrae@imgtec.com> <1424271115-7885-3-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1424271115-7885-3-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: add missing MSA and correct FP in VMState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, macro@linux-mips.org, aurelien@aurel32.net, quintela@redhat.com On 02/18/2015 06:51 AM, Leon Alrae wrote: > static VMStateField vmstate_fpu_fields[] = { > VMSTATE_FPR_ARRAY(fpr, CPUMIPSFPUContext, 32), > - VMSTATE_INT8(fp_status.float_detect_tininess, CPUMIPSFPUContext), > + VMSTATE_UINT8(fp_status.flush_to_zero, CPUMIPSFPUContext), > VMSTATE_INT8(fp_status.float_rounding_mode, CPUMIPSFPUContext), > VMSTATE_INT8(fp_status.float_exception_flags, CPUMIPSFPUContext), > VMSTATE_UINT32(fcr0, CPUMIPSFPUContext), > @@ -70,6 +78,11 @@ static VMStateField vmstate_tc_fields[] = { > VMSTATE_UINTTL(CP0_TCScheFBack, TCState), > VMSTATE_INT32(CP0_Debug_tcstatus, TCState), > VMSTATE_UINTTL(CP0_UserLocal, TCState), > + VMSTATE_INT32(msacsr, TCState), > + VMSTATE_INT8(msa_fp_status.float_rounding_mode, TCState), > + VMSTATE_INT8(msa_fp_status.float_exception_flags, TCState), > + VMSTATE_UINT8(msa_fp_status.flush_to_zero, TCState), > + VMSTATE_UINT8(msa_fp_status.flush_inputs_to_zero, TCState), > VMSTATE_END_OF_LIST() > }; Surely these fp_status fields are simply implementation of the architectural CSR registers? IMO you shouldn't store things related to TCG state, but always how the architecture represents it. That way you're free to change the TCG implementation without breaking save/restore. r~