Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp25804ybt; Thu, 9 Jul 2020 14:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ/y2OEneGxEmvW5GczPJQF5OLUB6Pm1KFD4TaTzESEXIFvEBJbt9QsouJyMxeLOYn6DOQ X-Received: by 2002:a17:906:fcab:: with SMTP id qw11mr57761523ejb.456.1594330054188; Thu, 09 Jul 2020 14:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594330054; cv=none; d=google.com; s=arc-20160816; b=H2l9wc8GutJE0IntvDP9xzeiT8Qfwv/6zddixJRexU2LJguuv4ngDZxHmqHLMhfSQi KAyEGgBrrXxcEKQG+2mZ5Lp/nDARUys5ts+yzyZWuxBXmCRk3jGvOdaNoRcgwoO1Ufqh LgOgBr1Bp6bncxFK33OvkplZRNJQ0/QLfht7LaGzpdLAy9jJV8cbcKSUO/p8xQp9XKlN 3X9fXf0lHci1g6zWnRTJcjm9CYwcsIubHyjo5KqGWIb7HZjg+PIomADF2cBYYN7CTuWQ qZethJsZGW3Ayc1S5HMI0bQsC1COQ8vE6EG6EVhzTr4+oT4T8GUKzIazORQXAZc4gFaJ +nkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=6R1QSdDZDgiNDTTjQqX53MauvTJGA+Q4gBie5geFf/Y=; b=EngCYKNZHjg9b9kh/1ss8xeshYW9XAZOzybv48Q/r7jJ39LwX/vtEwKm3nL3vbjxrl e2XzCyGtvPbQPT9L6Dp1VYPLhymn3VkQAbwOfvUM93DkX3Lv2iU0AmQGWXJzYwEkuYsV 7ymejDNAOnDp+2Ihl+NNyhYIzp3B13wYCL3tkITMNG8WINuaHT+BAI2+wkBe72lnXb46 MPQ6hQ+zTE+ISYMIeHx7da3T3lGbnGb0auGEeOs7CpnGOAr9fKJfGkgFqnDXY/MxJwiB IRjwSs5wNMsu6OIJDATC2vzygzjHAyVHM6cK7hzceLUs+kbVzIw1Z5+tXtW2AKQJ8VS1 YPAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si2520562edy.549.2020.07.09.14.27.05; Thu, 09 Jul 2020 14:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726299AbgGIV0x (ORCPT + 99 others); Thu, 9 Jul 2020 17:26:53 -0400 Received: from mga11.intel.com ([192.55.52.93]:52705 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgGIV0x (ORCPT ); Thu, 9 Jul 2020 17:26:53 -0400 IronPort-SDR: RYwze7qMB50Fs4FNNkExE8BdVF7+jthc+fD71LUvnXM0qpK3RcHv3wHMsDtCcBhtD21xScNeir tUX7kjzCciXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="146185495" X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="146185495" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 14:26:52 -0700 IronPort-SDR: yVNbM2ZUsYndzEnCr5AKa3WEn4so/S8RBxgYY5QrLH0LHjz+Pg//8LlqJwEqNBe6M1xLvgr89e vYIn9sWFj/3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="484420002" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by fmsmga005.fm.intel.com with ESMTP; 09 Jul 2020 14:26:52 -0700 Date: Thu, 9 Jul 2020 14:26:52 -0700 From: Sean Christopherson To: Peter Xu Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Vitaly Kuznetsov Subject: Re: [PATCH 1/2] KVM: X86: Move ignore_msrs handling upper the stack Message-ID: <20200709212652.GX24919@linux.intel.com> References: <20200625061544.GC2141@linux.intel.com> <1cebc562-89e9-3806-bb3c-771946fc64f3@redhat.com> <20200625162540.GC3437@linux.intel.com> <20200626180732.GB175520@xz-x1> <20200626181820.GG6583@linux.intel.com> <47b90b77-cf03-6087-b25f-fcd2fd313165@redhat.com> <20200630154726.GD7733@linux.intel.com> <20200709182220.GG199122@xz-x1> <20200709192440.GD24919@linux.intel.com> <20200709210919.GI199122@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200709210919.GI199122@xz-x1> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 05:09:19PM -0400, Peter Xu wrote: > Again, using host_initiated or not should be a different issue? Frankly > speaking, I don't know whether it's an issue or not, but it's different from > what this series wants to do, because it'll be the same before/after this > series. Am I right? I'm arguing that the TSX thing should be diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 5eb618dbf211..e1fd5ac0df96 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -1015,7 +1015,7 @@ bool kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, *edx = entry->edx; if (function == 7 && index == 0) { u64 data; - if (!__kvm_get_msr(vcpu, MSR_IA32_TSX_CTRL, &data, true) && + if (!kvm_get_msr(vcpu, MSR_IA32_TSX_CTRL, &data) && (data & TSX_CTRL_CPUID_CLEAR)) *ebx &= ~(F(RTM) | F(HLE)); } At which point hoisting the ignored message up a few levels is pointless because the only users of __kvm_*et_msr() will do the explicit ignored_check. And I'm also arguing that KVM should never use __kvm_get_msr() for its own actions, as host_initiated=true should only be used for host VMM accesses and host_initiated=false actions should go through the proper checks and never get to the ignored_msrs logic (assuming no KVM bug). > Or, please explain what's the "overruled objection" that you're talking about.. Sean: Objection your honor. Paolo: Overruled, you're wrong. Sean: Phooey. My point is that even though I still object to this series, Paolo has final say.