From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933450AbcAYQQi (ORCPT ); Mon, 25 Jan 2016 11:16:38 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:54000 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932678AbcAYQQg (ORCPT ); Mon, 25 Jan 2016 11:16:36 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Marc Zyngier , Catalin Marinas , Will Deacon , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support Date: Mon, 25 Jan 2016 17:15:47 +0100 Message-ID: <2703557.vyWRuMlGU2@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1453737235-16522-1-git-send-email-marc.zyngier@arm.com> References: <1453737235-16522-1-git-send-email-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:5g/aJ05P4xpBhsLxG22ncI3TF59Nh30lPwEL4mGeMKCCwRIIjyI iJePW5kPiEaPSfAco7tX+nOZBoLgs9xbkv2AxXlNe4blcHzH82s9dDkRo5ukZIh/B7b5H1W khMKEQupiS/Znd40QVemAhOZ/mi13UyIGkn9pJis7JbHyCp3CRH5n05NeN5b74wT3KU1GbW VSGqz7iLHwYu6Rg0Bo7YA== X-UI-Out-Filterresults: notjunk:1;V01:K0:8K3CXxumQto=:sj7omRuMGuAjpXxkAi7ORj wNbZClr+VW4TUWC6+JvNlMEAu/qbEoWuYd3tV+X89dduWcW87yIwDhKGHbaD3jURImJWfGDzQ 9phy/jR6oI7g1nzzlFMHQpKyyd1m5chqKRSt/16WaOKGB7pHrzmOnfl1Lw4m6pExvBKDhkSji g5AaGTYs7T26l3xnlgp/AQgdy+0jnmlFnTA7PvR7lWbHRvQ19nqpnv4qgWIbUie903aa8UslD orQqaBOwBtUw8PpYLpObaAUGgCel4iUyCwNvS5wbY4qJ2zKcQUqw3zfo3J91IKRQxBhxl/fN/ kemaSG75ER8KhRg5Z1nbHzBGz4DKH8aMiLXG3pHGT6CJGus2+ddLcR967L6B7xCYh69yfiHjP 4yYAZFAliIHWT1T2XmCG7E092QLCkMS10Dihh22LC0oYJZ/XKTcqZlXrwGUKO/qUFHzV/NNrG iiMfPMLjdS74iGXaAiPzdHQ1SCniPahwpoE93aehSU/HwtrpLPQsk5T3AY2bwSMhsLBA8PHUO x09AvkUafjpkJocdIrrtGSfUMzqeN3AKPT3pwOlaUQI7UKWirrQyk10yjjcZMVuF18mlt+dwY NmuHB7nyNGshv45xJ7wsNCPWEl8yXFfqf0Mpm7Ra41yWAyX2+pqO15Cwczzq9p8nPoaNRFtbV hehdY9BXe/2saH5jU5WsvSvqqYf2mW2epUDGUA/vGAEtqD2J+vovc0uSeaKDMLOTTpnAcCxTk m+NqJx14EP0vmKCc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 25 January 2016 15:53:34 Marc Zyngier wrote: > host and guest, reducing the overhead of virtualization. > > In order to have the same kernel binary running on all versions of the > architecture, this series makes heavy use of runtime code patching. > > The first 20 patches massage the KVM code to deal with VHE and enable > Linux to run at EL2. The last patch catches an ugly case when VHE > capable CPUs are paired with some of their less capable siblings. This > should never happen, but hey... > > I have deliberately left out some of the more "advanced" > optimizations, as they are likely to distract the reviewer from the > core infrastructure, which is what I care about at the moment. One question: as you mention that you use a lot of runtime code patching to make this work transparently, how does this compare to runtime patching the existing kernel to run in EL2 mode without VHE? Is that even possible? My interpretation so far as always been "that's too complicated to do because it would require a lot of runtime patching", but now we seem to get that anyway because we want to run a hypervisor-enabled kernel in either EL1 or EL2 depending on the presence of another feature. Arnd