From: Yang Zhang <yang.zhang.wz@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"rkrcmar@redhat.com" <rkrcmar@redhat.com>
Subject: Re: [PATCH] KVM: x86: no need to check CPL for XSETBV on VMX
Date: Fri, 15 Apr 2016 19:23:05 +0800 [thread overview]
Message-ID: <5710CF19.9020001@gmail.com> (raw)
In-Reply-To: <5710CA78.3000002@redhat.com>
On 2016/4/15 19:03, Paolo Bonzini wrote:
>
>
> On 15/04/2016 12:55, Yang Zhang wrote:
>>>
>>>>> I don't think this is performance-sensitive, hence it's simpler to keep
>>>>> the code as simple as possible. For example, if one added XSETBV
>>>>> support to the emulator, your patch would introduce a bug.
>>>>
>>>> In what case we need to decode XSETBV?
>>>
>>> The emulator can be a way to unify code between vmx and svm. It is an
>>> alternative to writing small wrapper functions such as kvm_set_xcr.
>>
>> I still think the correctness is important.
>
> What correctness? You said "the CPL check is done by hardware on VMX".
> Doing the check twice is not incorrect.
Yes, you are right. It cannot be considered as correctness issue.
>
> Unifying code between VMX and SVM is exactly useful because it makes it
> easier to have correct code.
>
> Paolo
>
--
best regards
yang
prev parent reply other threads:[~2016-04-15 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 1:55 [PATCH] KVM: x86: no need to check CPL for XSETBV on VMX Yang Zhang
2016-04-15 10:11 ` Paolo Bonzini
2016-04-15 10:37 ` Yang Zhang
2016-04-15 10:43 ` Paolo Bonzini
2016-04-15 10:55 ` Yang Zhang
2016-04-15 11:03 ` Paolo Bonzini
2016-04-15 11:23 ` Yang Zhang [this message]
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=5710CF19.9020001@gmail.com \
--to=yang.zhang.wz@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/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.