Received: from eggs.gnu.org ([2001:4830:134:3::10]:39377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJR7K-0000lP-85 for qemu-devel@nongnu.org; Sat, 02 Jul 2016 16:02:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJR7G-0000eb-4C for qemu-devel@nongnu.org; Sat, 02 Jul 2016 16:02:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJR7F-0000eX-Um for qemu-devel@nongnu.org; Sat, 02 Jul 2016 16:02:14 -0400 Date: Sat, 2 Jul 2016 17:02:10 -0300 From: Eduardo Habkost Message-ID: <20160702200210.GL4620@thinpad.lan.raisama.net> References: <1467477871-11331-1-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467477871-11331-1-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH] target-i386: Use struct X86XSaveArea in fpu_helper.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Sat, Jul 02, 2016 at 09:44:31AM -0700, Richard Henderson wrote: [...] > @@ -1402,9 +1409,8 @@ void helper_xrstor(CPUX86State *env, target_ulong ptr, uint64_t rfbm) > } > > /* The XCOMP field must be zero. */ > - xcomp_bv0 = cpu_ldq_data_ra(env, ptr + 520, ra); > - xcomp_bv1 = cpu_ldq_data_ra(env, ptr + 528, ra); > - if (xcomp_bv0 || xcomp_bv1) { > + xcomp_bv = cpu_ldq_data_ra(env, ptr + XO(header.xcomp_bv), ra); > + if (xcomp_bv) { > raise_exception_ra(env, EXCP0D_GPF, ra); You are changing the code to not check bytes 528-535 (bytes 16:23 of the XSAVE header) anymore, but Intel SDM says XRSTOR raises #GP "If the standard form is executed and bytes 23:8 of the XSAVE header are not all zero." -- Eduardo