From nobody Thu Dec 18 17:58:59 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547825303962542.3244234690765; Fri, 18 Jan 2019 07:28:23 -0800 (PST) Received: from localhost ([127.0.0.1]:41448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkW4E-00028p-SS for importer@patchew.org; Fri, 18 Jan 2019 10:28:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkVbT-0002lN-Vm for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkVbP-0007K4-TI for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:39 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkVbN-00079M-Uy for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:35 -0500 Received: by mail-wr1-x42f.google.com with SMTP id z5so15375021wrt.11 for ; Fri, 18 Jan 2019 06:58:19 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e27sm92094561wra.67.2019.01.18.06.58.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jan 2019 06:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ynEe3twGMXgKoGFp9wi34TTP6mZtAAEcLfVwWzb/okU=; b=I9bSODhRInAEXIwdkbvWecWrzcSBJGr/0OOSbiC2xd7c49IDp5ray1ZMTfdPwmf2YZ AUCvpX5mRGsHd0oPfkPiXJumbL1eVorcU3+LxQHDpoGyOabj8jKcBoWH2/Y4wkVgnW0P 0e7S7QUGLfLbAEOcTA6sVytZ2NCXZFOgop73A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ynEe3twGMXgKoGFp9wi34TTP6mZtAAEcLfVwWzb/okU=; b=Tdvzw+rOCZLAGW5lPk3Dz/hPkTbdNdmDvWNYYLxMK5mTzgqWo7jumrLYy9S2NzrSzH bWpAOCG0dIoUU8RTC0AJgOTzJZxEEOyntqxD77trAEaZnIPBo6J2FMaWtMlxfZwD3N/S sJesjvlab5+Yb3jw9ikLF/TM0wjvC4eOfH9D0vIBe3FiYR1BTRRy/McKwSk7RieA3uL6 JH45D4p1sNFr4XMF3gIYV6y2WtUEYrDihpZzjWqEIaIWXpPRUCZvHHSQA6Ix7Lc2EGQu wQ0CjtYU3FLLZSBCSi/cRF21C+CGNJ07Y3+TPgW7E5hhfWRKIbC19G0sRpefGD1Hr5Su WsOg== X-Gm-Message-State: AJcUukf+DS9CdsZ6MYNH6Q/KmRn0g2fxKX6VQDsGxykZZllSfLSIa+5D xUida+Une4NPewR3GuUg11g+l1mynw635g== X-Google-Smtp-Source: ALg8bN6pO4DUfEjSshlgDzLnJUPLtyhp92YDoixx8Y+fe2rMCvnXXSlxvgKjGFJJ4T4mYZU3yROJtg== X-Received: by 2002:adf:a393:: with SMTP id l19mr17382633wrb.110.1547823498613; Fri, 18 Jan 2019 06:58:18 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 18 Jan 2019 14:57:26 +0000 Message-Id: <20190118145805.6852-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118145805.6852-1-peter.maydell@linaro.org> References: <20190118145805.6852-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PULL 10/49] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20190108223129.5570-7-richard.henderson@linaro.org Signed-off-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 37a57af7150..b72aea3e974 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 0b00000: /* NOP */ + break; + case 0b00011: /* WFI */ s->base.is_jmp =3D DISAS_WFI; - return; + break; + case 0b00001: /* 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 0b00010: /* 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 0b00100: /* SEV */ + case 0b00101: /* SEVL */ /* we treat all as NOP at least for now */ - return; + break; + case 0b00111: /* XPACLRI */ + if (s->pauth_active) { + gen_helper_xpaci(cpu_X[30], cpu_env, cpu_X[30]); + } + break; + case 0b01000: /* PACIA1716 */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 0b01010: /* PACIB1716 */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 0b01100: /* AUTIA1716 */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 0b01110: /* AUTIB1716 */ + if (s->pauth_active) { + gen_helper_autib(cpu_X[17], cpu_env, cpu_X[17], cpu_X[16]); + } + break; + case 0b11000: /* PACIAZ */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 0b11001: /* PACIASP */ + if (s->pauth_active) { + gen_helper_pacia(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 0b11010: /* PACIBZ */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 0b11011: /* PACIBSP */ + if (s->pauth_active) { + gen_helper_pacib(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 0b11100: /* AUTIAZ */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 0b11101: /* AUTIASP */ + if (s->pauth_active) { + gen_helper_autia(cpu_X[30], cpu_env, cpu_X[30], cpu_X[31]); + } + break; + case 0b11110: /* AUTIBZ */ + if (s->pauth_active) { + gen_helper_autib(cpu_X[30], cpu_env, cpu_X[30], + new_tmp_a64_zero(s)); + } + break; + case 0b11111: /* 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.20.1