From nobody Fri Jul 28 13:35:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RC7t95cNPz4qC7B; Fri, 28 Jul 2023 13:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RC7t9568sz4kyt; Fri, 28 Jul 2023 13:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690551313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdAjyK2tValCKj0oBKzAc4mTGP/aLY+jTgnw5w1M2Xw=; b=mlRczk4L8P8uZ2iRZUkA8h/PoZjWRz09zQwG31SV3zFiL1pltLdPzyim9EVe8Ndzw6PbeV i/fhDYmm/8EDMK0FAEvgHdSj0SLI4247x+ywFSxSoWb6P1gngrCsJeocEckHcs+O1zuk3X KEcBsFoVHfetQDtsSyJf9PNTx859bnLGfUvdh0Rb4dNhJN9Of64Rck0QKMjC+w2GZaXBYl MNhId5064Xh35ewc7dlfEhhoJgCblAXdSgcquEHFcGZyClwLjVDfILUucfC06ORWUCzsdp VgosE+6DCl910OYVnVyx/ylOmpbDO2gsM6yhaOGdlMRsgiWxpEpoJ73l1XTP6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690551313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdAjyK2tValCKj0oBKzAc4mTGP/aLY+jTgnw5w1M2Xw=; b=Nw+HkYynauIDFNNL2otuZqhfceAaCR4zWL4APjj9cSEoG9U4jWLfJHD1ZmfvEvy8rWkijD QSftjkr53YXkx+6yBUw2XoAeDDAeK/JO71JNyCz8DWzwmm8UFQ0xmE/Bq5+TfequWTHHlB AAdyfw7+Lb0i11MdyJzc2nhNnCtT/C3sZypElodWrrH5C3rhHcItz4yN1ZhQ54Z85s8A8W 3rLT/L+jXsomkbbHPcq9xHXwkdq9dGdATakpNjdzVmbu6oOpF3KB5KzwGJgJc94crzQ5e1 zfRA/swJb2VxMvfjC5N3t0mekvm8r48NQ2lsR6Eb72nLnwDza8oAJT1L5PjWNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690551313; a=rsa-sha256; cv=none; b=HwyFCi/tlV8veY0RYL1i5GaaRT4VZd1v4h7hzd4wk3K5HKRRCRX/IU6etqK+JCo03i2qle d4SqluTws8bs9oDXOEo0pOtCyn8Fnyu3pL+SX0b+xFSU84tsiEOfkPrmZGYrp12ZzZq551 7XX6Blv29YC4dBWKlk+zsDH+pXykDxriAKpvF3fw0mPh7XwV7YQWwDIBftoqXfRyvNHtf3 TKHTGqz+iZFdCFunsTSUUUH9ktVS8R9Rg3LWE37qQPvdRo7EKdgNhI09ABttaRr4bhFAqy gRVZet25t1R6uENsYFL0KWbZUaF+H23K8tNKvRg4TH7VZ250IvItulDKxOs45g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RC7t94B6xzspP; Fri, 28 Jul 2023 13:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36SDZDWC010073; Fri, 28 Jul 2023 13:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36SDZD3W010072; Fri, 28 Jul 2023 13:35:13 GMT (envelope-from git) Date: Fri, 28 Jul 2023 13:35:13 GMT Message-Id: <202307281335.36SDZD3W010072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: dd24d475d514 - main - arm64: Add constants for decoding ISS fields for WF* exceptions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd24d475d514bba755111c5eecfef1d362b9d68c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dd24d475d514bba755111c5eecfef1d362b9d68c commit dd24d475d514bba755111c5eecfef1d362b9d68c Author: Mark Johnston AuthorDate: 2023-07-28 13:32:45 +0000 Commit: Mark Johnston CommitDate: 2023-07-28 13:34:38 +0000 arm64: Add constants for decoding ISS fields for WF* exceptions WFI and WFIT trap to EL2 when executed in a vmm guest. (Currently WFE/WFET are not configured to trap.) We only handle WFI at the moment, so these constants are useful when handling the exception. Reviewed by: andrew MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D41199 --- sys/arm64/include/armreg.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 92a62c8d2b53..df1b51fb1875 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -316,6 +316,26 @@ #define ISS_INSN_S1PTW (0x01 << 7) #define ISS_INSN_IFSC_MASK (0x1f << 0) +#define ISS_WFx_TI_SHIFT 0 +#define ISS_WFx_TI_MASK (0x03 << ISS_WFx_TI_SHIFT) +#define ISS_WFx_TI_WFI (0x00 << ISS_WFx_TI_SHIFT) +#define ISS_WFx_TI_WFE (0x01 << ISS_WFx_TI_SHIFT) +#define ISS_WFx_TI_WFIT (0x02 << ISS_WFx_TI_SHIFT) +#define ISS_WFx_TI_WFET (0x03 << ISS_WFx_TI_SHIFT) +#define ISS_WFx_RV_SHIFT 2 +#define ISS_WFx_RV_MASK (0x01 << ISS_WFx_RV_SHIFT) +#define ISS_WFx_RV_INVALID (0x00 << ISS_WFx_RV_SHIFT) +#define ISS_WFx_RV_VALID (0x01 << ISS_WFx_RV_SHIFT) +#define ISS_WFx_RN_SHIFT 5 +#define ISS_WFx_RN_MASK (0x1f << ISS_WFx_RN_SHIFT) +#define ISS_WFx_RN(x) (((x) & ISS_WFx_RN_MASK) >> ISS_WFx_RN_SHIFT) +#define ISS_WFx_COND_SHIFT 20 +#define ISS_WFx_COND_MASK (0x0f << ISS_WFx_COND_SHIFT) +#define ISS_WFx_CV_SHIFT 24 +#define ISS_WFx_CV_MASK (0x01 << ISS_WFx_CV_SHIFT) +#define ISS_WFx_CV_INVALID (0x00 << ISS_WFx_CV_SHIFT) +#define ISS_WFx_CV_VALID (0x01 << ISS_WFx_CV_SHIFT) + #define ISS_MSR_DIR_SHIFT 0 #define ISS_MSR_DIR (0x01 << ISS_MSR_DIR_SHIFT) #define ISS_MSR_Rt_SHIFT 5