From patchwork Fri Aug 30 04:35:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 13784303 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 DF958CA0EE0 for ; Fri, 30 Aug 2024 05:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To: From:Subject:Message-ID:References:Mime-Version:In-Reply-To:Date: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TE+5gi+Y5s2UjnUAG5iU9KHZtarmS/zpW8eo5VQ9zdI=; b=kz4S/LuEZ/uUDXqM8Dz9djno+R yaFPYSHm1UL0/fOzzSzS/KXEfuEbgsKADIes2KJEQ9cskSOenIxg//d/VUPK/V3AjReOGk5SpPYLR mEN67hUHK8xz5wWbydIbrxI2JDkzBH4DLAyK2XSeTKhcLG1PHKMIypOiDMtyry5xWv+6C1myJIKBA 6Wcd/t0yh0oTghg7Gtbou6JZE+toyO/xhJSsSl3ZNFpUx3nDmBUshEZA2H51UA/FIX1Sryn6Wxh/B ax0eg6BeU5ZiG7b8eNEbV/x8hwGIfPRLcrTNtiiqE0+mQXgN2Who8YTHkqEkohUQe2LjG8rFSkz8j owOBTx3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjuSZ-00000004qg5-1UmG; Fri, 30 Aug 2024 05:46:11 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjtN8-00000004fxS-15c2 for linux-arm-kernel@bombadil.infradead.org; Fri, 30 Aug 2024 04:36:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TE+5gi+Y5s2UjnUAG5iU9KHZtarmS/zpW8eo5VQ9zdI=; b=ZnoEadSdzTq2nIwltvQtEngXy/ xHw5wu0CeTcCMKoIsb2CZpEgR0hH8Xc3JmgnZthtA/hwaA74Fzms5DY+dWq9Kb4KCCjkGODHTHME1 7F1yxBnppQaYxwdILL1hHLsFSwP1PdoAPXEY2tmudHK9BupJv5HNuJfLZXj+VUNzvUFKSKEVrWtGR /PoymbndA0VUU97hzh2cSF7shxZ2TTKOoeNYmXqpuBNGyuVMtmaouTKglaeL7/ZIODWSH8snfR2iw EQ3YAOMiU5dHw2gDGQg5UuxT9Ju/JVqvXhAS4u8rol/oJcesAeRvj4N4pr9IlpQgmkM1M/oH8Xqfk sZ004FmA==; Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjtN3-0000000BYg2-3UxC for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 04:36:28 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-6d4629210f2so727267b3.1 for ; Thu, 29 Aug 2024 21:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724992583; x=1725597383; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=TE+5gi+Y5s2UjnUAG5iU9KHZtarmS/zpW8eo5VQ9zdI=; b=TuaQvboQpK36go7K4FEJOD9+MOF2Motaof0a68Ww25QJq9IWGIcUhz19TwPfemqMNp 2sjzNIKaVf3QB7VOFG5+obRL5/lru8P4XBk/qjt4z40Pmf7GZmZIQ37fxosujwFeeCVY 7KnUBo9VVLTbXOuIqEJVU/T8ylMOC48jfP+ZUGVJaDqnxEP03yPcQKcVXFYVhw2waDPz PLIoBxK7hGPHmn4aOqfu9Su5M8FGnFFt5k2ZayTpUbDyGUzJUbNhOCK9OGv9JG0EGNZg WdAHsEBm6LWH7g6bVH49Y5tKThSOkh3WNiJpLUuwgCmsepK2Py0G6LlCGHGqj/Chu7ZI Xz2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724992583; x=1725597383; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TE+5gi+Y5s2UjnUAG5iU9KHZtarmS/zpW8eo5VQ9zdI=; b=PMbR7/J6crI+KTQ21KrkMNE3WPtVunvmSBWlchxO9wLuvZpYxQPVRoNiNRBAPnOndK JGxrLsap25x3y9Q3fJ6SmIseaVTnca9znaNXISpUgk9hCZbgexBARZiD5vMeMBT8X/me cCfM9VSAqqzIxnRW7Ks2sxM2TBssf2RDU370vlUBloCUYafmhDnDhv9xbei/OascbwJt ycYBHv6FwS6c8U48s05GyLtNcU3gShhgqS2APhyraFH6mJUXxOpBNugrroqP58OL86Zs A3iF9j59yvI+gJijmDG/JLUbc2gihWj8YQhM6IfT0M2mvJspKFsBOH3CrAL5bwVasCTd kJig== X-Forwarded-Encrypted: i=1; AJvYcCU22TneGFfTYCDwmK7BH4OyCZRaJFdJD4jRjrlme+5c2F9b/F/O0uJiJS1EqxU+nFnEm04eRFMPMTiUUT4Txy/T@lists.infradead.org X-Gm-Message-State: AOJu0YxwaCS/p2dzsk5qlRBWnkN1flwGuWZ8hN/rQyqstNN3dSjhG0aw fkIX/YFaVJsjHREjPFIyMwFLIASTrUKDDrSAdPIbT6ThXvvmlLDkoiOGNfV72qS5qN5isq8JHbN 8Ng== X-Google-Smtp-Source: AGHT+IEXYjrPpdSD9GCwnZ0KjOxH9R7+gkyemXpF0saWXSC27VIOQKo5mk3or2G4Gxywo/W1sZdwv4+QKmY= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:690c:dce:b0:6d4:30f0:3a74 with SMTP id 00721157ae682-6d430f03e05mr846777b3.6.1724992582796; Thu, 29 Aug 2024 21:36:22 -0700 (PDT) Date: Thu, 29 Aug 2024 21:35:59 -0700 In-Reply-To: <20240830043600.127750-1-seanjc@google.com> Mime-Version: 1.0 References: <20240830043600.127750-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog Message-ID: <20240830043600.127750-10-seanjc@google.com> Subject: [PATCH v4 09/10] x86/reboot: Unconditionally define cpu_emergency_virt_cb typedef From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Chao Gao , Kai Huang , Farrah Chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_053626_249432_2C7D64F8 X-CRM114-Status: GOOD ( 10.78 ) 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: , Reply-To: Sean Christopherson Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Define cpu_emergency_virt_cb even if the kernel is being built without KVM support so that KVM can reference the typedef in asm/kvm_host.h without needing yet more #ifdefs. No functional change intended. Acked-by: Kai Huang Reviewed-by: Chao Gao Reviewed-by: Kai Huang Tested-by: Farrah Chen Signed-off-by: Sean Christopherson --- arch/x86/include/asm/reboot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h index 6536873f8fc0..d0ef2a678d66 100644 --- a/arch/x86/include/asm/reboot.h +++ b/arch/x86/include/asm/reboot.h @@ -25,8 +25,8 @@ void __noreturn machine_real_restart(unsigned int type); #define MRR_BIOS 0 #define MRR_APM 1 -#if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD) typedef void (cpu_emergency_virt_cb)(void); +#if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD) void cpu_emergency_register_virt_callback(cpu_emergency_virt_cb *callback); void cpu_emergency_unregister_virt_callback(cpu_emergency_virt_cb *callback); void cpu_emergency_disable_virtualization(void);