From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754648AbbCBTE4 (ORCPT ); Mon, 2 Mar 2015 14:04:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40856 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674AbbCBTEz (ORCPT ); Mon, 2 Mar 2015 14:04:55 -0500 Date: Mon, 2 Mar 2015 20:04:30 +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 v2 1/2] kvm: x86: make kvm_emulate_* consistant Message-ID: <20150302190430.GC25123@potion.brq.redhat.com> References: <20150302180030.25137.83460.stgit@joelvmguard2.amd.com> <20150302180439.25137.12334.stgit@joelvmguard2.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150302180439.25137.12334.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: > 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 > --- > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > @@ -4995,7 +4995,7 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu, > if (emulate_instruction(vcpu, 0) == EMULATE_DONE) { > if (vcpu->arch.halt_request) { > vcpu->arch.halt_request = 0; > - return kvm_emulate_halt(vcpu); > + return kvm_emulate_halt_noskip(vcpu); noskip is used without being declared ... it shouldn't compile. *_noskip makes the usual case harder to undertand: we just want to halt the vcpu, so name it more directly ... like kvm_vcpu_halt()?