From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754756AbbCBTF6 (ORCPT ); Mon, 2 Mar 2015 14:05:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753994AbbCBTF5 (ORCPT ); Mon, 2 Mar 2015 14:05:57 -0500 Date: Mon, 2 Mar 2015 20:05:34 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Joel Schopp Cc: Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org, David Kaplan , Joerg Roedel , linux-kernel@vger.kernel.org, Borislav Petkov Subject: Re: [PATCH v2 2/2] x86: svm: make wbinvd faster Message-ID: <20150302190534.GA2494@potion.brq.redhat.com> References: <20150302180030.25137.83460.stgit@joelvmguard2.amd.com> <20150302180446.25137.93897.stgit@joelvmguard2.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150302180446.25137.93897.stgit@joelvmguard2.amd.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-03-02 12:04-0600, Joel Schopp: > From: David Kaplan > No need to re-decode WBINVD since we know what it is from the intercept. > > Signed-off-by: David Kaplan > [extracted from larger unlrelated patch, forward ported, tested] > Signed-off-by: Joel Schopp > --- Reviewed-by: Radim Krčmář > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > @@ -2774,6 +2774,13 @@ static int skinit_interception(struct vcpu_svm *svm) > return 1; > } > > +static int wbinvd_interception(struct vcpu_svm *svm) > +{ > + kvm_emulate_wbinvd(&svm->vcpu); > + return 1; > +} > + > + (Squashing these lines would have been a nice improvement.) > static int xsetbv_interception(struct vcpu_svm *svm) > { > u64 new_bv = kvm_read_edx_eax(&svm->vcpu);