From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [RFC PATCH 0/5] arm/arm64: Making HYP vgic/timer save/restore common Date: Tue, 9 Feb 2016 20:06:16 +0100 Message-ID: <20160209190616.GC5171@cbox> References: <1453996565-19666-1-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu To: Marc Zyngier Return-path: Received: from mail-wm0-f41.google.com ([74.125.82.41]:38505 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932454AbcBITFi (ORCPT ); Tue, 9 Feb 2016 14:05:38 -0500 Received: by mail-wm0-f41.google.com with SMTP id p63so36298706wmp.1 for ; Tue, 09 Feb 2016 11:05:38 -0800 (PST) Content-Disposition: inline In-Reply-To: <1453996565-19666-1-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jan 28, 2016 at 03:56:00PM +0000, Marc Zyngier wrote: > With the current state of the C conversion of arm and arm64 world > switches, we are still unable to share some of the most obvious > candidates (GIC and timer save/restore). In order to reduce the bloat, > let's move these files to a common location (virt/kvm/arm/hyp). > > The changes are extremely mechanical, with a small hack to deal with > system register names on the 32bit side (I've decided to align on the > 64bit names). > > I'd like to know what people think of the common location. Does it > makes sense to have a "hyp" subdirectory to indicate that this is not > "normal" kernel code? I think so, it means to me typically executing in "hyp/el2" or just low-level hypervisor logic, in the case of VHE. > > These patches are on top of 4.5-rc1, plus the VHE and 32bit WS rewrite > patches, and I've pushed out a branch at > > git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mov-hyp > > Marc Zyngier (5): > arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h > arm64: KVM: Move vgic-v2 and timer save/restore to virt/kvm/arm/hyp > ARM: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h > ARM: KVM: Use common version of vgic-v2-sr.c > ARM: KVM: Use common version of timer-sr.c > > arch/arm/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} | 9 +++ > arch/arm/kvm/hyp/Makefile | 7 +- > arch/arm/kvm/hyp/banked-sr.c | 2 +- > arch/arm/kvm/hyp/cp15-sr.c | 2 +- > arch/arm/kvm/hyp/switch.c | 2 +- > arch/arm/kvm/hyp/timer-sr.c | 71 ------------------ > arch/arm/kvm/hyp/tlb.c | 2 +- > arch/arm/kvm/hyp/vgic-v2-sr.c | 84 ---------------------- > .../arm64/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} | 0 > arch/arm64/kvm/hyp/Makefile | 7 +- > arch/arm64/kvm/hyp/debug-sr.c | 4 +- > arch/arm64/kvm/hyp/switch.c | 3 +- > arch/arm64/kvm/hyp/sysreg-sr.c | 4 +- > arch/arm64/kvm/hyp/tlb.c | 2 +- > arch/arm64/kvm/hyp/vgic-v3-sr.c | 4 +- > {arch/arm64/kvm => virt/kvm/arm}/hyp/timer-sr.c | 4 +- > {arch/arm64/kvm => virt/kvm/arm}/hyp/vgic-v2-sr.c | 4 +- > 17 files changed, 30 insertions(+), 181 deletions(-) > rename arch/arm/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} (93%) > delete mode 100644 arch/arm/kvm/hyp/timer-sr.c > delete mode 100644 arch/arm/kvm/hyp/vgic-v2-sr.c > rename arch/arm64/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} (100%) > rename {arch/arm64/kvm => virt/kvm/arm}/hyp/timer-sr.c (97%) > rename {arch/arm64/kvm => virt/kvm/arm}/hyp/vgic-v2-sr.c (98%) > > -- > 2.1.4 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: christoffer.dall@linaro.org (Christoffer Dall) Date: Tue, 9 Feb 2016 20:06:16 +0100 Subject: [RFC PATCH 0/5] arm/arm64: Making HYP vgic/timer save/restore common In-Reply-To: <1453996565-19666-1-git-send-email-marc.zyngier@arm.com> References: <1453996565-19666-1-git-send-email-marc.zyngier@arm.com> Message-ID: <20160209190616.GC5171@cbox> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jan 28, 2016 at 03:56:00PM +0000, Marc Zyngier wrote: > With the current state of the C conversion of arm and arm64 world > switches, we are still unable to share some of the most obvious > candidates (GIC and timer save/restore). In order to reduce the bloat, > let's move these files to a common location (virt/kvm/arm/hyp). > > The changes are extremely mechanical, with a small hack to deal with > system register names on the 32bit side (I've decided to align on the > 64bit names). > > I'd like to know what people think of the common location. Does it > makes sense to have a "hyp" subdirectory to indicate that this is not > "normal" kernel code? I think so, it means to me typically executing in "hyp/el2" or just low-level hypervisor logic, in the case of VHE. > > These patches are on top of 4.5-rc1, plus the VHE and 32bit WS rewrite > patches, and I've pushed out a branch at > > git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mov-hyp > > Marc Zyngier (5): > arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h > arm64: KVM: Move vgic-v2 and timer save/restore to virt/kvm/arm/hyp > ARM: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h > ARM: KVM: Use common version of vgic-v2-sr.c > ARM: KVM: Use common version of timer-sr.c > > arch/arm/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} | 9 +++ > arch/arm/kvm/hyp/Makefile | 7 +- > arch/arm/kvm/hyp/banked-sr.c | 2 +- > arch/arm/kvm/hyp/cp15-sr.c | 2 +- > arch/arm/kvm/hyp/switch.c | 2 +- > arch/arm/kvm/hyp/timer-sr.c | 71 ------------------ > arch/arm/kvm/hyp/tlb.c | 2 +- > arch/arm/kvm/hyp/vgic-v2-sr.c | 84 ---------------------- > .../arm64/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} | 0 > arch/arm64/kvm/hyp/Makefile | 7 +- > arch/arm64/kvm/hyp/debug-sr.c | 4 +- > arch/arm64/kvm/hyp/switch.c | 3 +- > arch/arm64/kvm/hyp/sysreg-sr.c | 4 +- > arch/arm64/kvm/hyp/tlb.c | 2 +- > arch/arm64/kvm/hyp/vgic-v3-sr.c | 4 +- > {arch/arm64/kvm => virt/kvm/arm}/hyp/timer-sr.c | 4 +- > {arch/arm64/kvm => virt/kvm/arm}/hyp/vgic-v2-sr.c | 4 +- > 17 files changed, 30 insertions(+), 181 deletions(-) > rename arch/arm/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} (93%) > delete mode 100644 arch/arm/kvm/hyp/timer-sr.c > delete mode 100644 arch/arm/kvm/hyp/vgic-v2-sr.c > rename arch/arm64/{kvm/hyp/hyp.h => include/asm/kvm_hyp.h} (100%) > rename {arch/arm64/kvm => virt/kvm/arm}/hyp/timer-sr.c (97%) > rename {arch/arm64/kvm => virt/kvm/arm}/hyp/vgic-v2-sr.c (98%) > > -- > 2.1.4 >