From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG
Date: Wed, 17 Feb 2016 11:33:54 +0100 [thread overview]
Message-ID: <56C44C92.7070104@redhat.com> (raw)
In-Reply-To: <56BA2C59.5040900@twiddle.net>
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
next prev parent reply other threads:[~2016-02-17 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 17:13 [Qemu-devel] [PATCH 0/5] TCG support for XSAVE and PKE Paolo Bonzini
2016-02-09 17:13 ` [Qemu-devel] [PATCH 1/5] target-i386: Split fxsave/fxrstor implementation Paolo Bonzini
2016-02-09 17:13 ` [Qemu-devel] [PATCH 2/5] target-i386: Rearrange processing of 0F 01 Paolo Bonzini
2016-02-09 17:13 ` [Qemu-devel] [PATCH 3/5] target-i386: Add XSAVE extension Paolo Bonzini
2016-02-09 17:13 ` [Qemu-devel] [PATCH 4/5] target-i386: Implement XSAVEOPT Paolo Bonzini
2016-02-09 17:13 ` [Qemu-devel] [PATCH 5/5] target-i386: implement PKE for TCG Paolo Bonzini
2016-02-09 18:13 ` Richard Henderson
2016-02-17 10:33 ` Paolo Bonzini [this message]
2016-02-09 17:43 ` [Qemu-devel] [PATCH 0/5] TCG support for XSAVE and PKE Richard Henderson
2016-02-09 18:14 ` Paolo Bonzini
2016-02-09 18:25 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C44C92.7070104@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.