qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-i386: Use struct X86XSaveArea in fpu_hel


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] target-i386: Use struct X86XSaveArea in fpu_helper.c
Date: Sat, 2 Jul 2016 16:45:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 07/02/2016 01:02 PM, Eduardo Habkost wrote:
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."

Hmm. I must have an out-of-date version here, since mine just mentions the first 8 bytes, and I thought the current definition of X86XSaveHeader backed that up.

I can certainly modify the structure...


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]