qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG
Date: Wed, 17 Feb 2016 11:33:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0


On 09/02/2016 19:13, Richard Henderson wrote:
>>
>> +{
>> +    if ((env->cr[4] & CR4_PKE_MASK) == 0) {
>> +        raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
>> +        return;
>> +    }
> 
> The document I have says #GP for this case, not #UD.

The text says #GP, the "Protected Mode Exceptions" section says #UD. :(

I think #UD is more likely, as it's similar to XSAVE.

> If you make the change to return a 64-bit value, this would look like
> 
>   gen_helper_rdpkru(cpu_tmp1_i64, cpu_env);
>   tcg_gen_extr_i64_tl(cpu_regs[REG_EAX], cpu_regs[REG_EDX], cpu_tmp1_i64); 

Yup, I can steal all that's needed from xgetbv and xsetbv.

Paolo



reply via email to

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