From nobody Tue Feb 10 06:58:17 2026 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 1544179134106842.2692613765545; Fri, 7 Dec 2018 02:38:54 -0800 (PST) Received: from localhost ([::1]:45255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVDX2-0001O8-JX for importer@patchew.org; Fri, 07 Dec 2018 05:38:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVDUz-000802-ME for qemu-devel@nongnu.org; Fri, 07 Dec 2018 05:36:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVDUy-0007KT-OO for qemu-devel@nongnu.org; Fri, 07 Dec 2018 05:36:45 -0500 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:45291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVDUy-0007I5-FP for qemu-devel@nongnu.org; Fri, 07 Dec 2018 05:36:44 -0500 Received: by mail-oi1-x241.google.com with SMTP id y1so1218143oie.12 for ; Fri, 07 Dec 2018 02:36:44 -0800 (PST) Received: from cloudburst.twiddle.net (172.189-204-159.bestel.com.mx. [189.204.159.172]) by smtp.gmail.com with ESMTPSA id c19sm2037594otl.16.2018.12.07.02.36.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 02:36:42 -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=gjSQqh82xRUUx27Sw7M3eUZfBYbMNtfsuqzwmCBZ/1daWZxrhnWzcVJqJWxMFDsDr9 UCa96TyDacYx9MJrByfmDQ2fKEWeNYfoDaz0FMnuKeYMVxFbo98ER4J8yc8eVj9hpLEF jN/ogFCi3g+TA70MZrmPmyqyDKHO6Mi9gMm48= 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=tT4atfceP0tDncF1J/+UDFbcaPyXqYbhvt1czaY9x/dka34iB2Y+rXNR0bzORr4uiI HuhVkcVAYtTkB/BOqv9cQrsLfTlzJquuauy/+OaRbkl3LndU96Rv7ztFwvjNVtaJWSId 8u0hKOrViZ4R3uMcx+M/636KSkRF/sI4aHZQG67ouOGoxw3nZ5/eAGQEfrhVJldPJtLH 9VHEvp4396IwSuUXQHEDVKPUgn7Sr9ajX6v7afuZZPZLn1vWPtVgb25Do43vvhXAapSY PSaVlJZ9fKxu6Js/AeImFG2s2jRROh08GxVYJKfGvQ42qIHSLVA1RvAfAXPtbkBOjMfK hzYg== X-Gm-Message-State: AA+aEWZKSYlJ+9312BT1d63D5oaMcOuABQ+81bhDAHOXJVCSJ4dSedkk SfN6mTdCoz/wHE9HUfijypKRujL54xY= X-Google-Smtp-Source: AFSGD/WI641ObEKoAlNKlHWs/DiyBm9grpPUe/QqWtADII7CdU6wVsoej1prujGCQ07P7K317EEnuA== X-Received: by 2002:aca:6155:: with SMTP id v82mr952901oib.259.1544179003477; Fri, 07 Dec 2018 02:36:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 7 Dec 2018 04:36:10 -0600 Message-Id: <20181207103631.28193-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181207103631.28193-1-richard.henderson@linaro.org> References: <20181207103631.28193-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::241 Subject: [Qemu-devel] [PATCH 05/26] 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, ramana.radhakrishnan@arm.com 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 --- 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