From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196AbcFQFUz (ORCPT ); Fri, 17 Jun 2016 01:20:55 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:52247 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbcFQFUy (ORCPT ); Fri, 17 Jun 2016 01:20:54 -0400 Date: Fri, 17 Jun 2016 01:20:52 -0400 (EDT) From: Paolo Bonzini To: Bandan Das Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rkrcmar@redhat.com Message-ID: <1519378340.23544916.1466140852622.JavaMail.zimbra@redhat.com> In-Reply-To: References: <1466065297-4644-1-git-send-email-pbonzini@redhat.com> <1466065297-4644-3-git-send-email-pbonzini@redhat.com> Subject: Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.164.1, 10.5.101.130] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF47 (Linux)/8.0.6_GA_5922) Thread-Topic: x86: use __kvm_guest_exit Thread-Index: 9/OsGPTXl99LJBvBwgi/4TDve833Ag== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > static bool vmx_has_high_real_mode_segbase(void) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index 7e3041ef050f..cc741b68139c 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -6706,21 +6706,13 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) > > > > kvm_put_guest_xcr0(vcpu); > > > > - /* Interrupt is enabled by handle_external_intr() */ > > kvm_x86_ops->handle_external_intr(vcpu); > > > > ++vcpu->stat.exits; > > > > - /* > > - * We must have an instruction between local_irq_enable() and > > - * kvm_guest_exit(), so the timer interrupt isn't delayed by > > - * the interrupt shadow. The stat.exits increment will do nicely. > > - * But we need to prevent reordering, hence this barrier(): > > - */ > > - barrier(); > > - > > - kvm_guest_exit(); > > + __kvm_guest_exit(); > > kvm_guest_exit has no more callers and so can be removed. ARM and PPC call it. Paolo