From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757404AbbCCQwM (ORCPT ); Tue, 3 Mar 2015 11:52:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41928 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755628AbbCCQwJ (ORCPT ); Tue, 3 Mar 2015 11:52:09 -0500 Date: Tue, 3 Mar 2015 17:51:42 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Joel Schopp Cc: Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org, Joerg Roedel , Borislav Petkov , linux-kernel@vger.kernel.org, David Kaplan Subject: Re: [PATCH v3 1/2] kvm: x86: make kvm_emulate_* consistant Message-ID: <20150303165142.GE25123@potion.brq.redhat.com> References: <20150302193943.2121.60575.stgit@joelvmguard2.amd.com> <20150302194331.2121.28466.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: <20150302194331.2121.28466.stgit@joelvmguard2.amd.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-03-02 13:43-0600, Joel Schopp: > Currently kvm_emulate() skips the instruction but kvm_emulate_* sometimes > don't. The end reult is the caller ends up doing the skip themselves. > Let's make them consistant. > > Signed-off-by: Joel Schopp > --- Reviewed-by: Radim Krčmář > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > @@ -4723,11 +4723,19 @@ int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu) > wbinvd(); > return X86EMUL_CONTINUE; > } > + > +int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu) > +{ > + kvm_x86_ops->skip_emulated_instruction(vcpu); > + return kvm_emulate_wbinvd_noskip(vcpu); > +} > EXPORT_SYMBOL_GPL(kvm_emulate_wbinvd); > > + > + (sneaky newlines) > static void emulator_wbinvd(struct x86_emulate_ctxt *ctxt) > { > - kvm_emulate_wbinvd(emul_to_vcpu(ctxt)); > + kvm_emulate_wbinvd_noskip(emul_to_vcpu(ctxt)); > } > > int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned long *dest)