Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp792623rdg; Thu, 10 Aug 2023 22:41:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHtHt+uDQwxipz5+/TjDdhkyMMJGGCASfYy8j8LWJF5+jAjNB1ds0RFqTYTG651A4hDGdd X-Received: by 2002:a05:6a21:7903:b0:13b:a1eb:79e6 with SMTP id bg3-20020a056a21790300b0013ba1eb79e6mr925238pzc.53.1691732496432; Thu, 10 Aug 2023 22:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691732496; cv=none; d=google.com; s=arc-20160816; b=xe7jI7xkSNe3mBDTe1Lutz2xHzPFge3Hps12e5dhEhc2yF1ZqOvUgGnrJCWavoFiPA 5NNIJZRbUsvEfF6VvKyqewNc3afC3A836Hpj58ex7hrQH340PFgp6yr+EeMRf9YIX8KO zG3PpZFJAYfZ5KZc5OHWCR/7PVLECcViLuTZ/fMtd9talgMau14srZTRBJI/Uv0B5Hxq p8qsQmbQ0859RDLZT2jdp/2fpOR+lTcqZTzAvik7tvVrjnHGmcsyK+AsUywTfIRgYGZK FWB0ySUENfkyFOf788ljfn68mRXEkFeQ3UHCDK9zZnzysDY32kdwvrgySj9+W7HbMjnr uW2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=FjqK2i9iNfdCdXxEpH6EmuQikOPCWBkIYlUFD/yGaDg=; fh=gCmhkkXOGzgKShDZ1VA8I9oX8b+8AoHFoFVURxVyzH4=; b=R6LdBMwkoFnR18U/ToU4yi1ns96Fmq63DjjBNr0h5ZVhI96z+ROLYOUgbaAWEqJcaK YxWhsDhk8N7dYTgjjjEUAX/esyVZA0Mz880mrQ1WF6G4kGI0x50OekTgVJjheE6leosM 5Qy6skhd0/s6GdxuOCsFlB7KkjycXy92xLfuuzy8MzWhK6mK+H1VfbD0/0bixX8fJbPG PoIw0iJY9WvsbrbqGIlR/889UFVnAbScC3Hh7Tx+EoEzSjC6LXuOFkuXM5wKflQpmm3V 0JqpBZN9NV5Rbop43AKQ7Ly4nRiD7pVJhFiVU2funoY4EMQVRfHDPv7C1Ic0b1/P7FcT eCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=r3i6w54c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170903018600b001b8a70ee029si2798069plg.449.2023.08.10.22.41.23; Thu, 10 Aug 2023 22:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=r3i6w54c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233520AbjHKEvq (ORCPT + 99 others); Fri, 11 Aug 2023 00:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjHKEvl (ORCPT ); Fri, 11 Aug 2023 00:51:41 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70F72D5B for ; Thu, 10 Aug 2023 21:51:38 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-58419550c3aso20135257b3.0 for ; Thu, 10 Aug 2023 21:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691729498; x=1692334298; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FjqK2i9iNfdCdXxEpH6EmuQikOPCWBkIYlUFD/yGaDg=; b=r3i6w54chxe/m30aMtVSgvkKBw1KsUaf9mnPdfDF9T7G23UAZLBlzAbYwBcw+8/TEP TIXUprktoIJvbhghifoTokWKfb3fsWuJEGznw9UnxoxDzZASXjGptbwbxjCA6kWdWKbv 1BXyNfas0RyElNo3kSpbNMxJzkQ5DV1JnViee3PvCsXKXzhyRRy66gQtf/gMlx6nPZLS W3ZvPJVBTfpDVbg4rpa+Yudvhp7wHsWOtEJhRLCCZ4ljXaPQ97jKH76YhbAKHzFA8haO RHWuu4Ft7sFeRAtPpG2uAYJ8O0PHxSXrSq3mACDc91bgObmkiHbVAYRiWp4aDtF5bXrr V1ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691729498; x=1692334298; 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=FjqK2i9iNfdCdXxEpH6EmuQikOPCWBkIYlUFD/yGaDg=; b=Pct3P/ckBkKoYfp12Shxqk18FYMbnrH33d6U4pGLjVxMt8OllgH7X+Tk8fwIFfUW7V 3mYtRCVEOrYKsEck0PD3lzNivNFUHLv4Vo+LM2+c0aHMiD0SapHhCuxeSNA2HRm7X9zG +7b6f6nz9H0atbCqX7U4xw9mDBk310CXipcwhq8/XNUYbBjY8F49kLzfG97SOf61pCrn 8KleLxMXM75B3ugLLAIrMoC/U+Tf+/FVcJuLVtmkOTSkYmtsGtFmcV3tmPcB/niOCXT3 0MkB2ZA2VMtYILwYqkr30+iRLH5u2Bz103SrYQU16lZE+3vEe85/zhlGLR0vjlQYGckm BdOg== X-Gm-Message-State: AOJu0Yx0QAgyrQz1dRBXmYsJ7wcWil0iQ6V9XvjU8EVZwzFV+wpCLixA r6RRezrxo9Cvmcy/hkWyYW3oSkV9x7JB X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:22b5]) (user=rananta job=sendgmr) by 2002:a81:ae0e:0:b0:576:8cb6:62a9 with SMTP id m14-20020a81ae0e000000b005768cb662a9mr13062ywh.6.1691729497878; Thu, 10 Aug 2023 21:51:37 -0700 (PDT) Date: Fri, 11 Aug 2023 04:51:15 +0000 In-Reply-To: <20230811045127.3308641-1-rananta@google.com> Mime-Version: 1.0 References: <20230811045127.3308641-1-rananta@google.com> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog Message-ID: <20230811045127.3308641-3-rananta@google.com> Subject: [PATCH v9 02/14] KVM: Declare kvm_arch_flush_remote_tlbs() globally From: Raghavendra Rao Ananta To: Oliver Upton , Marc Zyngier , James Morse , Suzuki K Poulose Cc: Paolo Bonzini , Sean Christopherson , Huacai Chen , Zenghui Yu , Anup Patel , Atish Patra , Jing Zhang , Reiji Watanabe , Colton Lewis , Raghavendra Rao Anata , David Matlack , Fuad Tabba , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Shaoqin Huang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no reason for the architectures to declare kvm_arch_flush_remote_tlbs() in their own headers. Hence to avoid this duplication, make the declaration global, leaving the architectures to define only __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS as needed. Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Shaoqin Huang --- arch/mips/include/asm/kvm_host.h | 1 - include/linux/kvm_host.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 9b0ad8f3bf327..54a85f1d4f2c8 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -897,6 +897,5 @@ static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {} #define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS -int kvm_arch_flush_remote_tlbs(struct kvm *kvm); #endif /* __MIPS_KVM_HOST_H__ */ diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index e3f968b38ae97..ade5d4500c2ce 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1484,6 +1484,8 @@ static inline int kvm_arch_flush_remote_tlbs(struct kvm *kvm) { return -ENOTSUPP; } +#else +int kvm_arch_flush_remote_tlbs(struct kvm *kvm); #endif #ifdef __KVM_HAVE_ARCH_NONCOHERENT_DMA -- 2.41.0.640.ga95def55d0-goog