From nobody Fri Nov 7 02:35:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544765200128330.26916619356007; Thu, 13 Dec 2018 21:26:40 -0800 (PST) Received: from localhost ([::1]:59441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXfze-0005pl-FI for importer@patchew.org; Fri, 14 Dec 2018 00:26:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXfxY-0004PO-KT for qemu-devel@nongnu.org; Fri, 14 Dec 2018 00:24:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXfxX-0005M9-ID for qemu-devel@nongnu.org; Fri, 14 Dec 2018 00:24:24 -0500 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:35113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXfxX-0005Ke-C4 for qemu-devel@nongnu.org; Fri, 14 Dec 2018 00:24:23 -0500 Received: by mail-ot1-x343.google.com with SMTP id 81so4325841otj.2 for ; Thu, 13 Dec 2018 21:24:20 -0800 (PST) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id r1sm1845379oti.44.2018.12.13.21.24.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 21:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BBGH46DSzj6YIrBp1pSAJv0X2g3wgK77Rkp3YAo8k6I=; b=iU8sl2PZQvTVZi6YZZWrN/zKniGNLds7pMmOobh2jXLINf6kQ8gVlAW6IV9Q9/RR+b 1BBOibdoDZzHeVd4V4geBv3AYnoxOReS5CRYhfkIAyEX/EC/Wvjr2+JeNds9wufW5EIB 5F5MQnWIZiMAAVWU3CB9kaJOrDs/L0e1f04d8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BBGH46DSzj6YIrBp1pSAJv0X2g3wgK77Rkp3YAo8k6I=; b=dShlEE1zZ8qAN5CfQqk+vihymZPLS0l0uQtrxJa/aMkl3zyDvOC60q4XEtUOX/2j+9 h3j1ZIImymu8BnXuNTYdAYYCs22Kzpxd903ClsDGix5N1CbtwTSJCKh/FgPpS4CZo2MR tUDwgC1Xc/3qSTIMLa0ixEZvZAROaz7WX3ThpFaodDaFwQbniWCSpxcwKr3cpouYiOcb zQgtT37banPbieDDB1Q10i8wr2dvhCCfewC6KGf9j7jiosxLexk1oisWdnz0vdhnGhGp cflT979ihtDYYpE34HXdu+aCiBJT9GAkwp5jp5Kp+IInGvbYcAa/Gjue8g1rkqrZLOPR rC9w== X-Gm-Message-State: AA+aEWYdFry8DcGt74tedOWBXw7nySobnQvgF2QNf6Bffx4WYcM+RPCX MFAP+B96Sr6wi9QnaF0v6nwr8QbzGlvM/Q== X-Google-Smtp-Source: AFSGD/WMwM+nvaizd/ssDVjWwWeFiVpAL9LerIKcxJGLjCoayy79g97olU1yzFa80VqUMVwOyMZrpg== X-Received: by 2002:a9d:6a81:: with SMTP id l1mr1220267otq.3.1544765059179; Thu, 13 Dec 2018 21:24:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 23:23:48 -0600 Message-Id: <20181214052410.11863-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181214052410.11863-1-richard.henderson@linaro.org> References: <20181214052410.11863-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::343 Subject: [Qemu-devel] [PATCH v2 05/27] target/arm: Decode PAuth within system hint space X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 93 +++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 12 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 7c1cc1ce8e..0df344f9e8 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1471,33 +1471,102 @@ static void handle_hint(DisasContext *s, uint32_t = insn, } =20 switch (selector) { - case 0: /* NOP */ - return; - case 3: /* WFI */ + case 000: /* NOP */ + break; + case 003: /* WFI */ s->base.is_jmp =3D DISAS_WFI; - return; + break; + case 001: /* YIELD */ /* When running in MTTCG we don't generate jumps to the yield and * WFE helpers as it won't affect the scheduling of other vCPUs. * If we wanted to more completely model WFE/SEV so we don't busy * spin unnecessarily we would need to do something more involved. */ - case 1: /* YIELD */ if (!(tb_cflags(s->base.tb) & CF_PARALLEL)) { s->base.is_jmp =3D DISAS_YIELD; } - return; - case 2: /* WFE */ + break; + case 002: /* WFE */ if (!(tb_cflags(s->base.tb) & CF_PARALLEL)) { s->base.is_jmp =3D DISAS_WFE; } - return; - case 4: /* SEV */ - case 5: /* SEVL */ + break; + case 004: /* SEV */ + case 005: /* SEVL */ /* we treat all as NOP at least for now */ - return; + break; + case 007: /* XPACLRI */ + if (s->pauth_active) { + gen_helper_xpaci(cpu_X[30], cpu_env, cpu_X[30]); + } + break; + case 010: /* PACIA1716 */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 012: /* PACIB1716 */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 014: /* AUTIA1716 */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 016: /* AUTIB1716 */ + if (s->pauth_active) { + gen_helper_autib(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 030: /* PACIAZ */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 031: /* PACIASP */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 032: /* PACIBZ */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 033: /* PACIBSP */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 034: /* AUTIAZ */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 035: /* AUTIASP */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 036: /* AUTIBZ */ + if (s->pauth_active) { + gen_helper_autib(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 037: /* AUTIBSP */ + if (s->pauth_active) { + gen_helper_autib(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; default: /* default specified as NOP equivalent */ - return; + break; } } =20 --=20 2.17.2