From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbcGNMyi (ORCPT ); Thu, 14 Jul 2016 08:54:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42280 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbcGNMyf (ORCPT ); Thu, 14 Jul 2016 08:54:35 -0400 Subject: Re: [RFC PATCH 4/4] KVM: vmx: add support for emulating UMIP To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1468351223-3250-1-git-send-email-pbonzini@redhat.com> <1468351223-3250-5-git-send-email-pbonzini@redhat.com> <20160713203006.GB16130@potion> <402de949-31fb-1733-9479-4803fce7de93@redhat.com> <20160714123621.GC16130@potion> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org From: Paolo Bonzini Message-ID: <80ed82a4-ed4e-9eb6-5530-9b621a5c11a6@redhat.com> Date: Thu, 14 Jul 2016 14:54:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160714123621.GC16130@potion> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 14 Jul 2016 12:54:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/07/2016 14:36, Radim Krčmář wrote: >>> And we could then return true in vmx_umip_emulated() when >>> boot_cpu_has(X86_FEATURE_UMIP). >>> (Just for self-documentation, because occurrence of X86_FEATURE_UMIP is >>> most likely a subset of SECONDARY_EXEC_DESC.) >> >> This is not necessary because this is how KVM computes >> CPUID[EAX=7,EBX=0].ECX: >> >> unsigned f_umip = kvm_x86_ops->umip_emulated() ? F(UMIP) : 0; >> ... >> const u32 kvm_cpuid_7_0_ecx_x86_features = F(PKU) | F(UMIP); > > and that too, I'm really sorry for the review. At least in the latter case, that says something about the code quality too. Paolo