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 209EAECAAA1 for ; Fri, 9 Sep 2022 10:15:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 990594C91B; Fri, 9 Sep 2022 06:15:58 -0400 (EDT) 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=@linux.dev 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 ZZEV1spiI32w; Fri, 9 Sep 2022 06:15:57 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 510C94C9F7; Fri, 9 Sep 2022 06:15:57 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 937504C917 for ; Fri, 9 Sep 2022 06:15:56 -0400 (EDT) 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 n2eADROV-RCY for ; Fri, 9 Sep 2022 06:15:55 -0400 (EDT) Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 44A054C912 for ; Fri, 9 Sep 2022 06:15:55 -0400 (EDT) Date: Fri, 9 Sep 2022 11:15:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662718554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UWf75u93hFnHokSkmXHPMg8FKyuqd4msKp/yEz7C7Ao=; b=MTo2cIazKhJL+OTHp3ysffg8vodSCAed8X2h3DOACc71oK2aqbBLC8NVrUh6Y96fLISHKg RHr3qPWaAmutt9oyx7mVi3or4pcgVp1Ros6ZN4U6x/7bf6jP/xluVrOBnUw1XFK9aJt0ce 1VVctsUI4WfaWLRjrfom8jZgC+S/zdk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Reiji Watanabe Subject: Re: [PATCH v2 6/7] KVM: arm64: Treat 32bit ID registers as RAZ/WI on 64bit-only system Message-ID: References: <20220902154804.1939819-1-oliver.upton@linux.dev> <20220902154804.1939819-7-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Cc: kvm@vger.kernel.org, Marc Zyngier , linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , kvmarm@lists.cs.columbia.edu, Linux ARM 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 Hi Reiji, On Tue, Sep 06, 2022 at 09:52:53PM -0700, Reiji Watanabe wrote: [...] > > /* CRm=3 */ > > - ID_SANITISED(MVFR0_EL1), > > - ID_SANITISED(MVFR1_EL1), > > - ID_SANITISED(MVFR2_EL1), > > + AA32_ID_SANITISED(MVFR0_EL1), > > + AA32_ID_SANITISED(MVFR1_EL1), > > + AA32_ID_SANITISED(MVFR2_EL1), > > ID_UNALLOCATED(3,3), > > - ID_SANITISED(ID_PFR2_EL1), > > + AA32_ID_SANITISED(ID_PFR2_EL1), > > ID_HIDDEN(ID_DFR1_EL1), > > Perhaps it might be better to handle ID_AFR0_EL1 and ID_DFR1_EL1 > in the same way as the other AArch32 ID registers for consistency ? > (i.e. treat them RAZ/USER_WI instead of RAZ if kvm_supports_32bit_el0() > is false instead of RAZ) Thanks for having a look. I stopped short of treating these registers as RAZ/USER_WI since an attempted nonzero write to either of these registers is a userspace bug (KVM always advertised 0). As the ABI isn't busted for these registers I'd prefer to leave it in place. Having said that, I'm not too strongly motivated in either direction. -- Thanks, Oliver _______________________________________________ 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 E2159ECAAD3 for ; Fri, 9 Sep 2022 10:17:00 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k+mCKRAWi3rHaNT7kfATSj7riNE7MTbmK1GXI20MfwY=; b=OIRIqByy9u+F8E 7oiQKQlLDeSRcr7VgDiNvnKG+tjSjuwt3ru91TIgBT/nMQm43jLJbWcWKAPECWolVP55vDkEM974E YZrgiMDYyTRo9FgbGfn2v2mTj/ZtmIOwZLOxOOxY8MPu4Kuddn7AHtK8soT11Ofv5o690xuQILsjr cefEx3BaEjfmU8heuTW4V01kbXPnJOWp7RqpIpDGC931kicxrGGtfq6fpTyBX1MqQhTqmmx0gUXsr gtjmVtKwjGSbZlgglibFmC6KZRQVn2DBcZYmlr4lvv4INbMD7+G5PpVM2hD+jODALaIyYE0kvXFkU 41W/NjsqH+BfjOqfx4vA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWb3I-00FIOD-2l; Fri, 09 Sep 2022 10:16:00 +0000 Received: from out0.migadu.com ([94.23.1.103]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWb3E-00FILz-CX for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 10:15:58 +0000 Date: Fri, 9 Sep 2022 11:15:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662718554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UWf75u93hFnHokSkmXHPMg8FKyuqd4msKp/yEz7C7Ao=; b=MTo2cIazKhJL+OTHp3ysffg8vodSCAed8X2h3DOACc71oK2aqbBLC8NVrUh6Y96fLISHKg RHr3qPWaAmutt9oyx7mVi3or4pcgVp1Ros6ZN4U6x/7bf6jP/xluVrOBnUw1XFK9aJt0ce 1VVctsUI4WfaWLRjrfom8jZgC+S/zdk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Reiji Watanabe Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Linux ARM , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/7] KVM: arm64: Treat 32bit ID registers as RAZ/WI on 64bit-only system Message-ID: References: <20220902154804.1939819-1-oliver.upton@linux.dev> <20220902154804.1939819-7-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_031556_592121_73DC45DF X-CRM114-Status: GOOD ( 11.61 ) 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 Hi Reiji, On Tue, Sep 06, 2022 at 09:52:53PM -0700, Reiji Watanabe wrote: [...] > > /* CRm=3 */ > > - ID_SANITISED(MVFR0_EL1), > > - ID_SANITISED(MVFR1_EL1), > > - ID_SANITISED(MVFR2_EL1), > > + AA32_ID_SANITISED(MVFR0_EL1), > > + AA32_ID_SANITISED(MVFR1_EL1), > > + AA32_ID_SANITISED(MVFR2_EL1), > > ID_UNALLOCATED(3,3), > > - ID_SANITISED(ID_PFR2_EL1), > > + AA32_ID_SANITISED(ID_PFR2_EL1), > > ID_HIDDEN(ID_DFR1_EL1), > > Perhaps it might be better to handle ID_AFR0_EL1 and ID_DFR1_EL1 > in the same way as the other AArch32 ID registers for consistency ? > (i.e. treat them RAZ/USER_WI instead of RAZ if kvm_supports_32bit_el0() > is false instead of RAZ) Thanks for having a look. I stopped short of treating these registers as RAZ/USER_WI since an attempted nonzero write to either of these registers is a userspace bug (KVM always advertised 0). As the ABI isn't busted for these registers I'd prefer to leave it in place. Having said that, I'm not too strongly motivated in either direction. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 B64B1ECAAD3 for ; Fri, 9 Sep 2022 10:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbiIIKP5 (ORCPT ); Fri, 9 Sep 2022 06:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiIIKP4 (ORCPT ); Fri, 9 Sep 2022 06:15:56 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0D60129C6C; Fri, 9 Sep 2022 03:15:55 -0700 (PDT) Date: Fri, 9 Sep 2022 11:15:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662718554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UWf75u93hFnHokSkmXHPMg8FKyuqd4msKp/yEz7C7Ao=; b=MTo2cIazKhJL+OTHp3ysffg8vodSCAed8X2h3DOACc71oK2aqbBLC8NVrUh6Y96fLISHKg RHr3qPWaAmutt9oyx7mVi3or4pcgVp1Ros6ZN4U6x/7bf6jP/xluVrOBnUw1XFK9aJt0ce 1VVctsUI4WfaWLRjrfom8jZgC+S/zdk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Reiji Watanabe Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Linux ARM , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/7] KVM: arm64: Treat 32bit ID registers as RAZ/WI on 64bit-only system Message-ID: References: <20220902154804.1939819-1-oliver.upton@linux.dev> <20220902154804.1939819-7-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Reiji, On Tue, Sep 06, 2022 at 09:52:53PM -0700, Reiji Watanabe wrote: [...] > > /* CRm=3 */ > > - ID_SANITISED(MVFR0_EL1), > > - ID_SANITISED(MVFR1_EL1), > > - ID_SANITISED(MVFR2_EL1), > > + AA32_ID_SANITISED(MVFR0_EL1), > > + AA32_ID_SANITISED(MVFR1_EL1), > > + AA32_ID_SANITISED(MVFR2_EL1), > > ID_UNALLOCATED(3,3), > > - ID_SANITISED(ID_PFR2_EL1), > > + AA32_ID_SANITISED(ID_PFR2_EL1), > > ID_HIDDEN(ID_DFR1_EL1), > > Perhaps it might be better to handle ID_AFR0_EL1 and ID_DFR1_EL1 > in the same way as the other AArch32 ID registers for consistency ? > (i.e. treat them RAZ/USER_WI instead of RAZ if kvm_supports_32bit_el0() > is false instead of RAZ) Thanks for having a look. I stopped short of treating these registers as RAZ/USER_WI since an attempted nonzero write to either of these registers is a userspace bug (KVM always advertised 0). As the ABI isn't busted for these registers I'd prefer to leave it in place. Having said that, I'm not too strongly motivated in either direction. -- Thanks, Oliver