Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1769458ybh; Thu, 23 Jul 2020 17:56:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYP+doA0t/jsV1KCrkWAOOPMmlwNucXIIeJgu9ntl5+5QldaldRJL7s/YuEEzZD1bZoXaQ X-Received: by 2002:a17:906:3e54:: with SMTP id t20mr6743700eji.471.1595552178905; Thu, 23 Jul 2020 17:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595552178; cv=none; d=google.com; s=arc-20160816; b=MNKjf/XgWS0MvyEqfZVZ5LDzbAhPvix2baG+FIb5YdAVKWFWpI8x7fyfoVql+SAsYL AeMd46ZzFucf0UMQtUVYzrJ0XUvVBOw/95bdX9lnP6ptDCZAkVOyMr3ZBX+iF24ZFEKo OiM0GZqnmgLXMrdp9UAmSxKtXX9XfjC3ifDg2qwMd+kMeORnoRVpohtNCZ927rFsl0al ST6dtHkPQ8msrpe4WWhqir1mfb6wBArRTpM/4qcnJKDMcDSW4V5HTbT87jUyn9HZ6Fe7 Gz7WXI3+uHEjH1pTOw6flIg4uxOylIVoXDNL/zGU/X4F7I5zr+zxYm9abs3xI3VBBZQR 5Gfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=Xt6StyeTXrTHTB++PMPJJkCAEqDicmbOIsVMrguWiBE=; b=N7OEso3LC86sSRN/FfLrKMUH/3a533M9Lv6YnbIvDT659+3a5zpD2Y/PL7V4ihhG29 srpzE4ZOJRYMq31vRJd3U/kO/L4EPDbr2lLpnKUuYEDgn7wzSy6/SbrdLOPXg6YaptXj SZkcNJhyxCnA3xQc+zfuDyR941dSQlxVRSi41JZedmSVMu5G9+J72kjX07X7pz+D+A0e xXUZzEsjdwS8PgscC/N3g/RqGnPmLputpAO1Q0OdzOI6s0+s6Bd2awK7h6kE8OcQ5n0s EJTILOVnNV6fteP5Ocapy4oNcBvbwh7RFt8sxAEE9DTxmux75PY7RttldFlSeZP056GT vTEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si2776831ejr.664.2020.07.23.17.55.55; Thu, 23 Jul 2020 17:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728434AbgGXAzs (ORCPT + 99 others); Thu, 23 Jul 2020 20:55:48 -0400 Received: from mga04.intel.com ([192.55.52.120]:60096 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728413AbgGXAzr (ORCPT ); Thu, 23 Jul 2020 20:55:47 -0400 IronPort-SDR: 8mgsDcFf1Rjhs12yF9VLGlYUw2Hi+n4ANDOkbIjRcrNXcWfcts7RClCdngdvtkI1ohrKnK72Z5 YqC3TmUAhIiA== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="148135029" X-IronPort-AV: E=Sophos;i="5.75,388,1589266800"; d="scan'208";a="148135029" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 17:55:47 -0700 IronPort-SDR: qTxdZ5wR1udQ71TCjEpfT8A32uEqdelvgA9a4q/SttokEKqsJ23MyjygcYN29bchiquhTudin6 yoBtw421rm4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,388,1589266800"; d="scan'208";a="288829366" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga006.jf.intel.com with ESMTP; 23 Jul 2020 17:55:46 -0700 Date: Thu, 23 Jul 2020 17:55:46 -0700 From: Sean Christopherson To: Thomas Gleixner Cc: LKML , x86@kernel.org, linux-arch@vger.kernel.org, Will Deacon , Arnd Bergmann , Mark Rutland , Kees Cook , Keno Fischer , Paolo Bonzini , kvm@vger.kernel.org, Gabriel Krisman Bertazi Subject: Re: [patch V5 15/15] x86/kvm: Use generic xfer to guest work function Message-ID: <20200724005546.GL21891@linux.intel.com> References: <20200722215954.464281930@linutronix.de> <20200722220520.979724969@linutronix.de> <20200724001736.GK21891@linux.intel.com> <87eep1vixp.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eep1vixp.fsf@nanos.tec.linutronix.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 02:46:26AM +0200, Thomas Gleixner wrote: > Sean, > > Sean Christopherson writes: > > On Thu, Jul 23, 2020 at 12:00:09AM +0200, Thomas Gleixner wrote: > >> + if (xfer_to_guest_mode_work_pending()) { > >> srcu_read_unlock(&kvm->srcu, vcpu->srcu_idx); > >> - cond_resched(); > >> + r = xfer_to_guest_mode(vcpu); > > > > Any reason not to call this xfer_to_guest_mode_work()? Or handle_work(), > > do_work(), etc... Without the "work" part, it looks like a function that > > should be invoked unconditionally. It's obvious that's not the case if > > one looks at the implementation, but it's a bit confusing on the KVM side > > of things. > > The reason is probably lazyness. The original approach was to have this > as close as possible to user entry/exit but with the recent changes > vs. instrumentation and RCU this is not longer the case. > > I really want to keep the notion of transitioning in the function name, > so xfer_to_guest_mode_handle_work() makes a lot of sense. > > I'll change that before merging the lot into the tip tree if your > Reviewed-by still stands with that change made w/o reposting. Ya, works for me.