From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjkai-0004hi-Bg for qemu-devel@nongnu.org; Mon, 12 May 2014 03:24:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wjkac-000315-9z for qemu-devel@nongnu.org; Mon, 12 May 2014 03:24:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46411 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjkac-00030v-47 for qemu-devel@nongnu.org; Mon, 12 May 2014 03:23:58 -0400 Message-ID: <5370770C.4020203@suse.de> Date: Mon, 12 May 2014 09:23:56 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1399041202-26184-1-git-send-email-pbonzini@redhat.com> <1399041202-26184-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1399041202-26184-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Am 02.05.2014 16:33, schrieb Paolo Bonzini: > Most MSRs, plus the FPU, MMX, MXCSR, XMM and YMM registers should not > be zeroed on INIT (Table 9-1 in the Intel SDM). Copy them out of > CPUX86State and back in, instead of special casing env->pat. >=20 > The relevant fields are already consecutive except PAT and SMBASE. > However: >=20 > - KVM and Hyper-V MSRs should be reset because they include memory > locations written by the hypervisor. These MSRs are moved together > at the end of the preserved area. >=20 > - SVM state can be moved out of the way since it is written by VMRUN. >=20 > Cc: Andreas F=C3=A4rber > Signed-off-by: Paolo Bonzini > --- > target-i386/cpu.c | 3 +-- > target-i386/cpu.h | 42 ++++++++++++++++++++++++++---------------- > target-i386/helper.c | 10 ++++++++-- > 3 files changed, 35 insertions(+), 20 deletions(-) Fine with me. You might as well use a third marker for zeroed-on-reset to avoid the pat -> cpuid_level change. If we want to widen this pattern, a macro might make sense. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg