From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422733AbcFHMRC (ORCPT ); Wed, 8 Jun 2016 08:17:02 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33367 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161396AbcFHMRA (ORCPT ); Wed, 8 Jun 2016 08:17:00 -0400 Date: Wed, 8 Jun 2016 14:16:55 +0200 From: Ingo Molnar To: Paolo Bonzini Cc: Andy Lutomirski , Thomas Gleixner , "linux-kernel@vger.kernel.org" , Ingo Molnar , "H. Peter Anvin" , X86 ML , Rik van Riel , Peter Zijlstra Subject: Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore Message-ID: <20160608121655.GA11355@gmail.com> References: <1464611414-12379-1-git-send-email-pbonzini@redhat.com> <1464611414-12379-2-git-send-email-pbonzini@redhat.com> <0e02e304-a226-a35c-1109-25a35d4eae67@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0e02e304-a226-a35c-1109-25a35d4eae67@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Paolo Bonzini wrote: > > > On 04/06/2016 07:07, Andy Lutomirski wrote: > > On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: > >> > >> Thanks to all the work that was done by Andy Lutomirski and others, > >> enter_from_user_mode and prepare_exit_to_usermode are now called only with > >> interrupts disabled. Let's provide them a version of user_enter/user_exit > >> that skips saving and restoring the interrupt flag. > > > >> +/* Called with interrupts disabled. */ > >> +static inline void __user_enter(void) > >> +{ > >> + if (context_tracking_is_enabled()) > >> + __context_tracking_enter(CONTEXT_USER); > >> + > >> +} > > > > Would user_enter_irqs_off be a better name? > > I'm just mimicking __context_tracking_enter and vs. > context_tracking_enter. So it is at least consistent with those functions. > > The guest ones are not quite as consistent. I can fix that later, > there's no reason also to have guest context tracking split between > include/linux/context_tracking.h and include/linux/kvm_host.h. Could we please first do the cleanups before complicating the code and applying more substantial changes? Doing cleanups first makes it easier to review the substantial patches as well, so it's a win-win. Thanks, Ingo