From mboxrd@z Thu Jan 1 00:00:00 1970 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 B7F45C10DAA for ; Thu, 30 Nov 2023 01:08:18 +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=UyrT/j8m2jhZ/4uL71g+KC/pZNyHw1bFyCZ4LL0zM0Q=; b=3ie9tTcUQJmW6nv14+QlX0Vejp g8LkO9w/5dV2P9ZT9s3i5WnPM/2rRZA1KASRM+xoWYb6Lr3MikZWeJBnYCyT/amWYklN6HYa0IsBe D7TGxBh7R111pEwW4ldfp+h5bJ8fbjf/A8lbczMWgx1N9413IHiYbtsLY9Df3GW9lh7wTO9zbTqXe 5+ikvxrMMxsFHY8zzOdCqG3ztiYS5nLavg8EnlPjcVmvhfM5+7Jt5ON6etnEMuknNszi/RIw/WSEg d4n4z5I1T/+Ftp+ix5aRevakpZOzZnAtsOiE3JHSShXCBDEPDQWJQ9qTI5yJ97rnX9oou3ohRkXq6 1smuP7lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8VWx-009c6d-2E; Thu, 30 Nov 2023 01:07:51 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8VWu-009c5O-2a for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2023 01:07:50 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5cb6271b225so6318357b3.1 for ; Wed, 29 Nov 2023 17:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701306466; x=1701911266; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=6N0wFvlno3kNCM+277a2S5UNbGmqd2ft4cb10DJm/tw=; b=G4UlR6MOniQYrYy+Irn0NlDCVdfgkDKaaSeMgLt0w9Tvnzei0EmnPF3BBPa8iG3FAr GnFRB3v8WQvz5jaWZzgpv4cweIptMKVoUOylX66b8pbQ3WCiimTQI8iHamJImeOE6FR2 mCcEADQW5qZotyiZ/B8NUrnJm4NU/E8RW+rOYlpzT4neE6qp8J68vwxMIrz8ANSHXlF6 qOz49qJhDa50Mx/Hrdn5UvgULNZuV4akQVfT1sUL0L6a+jr14Q7fAG6tfCayKyxkXL5O 0lSZE08ed+2G00Q7TaeN/c5ZIgVK7+Vzh+Wr+EWrlMLaK6szXkr7uEi1DlxViR4tPG/2 SjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701306466; x=1701911266; 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=6N0wFvlno3kNCM+277a2S5UNbGmqd2ft4cb10DJm/tw=; b=Wd1WHLnfE0uIvuO3Np1hKelw3nuaCYrG2WNXLCjFf8gbSfBYngEHLHhl8gA69ZsdeN 9nycgOR1kGGDRXBeRqV2UawBzDKQtj6bdk/1s4Bq6Mr2wHGRz41M52knjkb6xJ4CecjK tV3p7oXLv91euNbPURpqjUOX12CaGWTJ6ndtV1Trzd3sKnGwioshRxJXBnBm6etbNzDR Fy2eHqxFTa10wYFvfw5PZxBuxPYeEFDqsWFjns6WneD9qFBb/sdrPrwj42eTzDysaoV4 EsLTyVlvR8yBwalpsmfV0tiuMs5HEYdSN/eex+moWKiX1iHXCf195Sp9Z8F3N1UylHBU nW+g== X-Gm-Message-State: AOJu0YzGMT9CjF00sUyLBdxveLc6JaEDaVulnKpCKW+7rfMxAyBv7+wO Y8nuiB9awqrGpGGCiu4y4bqbjMvyWFk= X-Google-Smtp-Source: AGHT+IFI+jDPj/rF774qvoJ2qWoHyFZGCHN96iaq8+b2ScA3/i76IDoNcSAJtId/pe2rL3s2OfV75Y20vgc= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:ca02:0:b0:db3:fc48:35f0 with SMTP id a2-20020a25ca02000000b00db3fc4835f0mr615843ybg.6.1701306466524; Wed, 29 Nov 2023 17:07:46 -0800 (PST) Date: Wed, 29 Nov 2023 17:07:45 -0800 In-Reply-To: <875y1k3nm9.fsf@mail.lhotse> Mime-Version: 1.0 References: <0-v1-08396538817d+13c5-vfio_kvm_kconfig_jgg@nvidia.com> <87edgy87ig.fsf@mail.lhotse> <875y1k3nm9.fsf@mail.lhotse> Message-ID: Subject: Re: Ping? Re: [PATCH rc] kvm: Prevent compiling virt/kvm/vfio.c unless VFIO is selected From: Sean Christopherson To: Michael Ellerman Cc: Paolo Bonzini , Jason Gunthorpe , Alexander Gordeev , Christian Borntraeger , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dave Hansen , David Hildenbrand , Janosch Frank , Vasily Gorbik , Heiko Carstens , "H. Peter Anvin" , Claudio Imbrenda , James Morse , kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Marc Zyngier , Ingo Molnar , Nicholas Piggin , Oliver Upton , Suzuki K Poulose , Sven Schnelle , Thomas Gleixner , Will Deacon , x86@kernel.org, Zenghui Yu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_170748_839365_EEDC610A X-CRM114-Status: GOOD ( 20.19 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 29, 2023, Michael Ellerman wrote: > Sean Christopherson writes: > > On Fri, Nov 10, 2023, Michael Ellerman wrote: > >> Jason Gunthorpe writes: > >> > There are a bunch of reported randconfig failures now because of this, > >> > something like: > >> > > >> >>> arch/powerpc/kvm/../../../virt/kvm/vfio.c:89:7: warning: attribute declaration must precede definition [-Wignored-attributes] > >> > fn = symbol_get(vfio_file_iommu_group); > >> > ^ > >> > include/linux/module.h:805:60: note: expanded from macro 'symbol_get' > >> > #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak,visibility("hidden"))); &(x); }) > >> > > >> > It happens because the arch forces KVM_VFIO without knowing if VFIO is > >> > even enabled. > >> > >> This is still breaking some builds. Can we get this fix in please? > >> > >> cheers > >> > >> > Split the kconfig so the arch selects the usual HAVE_KVM_ARCH_VFIO and > >> > then KVM_VFIO is only enabled if the arch wants it and VFIO is turned on. > > > > Heh, so I was trying to figure out why things like vfio_file_set_kvm() aren't > > problematic, i.e. why the existing mess didn't cause failures. I can't repro the > > warning (requires clang-16?), but IIUC the reason only the group code is problematic > > is that vfio.h creates a stub for vfio_file_iommu_group() and thus there's no symbol, > > whereas vfio.h declares vfio_file_set_kvm() unconditionally. > > That warning I'm unsure about. Ah, it's the same warning, I just missed the CONFIG_MODULES=n requirement. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel