From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F0DF3CB2CC for ; Sun, 14 Jun 2026 16:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781454829; cv=none; b=lqBDoW+g/dZUV17Lqk68eImu8hz1UruDaPtUtcsLH2gloeF/qRSRB19B2MklcJ1tupu0xTFam4tR0uyyvwoIYIijJcVb1Aj4BXZDegHzMS1F0R91U+z+23Os8Axemm6LaUqCw7/OiWIfq40elyya+7MpxrbtfX5kfuaAfYIiHhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781454829; c=relaxed/simple; bh=G59YdLXk1qJAnhUOH0k9EGm1DFUTtF7E8+VfExmWg8w=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=cOFYqMIgC/f0/B0MikiXiZutzljo30j14/x7PwtGIyetouHop7jrfOtpECPQa/4eJOfDxt/D49ZHMWevXqDaZUsSXy7SDhS9TcFp2JZbex3/02tkqeFL83gCxx+faaaLmormqveMgsTn+DLTG2TCx7VgZtV/dHFa3xKMd5aFXE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--tabba.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=E6x+2QE2; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tabba.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="E6x+2QE2" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-692f2e028fdso2080050a12.0 for ; Sun, 14 Jun 2026 09:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781454822; x=1782059622; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=P0JxDDL/a2cg7BfWdupOKX50oyJPHi3eGmAcnoWVFfs=; b=E6x+2QE2ugirlNNQXEgD39w8jwCced7Xodrc6XFoqhUNbwllulADffv4A+VqAD+UTP HdBt+QuTgN/iUK9/7a815wpZpdSoNwBpnMkvb4mdAr56xkq6ToZu/YTZ16h412EryWuf o8mMCLoevFpyiurLfvGYA0CvMKXgn6l/1jYTqbLzPSv3Tr+Xij5BJsGCu77BV9UZSUhp P/M895FHVbuzWRLmpWK6QASdvwoxSVM22vYM+fmF2gWSAiIGEqL58ZUmSWrM7n0oqg0N qQVLUYuro6VQU5PHlS0L1TDMnz+k1pG0qcIn4+3TOJVX0jUNXyVy/YhrHiIS7o52thvl B9zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781454822; x=1782059622; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P0JxDDL/a2cg7BfWdupOKX50oyJPHi3eGmAcnoWVFfs=; b=CWlCsmEcXk25RR0UbIYtNUjbC3PTgt3qDRbE54wORU/XosNulGwuSK8W1Y3g+vX+uB 4VVYIFH2c1FCfPpo9Jb5my4/Qx+fXN8RUazH9z0WAa78C1+2K8cVnAue3KR3b1+p3Jeo TSAzbxx9j5KHngbcaz5nyYOwSxLu8HjeGISwo9TdQ8A4BOuxNRa5sWJpi8f3ACwwRLXf 5k2xdRjbrYj/81vCOYKVyyfhDnRDNfldfavJcFkUXex/9wCGM85QZD+sqIBW5rb+UcFG v+IGGmE5Kt2xphaHlw+WLTzeGrUR1Z32Y46QmxS0TtqCr65ZSYhd1kuesQDjaQOVErAx jcXQ== X-Forwarded-Encrypted: i=1; AFNElJ8Q49NJRXCIKsAtQ/yQ+gV6AwkpKBBvcepEjwPc2Io1Jy1euMV9/D0g+hCgcm/aqIT6JNUDVbyTQNc260Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwGvV/OELHrpxN8xIUYrCmMOx43mWGyh1xEdop+KD1myPkvNQtE kOdb66W+Uss1RqcAypEP1FZfZ6jbrAQQx6dWIoSSGE7hK/8Wu3EVbye8am88MdXS5/1NYpevvcA xwA== X-Received: from edup20.prod.google.com ([2002:a05:6402:10d4:b0:68d:af88:b33b]) (user=tabba job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:350c:b0:687:9c0f:5897 with SMTP id 4fb4d7f45d1cf-693c6a16992mr2491039a12.9.1781454821737; Sun, 14 Jun 2026 09:33:41 -0700 (PDT) Date: Sun, 14 Jun 2026 17:33:33 +0100 In-Reply-To: <20260614163336.3490925-1-tabba@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260614163336.3490925-1-tabba@google.com> X-Mailer: git-send-email 2.54.0.1136.gdb2ca164c4-goog Message-ID: <20260614163336.3490925-5-tabba@google.com> Subject: [PATCH 4/7] KVM: arm64: Set IL for injected FPAC exceptions during ERET emulation From: Fuad Tabba To: Marc Zyngier , Oliver Upton , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Vincent Donnefort , Sascha Bischoff , tabba@google.com Content-Type: text/plain; charset="UTF-8" The FPAC syndrome constructed during nested ERET emulation does not set IL. For FPAC (EC=0x1C), IL reflects the instruction length. ERET and its authenticated variants are always A64 32-bit instructions, so IL must be 1. Fixes: 213b3d1ea161 ("KVM: arm64: nv: Handle ERETA[AB] instructions") Signed-off-by: Fuad Tabba --- arch/arm64/kvm/emulate-nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index dba7ced74ca5..4b39363cf891 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -2777,7 +2777,7 @@ void kvm_emulate_nested_eret(struct kvm_vcpu *vcpu) */ if (kvm_has_pauth(vcpu->kvm, FPACCOMBINE) && !(spsr & PSR_IL_BIT)) { esr &= ESR_ELx_ERET_ISS_ERETA; - esr |= FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_FPAC); + esr |= FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_FPAC) | ESR_ELx_IL; kvm_inject_nested_sync(vcpu, esr); return; } -- 2.54.0.1136.gdb2ca164c4-goog