From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B83BC433EF for ; Mon, 7 Mar 2022 16:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244262AbiCGQld (ORCPT ); Mon, 7 Mar 2022 11:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240217AbiCGQlc (ORCPT ); Mon, 7 Mar 2022 11:41:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FFDD4D241 for ; Mon, 7 Mar 2022 08:40:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1E7AE61117 for ; Mon, 7 Mar 2022 16:40:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E363C340EF; Mon, 7 Mar 2022 16:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646671236; bh=ROJevZ3kJ0qBNBmewkcvUGqdlqCNKk70wRtXyWwUrNk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mVpQaMSv/0hGq2FGcqboYQFVz1XNUN30eDVSb4H7jFSUGNdcLbr68tM5DiG6++kVY YGPDgdQtSs17AycJ5w7/hBkLj910xp6Cok8fP6yDP9OpOXF1u3tG9Vf3FojRJK5fT5 +iBy7pwf3reYVPbrjZGfo0U6zFyUzmSUiUUlRGyG06oDy58ZEy6n6nvne6AuiFyMN/ Gy6l23ZLQzKkO5p4IicwNrq+5T0xLaFE4TGNBLHIMthhWmKlFhmGNXcB+cadHA6uNk FT9mVcold7aqaNyIUBqWqmfOynTssNmA6aXjoC79nJ+YdypOCYsuBl4wPeHaztlkd7 ERPhiMGWkqHYw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nRGPS-00CqHn-2r; Mon, 07 Mar 2022 16:40:34 +0000 Date: Mon, 07 Mar 2022 16:40:33 +0000 Message-ID: <874k491zsu.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Jintack Lim , Haibo Xu , Ganapatrao Kulkarni , Chase Conklin , "Russell King (Oracle)" , James Morse , Suzuki K Poulose , karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com Subject: Re: [PATCH v6 43/64] KVM: arm64: nv: arch_timer: Support hyp timer emulation In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-44-maz@kernel.org> <503754e615b9bc7605c379dd7f2549a1@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, linux@armlinux.org.uk, james.morse@arm.com, suzuki.poulose@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, 07 Mar 2022 16:24:58 +0000, Alexandru Elisei wrote: > > Hi, > > On Mon, Mar 07, 2022 at 03:44:43PM +0000, Marc Zyngier wrote: > > On 2022-03-07 15:23, Alexandru Elisei wrote: > > > Hi, > > > > > > On Fri, Jan 28, 2022 at 12:18:51PM +0000, Marc Zyngier wrote: > > > > From: Christoffer Dall > > > > > > > > Emulating EL2 also means emulating the EL2 timers. To do so, we expand > > > > our timer framework to deal with at most 4 timers. At any given time, > > > > two timers are using the HW timers, and the two others are purely > > > > emulated. > > > > > > > > The role of deciding which is which at any given time is left to a > > > > mapping function which is called every time we need to make such a > > > > decision. > > > > > > > > Signed-off-by: Christoffer Dall > > > > [maz: added CNTVOFF support, general reworking for v4.8] > > > > Signed-off-by: Marc Zyngier > > > > --- > > > > arch/arm64/include/asm/kvm_host.h | 4 + > > > > arch/arm64/kvm/arch_timer.c | 165 > > > > ++++++++++++++++++++++++++++-- > > > > arch/arm64/kvm/sys_regs.c | 7 +- > > > > arch/arm64/kvm/trace_arm.h | 6 +- > > > > arch/arm64/kvm/vgic/vgic.c | 15 +++ > > > > include/kvm/arm_arch_timer.h | 8 +- > > > > include/kvm/arm_vgic.h | 1 + > > > > 7 files changed, 194 insertions(+), 12 deletions(-) > > > > > > > [..] > > > > @@ -1301,6 +1445,7 @@ static void set_timer_irqs(struct kvm *kvm, > > > > int vtimer_irq, int ptimer_irq) > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > vcpu_vtimer(vcpu)->irq.irq = vtimer_irq; > > > > vcpu_ptimer(vcpu)->irq.irq = ptimer_irq; > > > > + /* TODO: Add support for hv/hp timers */ > > > > } > > > > } > > > > > > > > @@ -1311,6 +1456,8 @@ int kvm_arm_timer_set_attr(struct kvm_vcpu > > > > *vcpu, struct kvm_device_attr *attr) > > > > struct arch_timer_context *ptimer = vcpu_ptimer(vcpu); > > > > int irq; > > > > > > > > + /* TODO: Add support for hv/hp timers */ > > > > > > Is the patch unfinished? > > > > Just like the rest of the kernel. > > That doesn't really answer my question. What I was asking if this is > the patch that is intended to be merged or if you still want to add > handling of those timers before merging it. It depends what people's expectations are. If you want full support for everything the architecture has, plus all the features that KVM has such as save restore (which is what we this comment is about) before things can go in, then the answer probably is that I should go and erase that code as quickly as possible. M. -- Without deviation from the norm, progress is not possible. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DA60C433F5 for ; Mon, 7 Mar 2022 16:40:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B2B314B21A; Mon, 7 Mar 2022 11:40:42 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org 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 IW02Ccxews6J; Mon, 7 Mar 2022 11:40:41 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8EC8F4B1CB; Mon, 7 Mar 2022 11:40:41 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 86D6A4B1AB for ; Mon, 7 Mar 2022 11:40:39 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu 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 5E2o98NaoEuW for ; Mon, 7 Mar 2022 11:40:38 -0500 (EST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 5F2DC4B129 for ; Mon, 7 Mar 2022 11:40:38 -0500 (EST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B39B610FB; Mon, 7 Mar 2022 16:40:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E363C340EF; Mon, 7 Mar 2022 16:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646671236; bh=ROJevZ3kJ0qBNBmewkcvUGqdlqCNKk70wRtXyWwUrNk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mVpQaMSv/0hGq2FGcqboYQFVz1XNUN30eDVSb4H7jFSUGNdcLbr68tM5DiG6++kVY YGPDgdQtSs17AycJ5w7/hBkLj910xp6Cok8fP6yDP9OpOXF1u3tG9Vf3FojRJK5fT5 +iBy7pwf3reYVPbrjZGfo0U6zFyUzmSUiUUlRGyG06oDy58ZEy6n6nvne6AuiFyMN/ Gy6l23ZLQzKkO5p4IicwNrq+5T0xLaFE4TGNBLHIMthhWmKlFhmGNXcB+cadHA6uNk FT9mVcold7aqaNyIUBqWqmfOynTssNmA6aXjoC79nJ+YdypOCYsuBl4wPeHaztlkd7 ERPhiMGWkqHYw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nRGPS-00CqHn-2r; Mon, 07 Mar 2022 16:40:34 +0000 Date: Mon, 07 Mar 2022 16:40:33 +0000 Message-ID: <874k491zsu.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Subject: Re: [PATCH v6 43/64] KVM: arm64: nv: arch_timer: Support hyp timer emulation In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-44-maz@kernel.org> <503754e615b9bc7605c379dd7f2549a1@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, linux@armlinux.org.uk, james.morse@arm.com, suzuki.poulose@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kernel-team@android.com, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Chase Conklin , kvmarm@lists.cs.columbia.edu, mihai.carabas@oracle.com, Ganapatrao Kulkarni , "Russell King \(Oracle\)" , linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, 07 Mar 2022 16:24:58 +0000, Alexandru Elisei wrote: > > Hi, > > On Mon, Mar 07, 2022 at 03:44:43PM +0000, Marc Zyngier wrote: > > On 2022-03-07 15:23, Alexandru Elisei wrote: > > > Hi, > > > > > > On Fri, Jan 28, 2022 at 12:18:51PM +0000, Marc Zyngier wrote: > > > > From: Christoffer Dall > > > > > > > > Emulating EL2 also means emulating the EL2 timers. To do so, we expand > > > > our timer framework to deal with at most 4 timers. At any given time, > > > > two timers are using the HW timers, and the two others are purely > > > > emulated. > > > > > > > > The role of deciding which is which at any given time is left to a > > > > mapping function which is called every time we need to make such a > > > > decision. > > > > > > > > Signed-off-by: Christoffer Dall > > > > [maz: added CNTVOFF support, general reworking for v4.8] > > > > Signed-off-by: Marc Zyngier > > > > --- > > > > arch/arm64/include/asm/kvm_host.h | 4 + > > > > arch/arm64/kvm/arch_timer.c | 165 > > > > ++++++++++++++++++++++++++++-- > > > > arch/arm64/kvm/sys_regs.c | 7 +- > > > > arch/arm64/kvm/trace_arm.h | 6 +- > > > > arch/arm64/kvm/vgic/vgic.c | 15 +++ > > > > include/kvm/arm_arch_timer.h | 8 +- > > > > include/kvm/arm_vgic.h | 1 + > > > > 7 files changed, 194 insertions(+), 12 deletions(-) > > > > > > > [..] > > > > @@ -1301,6 +1445,7 @@ static void set_timer_irqs(struct kvm *kvm, > > > > int vtimer_irq, int ptimer_irq) > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > vcpu_vtimer(vcpu)->irq.irq = vtimer_irq; > > > > vcpu_ptimer(vcpu)->irq.irq = ptimer_irq; > > > > + /* TODO: Add support for hv/hp timers */ > > > > } > > > > } > > > > > > > > @@ -1311,6 +1456,8 @@ int kvm_arm_timer_set_attr(struct kvm_vcpu > > > > *vcpu, struct kvm_device_attr *attr) > > > > struct arch_timer_context *ptimer = vcpu_ptimer(vcpu); > > > > int irq; > > > > > > > > + /* TODO: Add support for hv/hp timers */ > > > > > > Is the patch unfinished? > > > > Just like the rest of the kernel. > > That doesn't really answer my question. What I was asking if this is > the patch that is intended to be merged or if you still want to add > handling of those timers before merging it. It depends what people's expectations are. If you want full support for everything the architecture has, plus all the features that KVM has such as save restore (which is what we this comment is about) before things can go in, then the answer probably is that I should go and erase that code as quickly as possible. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DB5AC433F5 for ; Mon, 7 Mar 2022 16:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8bGWeJRrDhHcWWFutkTh8XnCB8nx163Zzj47O4EOWa8=; b=CZomNlXtrQlsZb Eftlw24z7plSV+w9Rdvn6YiMtV8sg+0sxagvcMRLKwE2wHhNZSiSrG5VGZLqKzLa7l4sipZL2xyer v7ngFjcHkWrD/iQ09p5nD3CZ+k8s38VtAIZDXw1CvgMRUsOuzGEcTroy9hofKHTbF7mKKdy7a7pLy ZvmmZMBagwyPVcBO0SF5fYehg/fykQYcwmm3mZR5TA7E+LMoHzIo4HiE9ZvqEdnnXGVcx9JfXIyvG VCPfnF7EgzdnBYcmRVOERmrnXo/0hbb/LtBedKxkHOEt48sIm3EfgTxniyZFf4a+Vrn2G9FeMvjLb 6VBGumhJYRi5rjjdUjiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRGPa-000s7P-7D; Mon, 07 Mar 2022 16:40:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRGPV-000s6X-Ic for linux-arm-kernel@lists.infradead.org; Mon, 07 Mar 2022 16:40:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B39B610FB; Mon, 7 Mar 2022 16:40:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E363C340EF; Mon, 7 Mar 2022 16:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646671236; bh=ROJevZ3kJ0qBNBmewkcvUGqdlqCNKk70wRtXyWwUrNk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mVpQaMSv/0hGq2FGcqboYQFVz1XNUN30eDVSb4H7jFSUGNdcLbr68tM5DiG6++kVY YGPDgdQtSs17AycJ5w7/hBkLj910xp6Cok8fP6yDP9OpOXF1u3tG9Vf3FojRJK5fT5 +iBy7pwf3reYVPbrjZGfo0U6zFyUzmSUiUUlRGyG06oDy58ZEy6n6nvne6AuiFyMN/ Gy6l23ZLQzKkO5p4IicwNrq+5T0xLaFE4TGNBLHIMthhWmKlFhmGNXcB+cadHA6uNk FT9mVcold7aqaNyIUBqWqmfOynTssNmA6aXjoC79nJ+YdypOCYsuBl4wPeHaztlkd7 ERPhiMGWkqHYw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nRGPS-00CqHn-2r; Mon, 07 Mar 2022 16:40:34 +0000 Date: Mon, 07 Mar 2022 16:40:33 +0000 Message-ID: <874k491zsu.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Jintack Lim , Haibo Xu , Ganapatrao Kulkarni , Chase Conklin , "Russell King (Oracle)" , James Morse , Suzuki K Poulose , karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com Subject: Re: [PATCH v6 43/64] KVM: arm64: nv: arch_timer: Support hyp timer emulation In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-44-maz@kernel.org> <503754e615b9bc7605c379dd7f2549a1@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, linux@armlinux.org.uk, james.morse@arm.com, suzuki.poulose@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_084037_717041_16552C0B X-CRM114-Status: GOOD ( 34.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 07 Mar 2022 16:24:58 +0000, Alexandru Elisei wrote: > > Hi, > > On Mon, Mar 07, 2022 at 03:44:43PM +0000, Marc Zyngier wrote: > > On 2022-03-07 15:23, Alexandru Elisei wrote: > > > Hi, > > > > > > On Fri, Jan 28, 2022 at 12:18:51PM +0000, Marc Zyngier wrote: > > > > From: Christoffer Dall > > > > > > > > Emulating EL2 also means emulating the EL2 timers. To do so, we expand > > > > our timer framework to deal with at most 4 timers. At any given time, > > > > two timers are using the HW timers, and the two others are purely > > > > emulated. > > > > > > > > The role of deciding which is which at any given time is left to a > > > > mapping function which is called every time we need to make such a > > > > decision. > > > > > > > > Signed-off-by: Christoffer Dall > > > > [maz: added CNTVOFF support, general reworking for v4.8] > > > > Signed-off-by: Marc Zyngier > > > > --- > > > > arch/arm64/include/asm/kvm_host.h | 4 + > > > > arch/arm64/kvm/arch_timer.c | 165 > > > > ++++++++++++++++++++++++++++-- > > > > arch/arm64/kvm/sys_regs.c | 7 +- > > > > arch/arm64/kvm/trace_arm.h | 6 +- > > > > arch/arm64/kvm/vgic/vgic.c | 15 +++ > > > > include/kvm/arm_arch_timer.h | 8 +- > > > > include/kvm/arm_vgic.h | 1 + > > > > 7 files changed, 194 insertions(+), 12 deletions(-) > > > > > > > [..] > > > > @@ -1301,6 +1445,7 @@ static void set_timer_irqs(struct kvm *kvm, > > > > int vtimer_irq, int ptimer_irq) > > > > kvm_for_each_vcpu(i, vcpu, kvm) { > > > > vcpu_vtimer(vcpu)->irq.irq = vtimer_irq; > > > > vcpu_ptimer(vcpu)->irq.irq = ptimer_irq; > > > > + /* TODO: Add support for hv/hp timers */ > > > > } > > > > } > > > > > > > > @@ -1311,6 +1456,8 @@ int kvm_arm_timer_set_attr(struct kvm_vcpu > > > > *vcpu, struct kvm_device_attr *attr) > > > > struct arch_timer_context *ptimer = vcpu_ptimer(vcpu); > > > > int irq; > > > > > > > > + /* TODO: Add support for hv/hp timers */ > > > > > > Is the patch unfinished? > > > > Just like the rest of the kernel. > > That doesn't really answer my question. What I was asking if this is > the patch that is intended to be merged or if you still want to add > handling of those timers before merging it. It depends what people's expectations are. If you want full support for everything the architecture has, plus all the features that KVM has such as save restore (which is what we this comment is about) before things can go in, then the answer probably is that I should go and erase that code as quickly as possible. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel