Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp207221lqe; Wed, 27 Mar 2024 03:31:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXP0y2+g3XggnmcT22lTSmjAjtONOWuvplN3RtMvl/InzKGaz+CR4ZqdyqE9Z9OcGYmDrl2iHDy/oyHQeS8Pgr4a6CT0fao8aXTT/3UvQ== X-Google-Smtp-Source: AGHT+IExcW0l/UxqUda+c2ftZuS85JFY10da6lm7ucJb/w405FhKN2lNjkfZES5c3eYiWV0XDUSZ X-Received: by 2002:a92:d6d0:0:b0:368:89ef:7da1 with SMTP id z16-20020a92d6d0000000b0036889ef7da1mr733785ilp.0.1711535502735; Wed, 27 Mar 2024 03:31:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711535502; cv=pass; d=google.com; s=arc-20160816; b=srXE2QxpGCDu67tM2CFEcSGrKIPhTjnv7cPAsS2yfAmKgqUTA30TIyiZPG+yM7VlIe jeAHEFrQWzqytEr5ba6mxiNG/4irq8y5e5TJta43Yd594yaQQbkL8IWpwJnie5Px7LJl sEOUTP7d5hjkAoS4maaDpwbH6tbgqIdUYb0rzBkpPq2vSVNKlIgKTz1et2PyGpr4Rape tU5Zp221mpU/KJ2OFWvsZDCElXc9n6YujCxC17Kjq3FhO9hLSE30E0C1nrtiggZznmM+ WR77MnDcLRbB/Nk6QO5XAftrQVMZJN3gAQT1U99lQDk0mKZPlhxaTfzTiPHATSe7OK5r YR/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=KabXKG7QzV07xEnqAZlFM9GzBMwE9AX8NiZo1iI6OCQ=; fh=oDidxRmprVJsPfV4S90LdsAK66RN/w2j7vNFV7fgOe0=; b=izLdBtZM40dbOzaZb0nGIOU++4j2NCVtyXFjXmJp6/hDtOSlD4eJ2t0Ejozxdpb8Uj 17WmLjDhwEcD6DhzJIfbE8GylAwJ93OC7SrfpqwABbGG/zZFa/b04TukHaLot7PnJoDQ 6I83iG6bn853Rkyq8F1Ezqnz5q1227zn3xc5v3CSJ4GKhzXXxlmeSTIHF+8e03QCzeBh gMtIcaw+FvhS139yHVfXLX/QXAVAVh0jOhQ/1/dAcUcZ1cOaCqliDClbY0ryAF4QaPSX 4dtfrsh+DrSMyfVn7tgqcmL/gyp/+RHWswn5JFVK4oOLispVlIO+HzJMdo4Y1jERYmCj GiPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=rX574iRW; arc=pass (i=1 spf=pass spfdomain=vrull.eu dkim=pass dkdomain=vrull.eu); spf=pass (google.com: domain of linux-kernel+bounces-120668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120668-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b191-20020a6334c8000000b005d4fdff9a2csi11444042pga.328.2024.03.27.03.31.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=rX574iRW; arc=pass (i=1 spf=pass spfdomain=vrull.eu dkim=pass dkdomain=vrull.eu); spf=pass (google.com: domain of linux-kernel+bounces-120668-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120668-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5FEB7297C45 for ; Wed, 27 Mar 2024 10:31:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6FC21BDD0; Wed, 27 Mar 2024 10:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vrull.eu header.i=@vrull.eu header.b="rX574iRW" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F0CB3DABF0 for ; Wed, 27 Mar 2024 10:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711535497; cv=none; b=YB/9tteI/womq0Te3/mQFYdQvZITAxCzuxNuX+SiT5oCTedSVYf0sin9LaN9Sq6rZk0qzPWiUBlnu8Eg+NSzaoKKNTdojJ3AEB7znkSDyLhs25wrFqTG7TVQIl0U4txFDzuIckwtCdKsjoQHjk9/Ks4ucKFNF5pvh7WetfDA19s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711535497; c=relaxed/simple; bh=xtpVMt94GrSHCZiPADIb9HDF3vKnlwc2ZyBzsAFK3ac=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Njic9C8Iv9m6HWkojgBHjR1oyw8FzoTkHtM3rZHvm0awjbMkJEBtCex7as8boX9yNXaDdaR2qnEKaDDXoKLjZEa83ijje8fH+5dx66s8nNrEd297Kl0uoUiK3Y8D8k8ukAivyjvdonjonspLTmqHsr7Z1dFKyAKzH32zqKG4pgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=vrull.eu; spf=pass smtp.mailfrom=vrull.eu; dkim=pass (2048-bit key) header.d=vrull.eu header.i=@vrull.eu header.b=rX574iRW; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a4a393b699fso115762566b.0 for ; Wed, 27 Mar 2024 03:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1711535493; x=1712140293; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KabXKG7QzV07xEnqAZlFM9GzBMwE9AX8NiZo1iI6OCQ=; b=rX574iRWsEV6iwDYtDnLgHge+4BJYVnKv0f5NxGQka7ULtYboOvdpM1UhYvsVPrcHj sPRbkrjA6zcomUTkEsn1hnW4HobcV/FULzhezxzvfy5bmp5DgMvquKz7f7a2qW50hs9j oPmxCK0GNPi1rY0DsRD8Q0jsUxfDdlHn4zAKl6fS+/DKBrAkMKWTNGScXa2yXkS6mFWk cC9tT/xaRdaMrEPLO12HvA6LW6nK2idOprp/2nxBHgIqwVOb5EAHFjij/C7TOqwyUlCQ Cey5f6LjHu3Hvz8bveUgCMwjlWKJoOZqTxXf6FvVBrrfQCFFHNwlu+x2IxSwcXwonozN ozBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711535493; x=1712140293; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KabXKG7QzV07xEnqAZlFM9GzBMwE9AX8NiZo1iI6OCQ=; b=Ds2qF0R6S3AQZD5mCiOBv1m0x/yxbbhO8cV59KdsnQRFI+yuSYj8tjuIA8QY/cT5gb gdi149nC8PKm1TIuMMdmljqb/TP/XfXUgsplqCVsgLaygVq/l5Co+fWjF/7ZwsDjbx8N KTDnEEMXljLBBRXhw6+csGoO8GHh2soN9nXDY8tqVsjqhy/NKMCqsEPZQs6H9ECq8qp/ MyEwtjTUYTXujqL2WZieT7YCEWdX+JVjlpTzMVUUPr9YXGemAzG5/ru8pN/Ge30VqApV C2gPL8sxFCZRs9mdz2mOdH+OVBrsIVmFPD/zV3EnTPpMttED5rKjqely+QX/EUet0eE6 hq/w== X-Forwarded-Encrypted: i=1; AJvYcCXKJ5CpzoUmC+1myVo8euVmLwnZ+Cd96XktWpRZp+Mz8Y7VuNl6g4Z2lLK3tGR4MTtEeoYUF9bY91ouZDnuth1zvEyctwF5e0JBUfiC X-Gm-Message-State: AOJu0Yw/jXCNXaCV/KKTSlClKLZbvv8U9PuG6Boekk3M3jC8GYZUkH7F wTsDRi4lXfwZuSp5wcQRg9QFlJXbX8/fzJzhsfFnOD8CGjsTBBBreDx8em9hrgQ= X-Received: by 2002:a17:907:31cd:b0:a45:f9c5:3024 with SMTP id xf13-20020a17090731cd00b00a45f9c53024mr4156607ejb.11.1711535493584; Wed, 27 Mar 2024 03:31:33 -0700 (PDT) Received: from antares.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id z15-20020a170906270f00b00a46b8cd9b51sm5294078ejc.185.2024.03.27.03.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 03:31:32 -0700 (PDT) From: =?UTF-8?q?Christoph=20M=C3=BCllner?= To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Philipp Tomsich , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Daniel Henrique Barboza , Heiko Stuebner , Cooper Qu , Zhiwei Liu , Huang Tao , Alistair Francis , Andrew Jones , Conor Dooley Cc: =?UTF-8?q?Christoph=20M=C3=BCllner?= Subject: [PATCH 0/2] RISC-V: Test th.mxstatus.MAEE bit before enabling MAEE Date: Wed, 27 Mar 2024 11:31:28 +0100 Message-ID: <20240327103130.3651950-1-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the Linux kernel suffers from a boot regression when running on the c906 QEMU emulation. Details have been reported here by Björn Töpel: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg04766.html The main issue is, that Linux enables MAEE for CPUs that have a T-Head mvendorid but QEMU maintainers don't want to emulate a CPU that uses reserved bits in PTEs. See also the following discussion for more context: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00775.html This series renames "T-Head PBMT" to "MAEE" and only enables it if the th.mxstatus.MAEE bit is set. Since th.mxstatus is only accessible in M-mode, this patch depends on the following OpenSBI series: http://lists.infradead.org/pipermail/opensbi/2024-March/006718.html The th.mxstatus CSR is documented here: https://github.com/T-head-Semi/thead-extension-spec/pull/45 The QEMU patch to emulate th.mxstatus with MAEE not set is here: https://lists.gnu.org/archive/html/qemu-devel/2024-03/msg06368.html After applying all referenced patchsets, this patchset allows to successfully boot a C906 QEMU system emulation ("-cpu thead-c906"). Christoph Müllner (2): riscv: thead: Rename T-Head PBMT to MAEE riscv: T-Head: Test availability bit before enabling MAEE errata arch/riscv/Kconfig.errata | 8 ++++---- arch/riscv/errata/thead/errata.c | 22 ++++++++++++++-------- arch/riscv/include/asm/errata_list.h | 20 ++++++++++---------- 3 files changed, 28 insertions(+), 22 deletions(-) -- 2.44.0