Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758040AbdCUQRA (ORCPT ); Tue, 21 Mar 2017 12:17:00 -0400 Received: from 8bytes.org ([81.169.241.247]:33898 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932698AbdCUQPt (ORCPT ); Tue, 21 Mar 2017 12:15:49 -0400 Date: Tue, 21 Mar 2017 17:16:32 +0100 From: Joerg Roedel To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, "Gabriel L. Somlo" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests Message-ID: <20170321161632.GF29659@8bytes.org> References: <1489612895-12799-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1489612895-12799-1-git-send-email-mst@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 681 Lines: 18 On Wed, Mar 15, 2017 at 11:22:18PM +0200, Michael S. Tsirkin wrote: > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index d1efe2c..18e53bc 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -1198,8 +1198,6 @@ static void init_vmcb(struct vcpu_svm *svm) > set_intercept(svm, INTERCEPT_CLGI); > set_intercept(svm, INTERCEPT_SKINIT); > set_intercept(svm, INTERCEPT_WBINVD); > - set_intercept(svm, INTERCEPT_MONITOR); > - set_intercept(svm, INTERCEPT_MWAIT); Why do you remove the intercepts for AMD? The new kvm_mwait_in_guest() function will always return false on AMD anyway, and on Intel you re-add the intercepts for !kvm_mwait_in_guest(). Joerg