From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH 00/15] Move vcpu_load and vcpu_put calls to arch code Date: Sun, 26 Nov 2017 10:11:08 +0100 Message-ID: <20171126091108.GI28855@cbox> References: <20171125205718.7731-1-christoffer.dall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 846E849D6C for ; Sun, 26 Nov 2017 04:08:16 -0500 (EST) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 57a1RhbHxCWs for ; Sun, 26 Nov 2017 04:08:15 -0500 (EST) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id B057249D66 for ; Sun, 26 Nov 2017 04:08:15 -0500 (EST) Received: by mail-wr0-f194.google.com with SMTP id z75so22329488wrc.5 for ; Sun, 26 Nov 2017 01:11:01 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171125205718.7731-1-christoffer.dall@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Christoffer Dall Cc: linux-mips@linux-mips.org, kvm@vger.kernel.org, Marc Zyngier , James Hogan , Cornelia Huck , kvm-ppc@vger.kernel.org, Christian Borntraeger , Alexander Graf , Paolo Bonzini , linux-s390@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On Sat, Nov 25, 2017 at 09:57:03PM +0100, Christoffer Dall wrote: > Some architectures may decide to do different things during > kvm_arch_vcpu_load depending on the ioctl being executed. For example, > arm64 is about to do significant work in vcpu load/put when running a > vcpu, but it's problematic to do this for any other vcpu ioctl than > KVM_RUN. > > Further, while it may be possible to call kvm_arch_vcpu_load() for a > number of non-KVM_RUN ioctls, it makes the KVM/ARM code more difficult > to reason about, especially after my optimization series, because a lot > of things can now happen, where we have to consider if we're really in > the process of running a vcpu or not. > > This series will first move the vcpu_load() and vcpu_put() calls in the > arch generic dispatch function into each case of the switch statement > and then, one-by-one, pushed the calls down into the architecture > specific code making the changes for each ioctl as required. > And the patches are also available at: git://git.kernel.org/pub/scm/linux/kernel/git/cdall/linux.git vcpu-load-put Thanks, -Christoffer