Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 550CD1DE3DC for ; Mon, 31 Mar 2025 09:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743414195; cv=none; b=HwUe6ds/jEA7zSWrlhGZ3zgI0Ar8b/ar7MOTlfYdA97kIF0qhEhwglOYLWCOQdwdbLzId6JZggtog1VmhBcUNoxEM3Ye1E+MEfOofzwnq+HzGm4V3GmGb+EfAq3NrVD/ZmpkbmCFLHUPp80w/crpTIadryLzF+OKFnrmGGnOl+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743414195; c=relaxed/simple; bh=ca9FxEgPa7VLZ4XiR5ptJG9bv4zLHMzIw3nAOKxbsc4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MResm7ZuVYovMwKtcRaJRKt9W9Pd7rwLTHdOkkv0PzfGV2YrUpW8urug8350s5HrRWYe0you7wyBO/8k0qJ99RiO4f285jdQlMLfmg8zbpSuHCi7Xy6klGq5QLjLualBHMCuaRv8rOE+8ahbZba0M+fwicn63YjVcnmQ3GHbTn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4ZR5lR0hwTz13Kd0; Mon, 31 Mar 2025 17:42:43 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id 44BA61400DC; Mon, 31 Mar 2025 17:43:12 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 31 Mar 2025 17:43:11 +0800 From: Yicong Yang To: , , , , , , , , CC: , , , , , , , , , , Subject: [PATCH v2 5/6] arm64: Add ESR.DFSC definition of unsupported exclusive or atomic access Date: Mon, 31 Mar 2025 17:43:19 +0800 Message-ID: <20250331094320.35226-6-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20250331094320.35226-1-yangyicong@huawei.com> References: <20250331094320.35226-1-yangyicong@huawei.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemd200014.china.huawei.com (7.221.188.8) From: Yicong Yang 0x35 indicates IMPLEMENTATION DEFINED fault for Unsupported Exclusive or Atomic access. Add ESR_ELx_FSC definition and corresponding wrapper. Signed-off-by: Yicong Yang --- arch/arm64/include/asm/esr.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h index d1b1a33f9a8b..2f357442f646 100644 --- a/arch/arm64/include/asm/esr.h +++ b/arch/arm64/include/asm/esr.h @@ -121,6 +121,7 @@ #define ESR_ELx_FSC_SEA_TTW(n) (0x14 + (n)) #define ESR_ELx_FSC_SECC (0x18) #define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n)) +#define ESR_ELx_FSC_EXCL_ATOMIC (0x35) /* Status codes for individual page table levels */ #define ESR_ELx_FSC_ACCESS_L(n) (ESR_ELx_FSC_ACCESS + (n)) @@ -464,6 +465,13 @@ static inline bool esr_fsc_is_access_flag_fault(unsigned long esr) (esr == ESR_ELx_FSC_ACCESS_L(0)); } +static inline bool esr_fsc_is_excl_atomic_fault(unsigned long esr) +{ + esr = esr & ESR_ELx_FSC; + + return esr == ESR_ELx_FSC_EXCL_ATOMIC; +} + /* Indicate whether ESR.EC==0x1A is for an ERETAx instruction */ static inline bool esr_iss_is_eretax(unsigned long esr) { -- 2.24.0