From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: no need to check CPL for XSETBV on VMX Date: Fri, 15 Apr 2016 12:43:39 +0200 Message-ID: <5710C5DB.1040800@redhat.com> References: <57104A23.4070405@gmail.com> <5710BE49.4000702@redhat.com> <5710C463.4080308@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Yang Zhang , "kvm@vger.kernel.org" , "rkrcmar@redhat.com" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39765 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbcDOKnr (ORCPT ); Fri, 15 Apr 2016 06:43:47 -0400 In-Reply-To: <5710C463.4080308@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 15/04/2016 12:37, 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. Thanks, Paolo