[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
- [Qemu-devel] [PATCH 0/5] TCG support for XSAVE and PKE, Paolo Bonzini, 2016/02/09
- [Qemu-devel] [PATCH 1/5] target-i386: Split fxsave/fxrstor implementation, Paolo Bonzini, 2016/02/09
- [Qemu-devel] [PATCH 4/5] target-i386: Implement XSAVEOPT, Paolo Bonzini, 2016/02/09
- [Qemu-devel] [PATCH 2/5] target-i386: Rearrange processing of 0F 01, Paolo Bonzini, 2016/02/09
- [Qemu-devel] [PATCH 3/5] target-i386: Add XSAVE extension, Paolo Bonzini, 2016/02/09
- [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG, Paolo Bonzini, 2016/02/09
- Re: [Qemu-devel] [PATCH 0/5] TCG support for XSAVE and PKE, Richard Henderson, 2016/02/09