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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html