From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH v2 09/10] KVM: arm64: trap nested debug register access Date: Tue, 14 Apr 2015 12:27:03 +0200 Message-ID: <20150414102703.GW6186@cbox> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-10-git-send-email-alex.bennee@linaro.org> <20150410123830.GB3227@hawk.usersys.redhat.com> <877ftglaqu.fsf@linaro.org> 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 C17E34D009 for ; Tue, 14 Apr 2015 06:19:09 -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 G2jP0uYr+sDs for ; Tue, 14 Apr 2015 06:19:08 -0400 (EDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 7B0654CF59 for ; Tue, 14 Apr 2015 06:19:08 -0400 (EDT) Received: by lbcga7 with SMTP id ga7so4396709lbc.1 for ; Tue, 14 Apr 2015 03:26:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <877ftglaqu.fsf@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: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: Catalin Marinas , kvm@vger.kernel.org, marc.zyngier@arm.com, jan.kiszka@siemens.com, Will Deacon , open list , dahi@linux.vnet.ibm.com, zhichao.huang@linaro.org, r65777@freescale.com, pbonzini@redhat.com, bp@suse.de, Gleb Natapov , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On Mon, Apr 13, 2015 at 08:59:21AM +0100, Alex Benn=E9e wrote: [...] > >> + /* MDSCR_EL1 */ > >> + if (r->reg =3D=3D MDSCR_EL1) { > >> + if (p->is_write) > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1) =3D > >> + *vcpu_reg(vcpu, p->Rt); > >> + else > >> + *vcpu_reg(vcpu, p->Rt) =3D > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1); > > > > With this lines wrapping, {}'s might be nice. > = > My natural inclination is to wrap in {}'s but I know the kernel is a fan > of the single-statement if forms. > = It's accepted to use braces for multi-line single statements - and I prefer it too :) -Christoffer From mboxrd@z Thu Jan 1 00:00:00 1970 From: christoffer.dall@linaro.org (Christoffer Dall) Date: Tue, 14 Apr 2015 12:27:03 +0200 Subject: [PATCH v2 09/10] KVM: arm64: trap nested debug register access In-Reply-To: <877ftglaqu.fsf@linaro.org> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-10-git-send-email-alex.bennee@linaro.org> <20150410123830.GB3227@hawk.usersys.redhat.com> <877ftglaqu.fsf@linaro.org> Message-ID: <20150414102703.GW6186@cbox> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Apr 13, 2015 at 08:59:21AM +0100, Alex Benn?e wrote: [...] > >> + /* MDSCR_EL1 */ > >> + if (r->reg == MDSCR_EL1) { > >> + if (p->is_write) > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1) = > >> + *vcpu_reg(vcpu, p->Rt); > >> + else > >> + *vcpu_reg(vcpu, p->Rt) = > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1); > > > > With this lines wrapping, {}'s might be nice. > > My natural inclination is to wrap in {}'s but I know the kernel is a fan > of the single-statement if forms. > It's accepted to use braces for multi-line single statements - and I prefer it too :) -Christoffer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754718AbbDNK1K (ORCPT ); Tue, 14 Apr 2015 06:27:10 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:36708 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753496AbbDNK05 (ORCPT ); Tue, 14 Apr 2015 06:26:57 -0400 Date: Tue, 14 Apr 2015 12:27:03 +0200 From: Christoffer Dall To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: Andrew Jones , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com, zhichao.huang@linaro.org, jan.kiszka@siemens.com, dahi@linux.vnet.ibm.com, r65777@freescale.com, bp@suse.de, Gleb Natapov , Catalin Marinas , Will Deacon , open list Subject: Re: [PATCH v2 09/10] KVM: arm64: trap nested debug register access Message-ID: <20150414102703.GW6186@cbox> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-10-git-send-email-alex.bennee@linaro.org> <20150410123830.GB3227@hawk.usersys.redhat.com> <877ftglaqu.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <877ftglaqu.fsf@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 13, 2015 at 08:59:21AM +0100, Alex Bennée wrote: [...] > >> + /* MDSCR_EL1 */ > >> + if (r->reg == MDSCR_EL1) { > >> + if (p->is_write) > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1) = > >> + *vcpu_reg(vcpu, p->Rt); > >> + else > >> + *vcpu_reg(vcpu, p->Rt) = > >> + vcpu_debug_saved_reg(vcpu, mdscr_el1); > > > > With this lines wrapping, {}'s might be nice. > > My natural inclination is to wrap in {}'s but I know the kernel is a fan > of the single-statement if forms. > It's accepted to use braces for multi-line single statements - and I prefer it too :) -Christoffer