Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3828458rdh; Fri, 29 Sep 2023 03:45:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHs58rbCF7kWe+zrxuOzRj+9pvThWxCDFpukdo2uVUyL751XRWYV4X8V8V9R4EmUCNekIln X-Received: by 2002:a17:90a:4ece:b0:25b:c454:a366 with SMTP id v14-20020a17090a4ece00b0025bc454a366mr3760209pjl.5.1695984330384; Fri, 29 Sep 2023 03:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695984330; cv=none; d=google.com; s=arc-20160816; b=L0vYKAEJDUuLkmCsjpK6JDo0+OURA+gaTHbY2IbNG6MAhzxmYwpOfR/wHN3/mTZPxH WNrI01WKFqy+wpQpA3Ima+yLSlWL7KWJaIksWYXIu+3Psw8wfaq757Z/KWI3X2oYgto8 DemnDUuJOI8OrFMvtt/vIPdgwvqXZ9cCxtBv7Mf7Sy9QrM2mOeI1aPddNOxG7niUZFAj 6vy9H0JFtP0ZVGa1lv12yiGysoDEwdGNCj11tWv8Va9r2IzJRvUVSw/i35jLjp+RtqHK G9ael2JuXqPfM9I8e/dBDrApyMyJ1MEUv0FRG3GM7msPbGwPS/yEfc/wFvkOkgpBugMs 8YXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=rT9am+jLmHorOzbZRxZ3QKMwJmosafd47BiiQuOc1Lw=; fh=brbVgFrtCTEER0oOudG8SRWryx8saMIRm6YoJHqrKx4=; b=CqCewvMDG7wjz5AwvrNlGaDe/QZMpU8OFtdEdCk6+iPqjy5uD5qsUyY734GTn2Tgco NVc1hF016Bvle7IIE1UM/KA6rAwV3JKhsSz/6ajtlaCAZcKHh7usZaEyEUyZDTdUEWUP av/lKpJkC/GfxB4/tkXmoPrmTIVicmMb4x2668fve80c28GwdGkmevTMKAfwqKXeEZUN hy1h1UJ7W6Ej2L7uVROjsSDlRcFsuX3yMSpOh4iH9nRHJtjhQVK6hIr4/SSIhWBUrUHL j0QiqCtY0NVQUKXfXRJdWkE3zat8rHJVpRrm3REyjp+k1HzKHCIZeZY//HUxgdNZK/RJ exHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hgUc8sqz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s20-20020a17090aad9400b00274dc876792si1243972pjq.98.2023.09.29.03.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 03:45:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hgUc8sqz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A115E802CFA7; Thu, 28 Sep 2023 15:23:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232649AbjI1WXS (ORCPT + 99 others); Thu, 28 Sep 2023 18:23:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232622AbjI1WXJ (ORCPT ); Thu, 28 Sep 2023 18:23:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F8D71B6 for ; Thu, 28 Sep 2023 15:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695939698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rT9am+jLmHorOzbZRxZ3QKMwJmosafd47BiiQuOc1Lw=; b=hgUc8sqzTnH/mSPVzvy2P9DhDFskybZw1lsg/2CppeFl09UTTaihCUCRxhbXbblrHvT39s TQhsGaKcBU8HIMWzo62Pl/jeDqE2z7BVP2UU20AdFmc/C+aPuDJ49OhQ1W4/JY3ArTAWd3 dhXsKeZ61tTjhbZ/DUQX0TWmwY3U4QI= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-RZTRWL0TOjCVpsuhY4fdHg-1; Thu, 28 Sep 2023 18:21:37 -0400 X-MC-Unique: RZTRWL0TOjCVpsuhY4fdHg-1 Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-7a25e4045c2so83766139f.2 for ; Thu, 28 Sep 2023 15:21:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695939696; x=1696544496; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rT9am+jLmHorOzbZRxZ3QKMwJmosafd47BiiQuOc1Lw=; b=G4X+/PjrnAvSnTlGIzyqkqY/U5dHuVlOgMpOTywYckKzo9Paj/156HpOLDqG/V7YkB nzsOxdjVuUMigejPxGnAsfS/HWLg7t6LMPRXYStNeaIAILuudi/PVCqKu73cnFs4nMRM MlMIyq500YNDoG4aGXKiQHZEaEvU2ksAm0/37ESYeEPt840A5gV1oPh/AeN6B8ZhvRyv UFR6aWtbMg1Cyem/7Zzb8wLzyyyFrMBLImZ4GOu35vc21xosi3R9qK7Siz0YgdfLBfYs cehDYWlwULi16TiEgrJmda5n4APQAfJDrOBIKsNM9CoxrVSriZlTkyho3oVABgkwHHra cELw== X-Gm-Message-State: AOJu0Yyo9jnt/5F5lKrkMs2U3QSXWbap4KHwgRKzd5wUBUNTOiY8DduG w+6Ne7ucj+yPYi1QaQXImbnpEqF0NOZzHirzXJXTgZiMBJRKS1IC0Le+6dVOF7+JvCPkbu6Ind9 K2+DSo7ZEGqy/Uy2M3H20390x X-Received: by 2002:a6b:a12:0:b0:792:792e:6619 with SMTP id z18-20020a6b0a12000000b00792792e6619mr2823006ioi.2.1695939696197; Thu, 28 Sep 2023 15:21:36 -0700 (PDT) X-Received: by 2002:a6b:a12:0:b0:792:792e:6619 with SMTP id z18-20020a6b0a12000000b00792792e6619mr2822961ioi.2.1695939695939; Thu, 28 Sep 2023 15:21:35 -0700 (PDT) Received: from redhat.com ([38.15.60.12]) by smtp.gmail.com with ESMTPSA id t23-20020a02c497000000b0042b10d42c90sm4610172jam.113.2023.09.28.15.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 15:21:34 -0700 (PDT) Date: Thu, 28 Sep 2023 16:21:03 -0600 From: Alex Williamson To: Sean Christopherson Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Arnaldo Carvalho de Melo , Paolo Bonzini , Tony Krowiak , Halil Pasic , Jason Herne , Harald Freudenberger , Andy Lutomirski , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Anish Ghulati , Venkatesh Srinivas , Andrew Thornton Subject: Re: [PATCH 01/26] vfio: Wrap KVM helpers with CONFIG_KVM instead of CONFIG_HAVE_KVM Message-ID: <20230928162103.433f03db.alex.williamson@redhat.com> In-Reply-To: <20230916003118.2540661-2-seanjc@google.com> References: <20230916003118.2540661-1-seanjc@google.com> <20230916003118.2540661-2-seanjc@google.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 15:23:27 -0700 (PDT) On Fri, 15 Sep 2023 17:30:53 -0700 Sean Christopherson wrote: > Wrap the helpers for getting references to KVM instances with a check on > CONFIG_KVM being enabled, not on CONFIG_HAVE_KVM being defined. PPC does > NOT select HAVE_KVM, despite obviously supporting KVM, and guarding code > to get references to KVM based on whether or not the architecture supports > KVM is nonsensical. > > Drop the guard around linux/kvm_host.h entirely, conditionally including a > generic headers is completely unnecessary. > > Signed-off-by: Sean Christopherson > --- > drivers/vfio/vfio.h | 2 +- > drivers/vfio/vfio_main.c | 4 +--- > 2 files changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Alex Williamson > diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h > index 307e3f29b527..c26d1ad68105 100644 > --- a/drivers/vfio/vfio.h > +++ b/drivers/vfio/vfio.h > @@ -434,7 +434,7 @@ static inline void vfio_virqfd_exit(void) > } > #endif > > -#ifdef CONFIG_HAVE_KVM > +#if IS_ENABLED(CONFIG_KVM) > void vfio_device_get_kvm_safe(struct vfio_device *device, struct kvm *kvm); > void vfio_device_put_kvm(struct vfio_device *device); > #else > diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c > index 40732e8ed4c6..80e39f7a6d8f 100644 > --- a/drivers/vfio/vfio_main.c > +++ b/drivers/vfio/vfio_main.c > @@ -16,9 +16,7 @@ > #include > #include > #include > -#ifdef CONFIG_HAVE_KVM > #include > -#endif > #include > #include > #include > @@ -383,7 +381,7 @@ void vfio_unregister_group_dev(struct vfio_device *device) > } > EXPORT_SYMBOL_GPL(vfio_unregister_group_dev); > > -#ifdef CONFIG_HAVE_KVM > +#if IS_ENABLED(CONFIG_KVM) > void vfio_device_get_kvm_safe(struct vfio_device *device, struct kvm *kvm) > { > void (*pfn)(struct kvm *kvm);