From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH v3 1/2] kvm: x86: make kvm_emulate_* consistant Date: Tue, 3 Mar 2015 17:51:42 +0100 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-Transfer-Encoding: QUOTED-PRINTABLE Cc: Gleb Natapov , Paolo Bonzini , kvm@vger.kernel.org, Joerg Roedel , Borislav Petkov , linux-kernel@vger.kernel.org, David Kaplan To: Joel Schopp Return-path: 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 Content-Disposition: inline In-Reply-To: <20150302194331.2121.28466.stgit@joelvmguard2.amd.com> Sender: kvm-owner@vger.kernel.org List-ID: 2015-03-02 13:43-0600, Joel Schopp: > Currently kvm_emulate() skips the instruction but kvm_emulate_* somet= imes > don't. The end reult is the caller ends up doing the skip themselves= =2E > Let's make them consistant. >=20 > Signed-off-by: Joel Schopp > --- Reviewed-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > 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); > =20 > + > + (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)); > } > =20 > int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned = long *dest)