From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnWjO-0002Vv-TC for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:05:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnWjK-0008Ub-PX for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:05:58 -0400 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]:36544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnWjK-0008U5-LJ for qemu-devel@nongnu.org; Fri, 23 Sep 2016 16:05:54 -0400 Received: by mail-io0-x242.google.com with SMTP id z135so7782167ioe.3 for ; Fri, 23 Sep 2016 13:05:54 -0700 (PDT) Sender: Richard Henderson References: <1474659936-978-1-git-send-email-ehabkost@redhat.com> <1474659936-978-4-git-send-email-ehabkost@redhat.com> From: Richard Henderson Message-ID: <7523e10c-ad1d-fa82-bd0e-ff9f58734658@twiddle.net> Date: Fri, 23 Sep 2016 13:05:51 -0700 MIME-Version: 1.0 In-Reply-To: <1474659936-978-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/7] target-i386: xsave: Calculate enabled components only once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Paolo Bonzini , Igor Mammedov On 09/23/2016 12:45 PM, Eduardo Habkost wrote: > Instead of checking both env->features and ena_mask at two > different places in the CPUID code, initialize ena_mask based on > the features that are enabled for the CPU, and then clear > unsupported bits based on kvm_arch_get_supported_cpuid(). > > The results should be exactly the same, but it will make it > easier to move the mask calculation elsewhare, and reuse > x86_cpu_filter_features() for the kvm_arch_get_supported_cpuid() > check. > > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 26 ++++++++++++++++---------- > 1 file changed, 16 insertions(+), 10 deletions(-) Reviewed-by: Richard Henderson r~