From patchwork Fri May 10 11:26:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= X-Patchwork-Id: 13661437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ADE0BC25B10 for ; Fri, 10 May 2024 11:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ilAmgBr3BuVniyUkM2XRpw73FRNJaBTfLJNVgvVPIxQ=; b=2etcb4sJD+gSavrBZXwslncwXz 9m1pdxrVVGki8Qk0hvgNdAE/PnRZMNd49YrSpsfFagspPU8vPzhbb+64pQkVkR1WfFj/sEh6P3xIU fU2thangr7eD1+ywUP2LoreYCk4M4raPgppl4du2ZkyyPj9eNGtVW3zc4mnBb9FBinJQd843pBjW4 Pbk2+BbGBAxRz+nCZWOqphDiFOdr9KLdd8kqFMcqH/OF1+6XaZt8SU7Q1fDaU9vhjtq+kq4zfYxRM yUr/fME7Btz//b4TA5PZ551VKxGFihdpmArm5+TWPKgBTdg7ES1uTngujREQ27RTnXU/Et7/y3ILm GfsoNsXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5OPl-000000053Ex-3DZI; Fri, 10 May 2024 11:27:49 +0000 Received: from mail-ej1-x649.google.com ([2a00:1450:4864:20::649]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5OPb-0000000534v-16La for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2024 11:27:40 +0000 Received: by mail-ej1-x649.google.com with SMTP id a640c23a62f3a-a5a180153aeso122655866b.3 for ; Fri, 10 May 2024 04:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715340455; x=1715945255; darn=lists.infradead.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=8DKhkb6dSizyRVlRq/XnhdKj6+BlqFPiK9mn9/+w2yc=; b=mAhOqwzWTwZ4KrRw/jWgv/vylVZejb29V/ys8svUI+msIwsRLu2bva4MRzNxuLQTPW MrRFUK7sJKYdUTq9Ar8anmAlD8RaJHvl/92o8xTJiiqZ902QEwlXLBYKWXXSoabPFyLV 3MC+P6N4t0ZjlWGwTM7EI5PMwBOu0xugsKAtDKS3Ot8iquaZUp5mI694d0nEU3ximRpK Rlehwxn0c9MoVwQ4X1PMfkhiUvN2Ehm1O2JM50jHKAjOSixgtL0X4sItf5kncfQz6pdY yOJSg7CE5pGbbyxabGwzhzqYUR3ds7y/MjNE8ftVLmZIVAYhxffvauGGdX/iodtbTjVI ZW7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715340455; x=1715945255; h=content-transfer-encoding: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=8DKhkb6dSizyRVlRq/XnhdKj6+BlqFPiK9mn9/+w2yc=; b=WzSE6Lgelive7DzbeZxreQNkGpeCj1bnnoxqG1whqY+MEcc9a7uYcUyz3niRUdoEkM ifQN9d9EPz//3OoOvacXfWaW+SJOhAT7iyCNis0tyfAvwOIxwH/UryfAIQOwioBIaaub lYlJnjPQMp/l8lYHzyRvZxOp+tGttKtFvoGSd792Ok4HE/9Vol3QE1DASYr2KWIFEDND NxP4sd0A0RogPa3ymVSCzDeLxN7bB4rmiqVYNcKVrqlnM3Xxpyj/7ukUu+qUudpYgQ6l 3ctcZPgE0f5YlgM8zCmJ4a3EfixRs5zhEEtE2GRzmrSzrt+8YyoEKA29RAJrQpMPxdgG ErYg== X-Forwarded-Encrypted: i=1; AJvYcCUeIHvqqpITqwTldAgmNwUfhbcbj2q9nX+bNpodxMceoepSMuzDknVYFblCYxwZOaC7d5hwAYDastHHwemtr/qlgyKmmB3E0rrO28c5w1EfVDY/pHg= X-Gm-Message-State: AOJu0YwFpE1wBO6gmYy2rojCPQjeM0sSl0QzTq6dNy4NwMhH74m5xzMZ qbxnmeH/YZ+GFsM10FBJi0iNVpXn0moYxoBGRcZLvRhyFkktIRUKskgg3nGGSjFaVSEEw/BWEw= = X-Google-Smtp-Source: AGHT+IGkpwxqeSN6EavlDA+BXVJp1GAbnEIVQnql+hC6cCYj3jthHFCaBNvnkUk/0Xp8MBeg6nGyR3xjIA== X-Received: from ptosi.c.googlers.com ([fda3:e722:ac3:cc00:31:98fb:c0a8:11ec]) (user=ptosi job=sendgmr) by 2002:a17:907:d383:b0:a59:dcdc:a490 with SMTP id a640c23a62f3a-a5a2d65d604mr184166b.12.1715340454681; Fri, 10 May 2024 04:27:34 -0700 (PDT) Date: Fri, 10 May 2024 12:26:36 +0100 In-Reply-To: <20240510112645.3625702-1-ptosi@google.com> Mime-Version: 1.0 References: <20240510112645.3625702-1-ptosi@google.com> X-Mailer: git-send-email 2.45.0.118.g7fe29c98d7-goog Message-ID: <20240510112645.3625702-8-ptosi@google.com> Subject: [PATCH v3 07/12] KVM: arm64: VHE: Mark __hyp_call_panic __noreturn From: " =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= " To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: " =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= " , Marc Zyngier , Oliver Upton , Suzuki K Poulose , Vincent Donnefort X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240510_042739_368436_855B6380 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Given that the sole purpose of __hyp_call_panic() is to call panic(), a __noreturn function, give it the __noreturn attribute, removing the need for its caller to use unreachable(). Signed-off-by: Pierre-Clément Tosi Acked-by: Will Deacon --- arch/arm64/kvm/hyp/vhe/switch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/vhe/switch.c b/arch/arm64/kvm/hyp/vhe/switch.c index 1581df6aec87..9db04a286398 100644 --- a/arch/arm64/kvm/hyp/vhe/switch.c +++ b/arch/arm64/kvm/hyp/vhe/switch.c @@ -301,7 +301,7 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu) return ret; } -static void __hyp_call_panic(u64 spsr, u64 elr, u64 par) +static void __noreturn __hyp_call_panic(u64 spsr, u64 elr, u64 par) { struct kvm_cpu_context *host_ctxt; struct kvm_vcpu *vcpu; @@ -326,7 +326,6 @@ void __noreturn hyp_panic(void) u64 par = read_sysreg_par(); __hyp_call_panic(spsr, elr, par); - unreachable(); } asmlinkage void kvm_unexpected_el2_exception(void)