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

Re: [Xen-devel] [PATCH v5 05/14] x86/HVM: eliminate custom #MF/#XM handling



>>> On 22.03.18 at 15:12, <roger.pau@xxxxxxxxxx> wrote:
> On Thu, Mar 15, 2018 at 07:06:36AM -0600, Jan Beulich wrote:
>> @@ -8478,7 +8411,8 @@ x86_emulate(
>>      }
>>  
>>   complete_insn: /* Commit shadow register state. */
>> -    put_fpu(&fic, false, state, ctxt, ops);
>> +    put_fpu(fpu_type, false, state, ctxt, ops);
>> +    fpu_type = X86EMUL_FPU_none;
>>  
>>      /* Zero the upper 32 bits of %rip if not in 64-bit mode. */
>>      if ( !mode_64bit() )
>> @@ -8502,13 +8436,22 @@ x86_emulate(
>>      ctxt->regs->eflags &= ~X86_EFLAGS_RF;
>>  
>>   done:
>> -    put_fpu(&fic, fic.insn_bytes > 0 && dst.type == OP_MEM, state, ctxt, 
>> ops);
>> +    put_fpu(fpu_type, insn_bytes > 0 && dst.type == OP_MEM, state, ctxt, 
>> ops);
>>      put_stub(stub);
>>      return rc;
>>  #undef state
>>  
>>  #ifdef __XEN__
>>   emulation_stub_failure:
>> +    generate_exception_if(stub_exn.info.fields.trapnr == EXC_MF, EXC_MF);
>> +    if ( stub_exn.info.fields.trapnr == EXC_XM )
>> +    {
>> +        unsigned long cr4;
>> +
>> +        if ( !ops->read_cr || !ops->read_cr(4, &cr4, ctxt) == X86EMUL_OKAY )
> 
> Is the second expression in the above line missing parentheses:
> 
> if ( !ops->read_cr || !(ops->read_cr(4, &cr4, ctxt) == X86EMUL_OKAY) )
> 
> Or should this be:
> 
> if ( !ops->read_cr || ops->read_cr(4, &cr4, ctxt) != X86EMUL_OKAY )

Oops, yes indeed, the latter. Thanks for the report.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.