Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4998219rwb; Tue, 8 Aug 2023 18:27:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5Oa13XHNVrwiuvoWOhIYK9GDjcZN28GeMrfrydKkZJOGBMgrX52f4wXlS2qO0tzp9xXup X-Received: by 2002:a05:6870:390a:b0:1be:fc52:d532 with SMTP id b10-20020a056870390a00b001befc52d532mr1543114oap.23.1691544474012; Tue, 08 Aug 2023 18:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691544473; cv=none; d=google.com; s=arc-20160816; b=Nr8Ls0ZaVUYLoQZtmzQGePC3f51JawSmgK6MUYNCjHs0IYoPYbPC6FcaBpqwlFsDmK 8iPc0Pt0iUQSuU6emplCcwqubwPOXtqebn8WngApFNMaSYpxg/XdmMSXFpHaozgAyQfU WWeySWi59BRqdFnSwrA/9+WmZKe6jkT0gUL8eGFhxN2+sjCNQOlHT13k0iMJNRq+tT8C ExaSJTUVJvft2SQ6RAFYghoRZLpYo2DZWJIHGm/xXtqNiwHjDJG+MAJfEy6BAevbtkCf mCkunF4qEIr5LfURwEDQtN6Ai9kVKuBb4z4sqN0luQmwova8k/13muiMdSxwovhg1mip dYrA== 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=fF9z3Q1T3iKa1+NaqgmsAKQ9ZnVImh9YcGmD8OzK9j4=; fh=JR+gzu7F1SrtWWbHsiT7UPttLnQsOlcDdqVQ8y19PD0=; b=Lm1CJS+Mtt0KBXDFxECujcADFASsATFv3Recvi2SgWt8Vb1EfyCZtCA0mxasDtbI54 n2OHBOqr4/UV1oOSx0/E9AEi25ZwFbVCr6h310hlC2h8OaWrPt/8aMHio1pf1peg1fTG 6Q9ll+ghCo1KCJu2TcsB/njB7rT2RTZpMPCHJN5Cg1LzAoXnQoGAomoAkCHHEWQAXuUH XTJswACGLyQFetIEXTOSJH+kSfO4I6tWNPM7AUgFkpQ7H3j39Lub6Ck320k4baFXyZWc JapD3KmxpYxS7EMYTtExxCNbqvh2N3aodZemAKSYftQRvX/Igp+XrLd5jpd5xJldPocS DFZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Ld1x0UAA; 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 cb8-20020a056a00430800b0068208d19b15si8057916pfb.249.2023.08.08.18.27.42; Tue, 08 Aug 2023 18:27:53 -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=Ld1x0UAA; 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 S231472AbjHHXNk (ORCPT + 99 others); Tue, 8 Aug 2023 19:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbjHHXNi (ORCPT ); Tue, 8 Aug 2023 19:13:38 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D6B199F for ; Tue, 8 Aug 2023 16:13:37 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d1ebc896bd7so7222650276.2 for ; Tue, 08 Aug 2023 16:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691536417; x=1692141217; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fF9z3Q1T3iKa1+NaqgmsAKQ9ZnVImh9YcGmD8OzK9j4=; b=Ld1x0UAAPCU2iNVMHuMjG6B0mRqC01G5XmrR49OD5ekBM+hQ47Lz1vPTQOE9Tr5Br5 BX4nU2fyQoGGqakeZ7MocsuWSlLwxNgdhGBwiNTVlmTbC+b+hhEmvF5KQzcDGXQHniHf dyBlM/h1HcV1T3N3V+nLOLW7Ezrkt/Pno3Kgysbh2Q6+afbzKckk0AnL00fLjdc2sRnT VlzSKBNqhrU3kXNgERrGdXMA6yHTAQeK1SKxpS4/hFwjbsJV3fXh7O3sMLhqgXSqH2/5 7bx3QZPwlmmukhHDNyNKKv+4o0fEeYSAzOCOzLhRc8WynuLwSpq0v0AjFElLDtSI3e7L E4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691536417; x=1692141217; 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=fF9z3Q1T3iKa1+NaqgmsAKQ9ZnVImh9YcGmD8OzK9j4=; b=TApuT92MDVWqK60C0EbfKC13uy/9FFr7WwOtbmzRzV6AyVPWaNjqvGvq47mFv4BFVB VOjBnS3UoTN5yYp5BxJIR69dwZdOHvKZvg/OpMbekbrEwLSDCy6mPcNbJiBasSHTFcG1 M/yvsN3rujHj4UiuAxc6WzFzOfdEO1VgYzkieUVGJs8GZ3P8G6IoQWiBKtvLDfnMu7/N gJfOIplYvKkGyecPG5E0vFgpOQ8aGA/1Ze3o/lNFDxnb7bLZ7KczVCBMaqVXV5MMlX0B Xli25Lfau+nhUqBTBzKfIK+Hq+pFZQ6X5Z8iEYXtP7BApapxxNz2d5//sS64oo5uC+2f m2FQ== X-Gm-Message-State: AOJu0Yw7SPoI18HEYaZKUc7w59UXRMK9QANM8yECCsRSSh6afIGlWzml +NQDkcEa8Z2APaO8OLzKqy42nMt6ClfO X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:22b5]) (user=rananta job=sendgmr) by 2002:a25:3288:0:b0:d44:585f:dfa8 with SMTP id y130-20020a253288000000b00d44585fdfa8mr21095yby.0.1691536417147; Tue, 08 Aug 2023 16:13:37 -0700 (PDT) Date: Tue, 8 Aug 2023 23:13:18 +0000 In-Reply-To: <20230808231330.3855936-1-rananta@google.com> Mime-Version: 1.0 References: <20230808231330.3855936-1-rananta@google.com> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog Message-ID: <20230808231330.3855936-3-rananta@google.com> Subject: [PATCH v8 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 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 --- 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