From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [PATCH v2 05/10] KVM: arm: introduce kvm_arch_setup/clear_debug() Date: Thu, 9 Apr 2015 14:56:07 +0200 Message-ID: <20150409125607.GD3212@hawk.usersys.redhat.com> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-6-git-send-email-alex.bennee@linaro.org> <20150401182855.4650b14a@thinkpad-w530> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 74A0F4BE48 for ; Thu, 9 Apr 2015 08:48:40 -0400 (EDT) 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 61dFOswkWALY for ; Thu, 9 Apr 2015 08:48:39 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id A1B514BE4D for ; Thu, 9 Apr 2015 08:48:39 -0400 (EDT) Content-Disposition: inline In-Reply-To: <20150401182855.4650b14a@thinkpad-w530> 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: David Hildenbrand Cc: Lorenzo Pieralisi , Russell King , kvm@vger.kernel.org, Catalin Marinas , marc.zyngier@arm.com, jan.kiszka@siemens.com, Will Deacon , open list , Gleb Natapov , Andre Przywara , linux-arm-kernel@lists.infradead.org, zhichao.huang@linaro.org, r65777@freescale.com, pbonzini@redhat.com, bp@suse.de, kvmarm@lists.cs.columbia.edu List-Id: kvmarm@lists.cs.columbia.edu On Wed, Apr 01, 2015 at 06:28:55PM +0200, David Hildenbrand wrote: > > This is a precursor for later patches which will need to do more to > > setup debug state before entering the hyp.S switch code. The existing > > functionality for setting mdcr_el2 has been moved out of hyp.S and now > > uses the value kept in vcpu->arch.mdcr_el2. > > = > > This also moves the conditional setting of the TDA bit from the hyp code > > into the C code. > > = > > Signed-off-by: Alex Benn=E9e > > = > > create mode 100644 arch/arm64/kvm/debug.c > > = > > diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm= _host.h > > index 41008cd..8c01c97 100644 > > --- a/arch/arm/include/asm/kvm_host.h > > +++ b/arch/arm/include/asm/kvm_host.h > > @@ -242,5 +242,7 @@ static inline void kvm_arch_hardware_unsetup(void) = {} > > static inline void kvm_arch_sync_events(struct kvm *kvm) {} > > static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} > > static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} > > +static inline void kvm_arch_setup_debug(struct kvm_vcpu *vcpu) {} > > +static inline void kvm_arch_clear_debug(struct kvm_vcpu *vcpu) {} > = > Do you really want to call these functions "kvm_arch.." although they are= not > defined for other arch and not triggered by common code? > Agreed. If other arches want something similar we can rename/refactor later. If these are arm-only functions, then we don't need the generic prefix, which is actually even a bit confusing. drew = From mboxrd@z Thu Jan 1 00:00:00 1970 From: drjones@redhat.com (Andrew Jones) Date: Thu, 9 Apr 2015 14:56:07 +0200 Subject: [PATCH v2 05/10] KVM: arm: introduce kvm_arch_setup/clear_debug() In-Reply-To: <20150401182855.4650b14a@thinkpad-w530> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-6-git-send-email-alex.bennee@linaro.org> <20150401182855.4650b14a@thinkpad-w530> Message-ID: <20150409125607.GD3212@hawk.usersys.redhat.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Apr 01, 2015 at 06:28:55PM +0200, David Hildenbrand wrote: > > This is a precursor for later patches which will need to do more to > > setup debug state before entering the hyp.S switch code. The existing > > functionality for setting mdcr_el2 has been moved out of hyp.S and now > > uses the value kept in vcpu->arch.mdcr_el2. > > > > This also moves the conditional setting of the TDA bit from the hyp code > > into the C code. > > > > Signed-off-by: Alex Benn?e > > > > create mode 100644 arch/arm64/kvm/debug.c > > > > diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h > > index 41008cd..8c01c97 100644 > > --- a/arch/arm/include/asm/kvm_host.h > > +++ b/arch/arm/include/asm/kvm_host.h > > @@ -242,5 +242,7 @@ static inline void kvm_arch_hardware_unsetup(void) {} > > static inline void kvm_arch_sync_events(struct kvm *kvm) {} > > static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} > > static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} > > +static inline void kvm_arch_setup_debug(struct kvm_vcpu *vcpu) {} > > +static inline void kvm_arch_clear_debug(struct kvm_vcpu *vcpu) {} > > Do you really want to call these functions "kvm_arch.." although they are not > defined for other arch and not triggered by common code? > Agreed. If other arches want something similar we can rename/refactor later. If these are arm-only functions, then we don't need the generic prefix, which is actually even a bit confusing. drew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755019AbbDIM4T (ORCPT ); Thu, 9 Apr 2015 08:56:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49987 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753816AbbDIM4Q (ORCPT ); Thu, 9 Apr 2015 08:56:16 -0400 Date: Thu, 9 Apr 2015 14:56:07 +0200 From: Andrew Jones To: David Hildenbrand Cc: Alex =?iso-8859-1?Q?Benn=E9e?= , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com, zhichao.huang@linaro.org, jan.kiszka@siemens.com, r65777@freescale.com, bp@suse.de, Gleb Natapov , Russell King , Catalin Marinas , Will Deacon , Andre Przywara , Lorenzo Pieralisi , open list Subject: Re: [PATCH v2 05/10] KVM: arm: introduce kvm_arch_setup/clear_debug() Message-ID: <20150409125607.GD3212@hawk.usersys.redhat.com> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-6-git-send-email-alex.bennee@linaro.org> <20150401182855.4650b14a@thinkpad-w530> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150401182855.4650b14a@thinkpad-w530> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 01, 2015 at 06:28:55PM +0200, David Hildenbrand wrote: > > This is a precursor for later patches which will need to do more to > > setup debug state before entering the hyp.S switch code. The existing > > functionality for setting mdcr_el2 has been moved out of hyp.S and now > > uses the value kept in vcpu->arch.mdcr_el2. > > > > This also moves the conditional setting of the TDA bit from the hyp code > > into the C code. > > > > Signed-off-by: Alex Bennée > > > > create mode 100644 arch/arm64/kvm/debug.c > > > > diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h > > index 41008cd..8c01c97 100644 > > --- a/arch/arm/include/asm/kvm_host.h > > +++ b/arch/arm/include/asm/kvm_host.h > > @@ -242,5 +242,7 @@ static inline void kvm_arch_hardware_unsetup(void) {} > > static inline void kvm_arch_sync_events(struct kvm *kvm) {} > > static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} > > static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} > > +static inline void kvm_arch_setup_debug(struct kvm_vcpu *vcpu) {} > > +static inline void kvm_arch_clear_debug(struct kvm_vcpu *vcpu) {} > > Do you really want to call these functions "kvm_arch.." although they are not > defined for other arch and not triggered by common code? > Agreed. If other arches want something similar we can rename/refactor later. If these are arm-only functions, then we don't need the generic prefix, which is actually even a bit confusing. drew