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: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] target-i386: Use struct X86XSaveArea in fpu_helper.c
Date: Sat, 2 Jul 2016 17:02:10 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

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



reply via email to

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