From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D14F622 for ; Thu, 30 Nov 2023 01:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yAFamB+B" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-d9caf486775so496209276.2 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.linux.dev; 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=yAFamB+B4Ma8tTiXEGOg7Rm5IXekM/j7TnGdzH21r2exgOX2jBQWbm86hUsMniZHde HqvL/aDuP8ZAyz+cC7lrhyJK+I/3b/H9FEHxYzHUvi0V2Dn0vjpwaxB6OiEFQlAkEfgs S9q0R3NUjYyp+trmngFys1L/1+yAD6JOoPdDi9JY/i4hDi8jX6z7uh/L3aEDpzuKoOV3 4BaU1YpPglL7qhNN9tGrfM/BUaWk8g7w5nvG4lV4M+E9xaM5je7rMEVoVqV6iKQVLZGw TQpSKoenarKUT587a/qvKh/6qtf/pgpKXTvC2ySGiHTN8WUm/l48c6XD11C2oUNTYm4X y2Cg== 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=as3gVVvGIg1bJdw93o2j2Fu3O/iCbxI0iUHHVCygiPU72OooZa0fiOrfws1sZBEFm8 Ak3+O+cVKgZ6iqyoMh0rQiGKh0kvwsdCLLClCtq9ByVv+uyMHoaHvwuhFpA6IHT2UUir +UjBP6GroIDVpNTjhg8PBLHNnVI5mkk/xSDYnyEvg/oYRWtPsYiVH5Pe1zpI8KQH7A2Q dqmw9tqwtu1MuqUwO6JuEJ4zDSe7bL9vt+nYdL5dVqR3h8TP1TdH7LwHZBVR7yM20m8c 5r0CyW3c/QnoqVfeZW7JP/B4LjArM2hs0hVtq0bP8TzstxOXRo6RejtIhVV1kiTZBDuo XvlA== X-Gm-Message-State: AOJu0YydizZaczx57tmCuXwC4nAEi+9sxGeli/2vQ965T0WUnrI1Ld/l hYdSnQgFymxi0mei3oDZbyKXs1y7/PA= 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> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Type: text/plain; charset="us-ascii" 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. 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 E36EEC4167B for ; Thu, 30 Nov 2023 01:08:38 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=TK+09sR+; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4SgdP13KDYz3cVL for ; Thu, 30 Nov 2023 12:08:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=TK+09sR+; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--seanjc.bounces.google.com (client-ip=2607:f8b0:4864:20::1149; helo=mail-yw1-x1149.google.com; envelope-from=3yubnzqykdpmnzviexbjjbgz.xjhgdipskkx-yzqgdnon.jugvwn.jmb@flex--seanjc.bounces.google.com; receiver=lists.ozlabs.org) Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SgdN63bCqz2yDM for ; Thu, 30 Nov 2023 12:07:49 +1100 (AEDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5d2f58660d4so6193027b3.2 for ; Wed, 29 Nov 2023 17:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701306466; x=1701911266; darn=lists.ozlabs.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=TK+09sR+TVqoI+6aALGN9bo9aHX2S8PLVXGnOW06ub7v3q7ISBZhIlDRQLHi+57Umm fRA7Gn8Y/DI0ibkd/6WC+g7cVv+GXP6NWJldHI5Ah7OUUZEntTeJAPUTAvayxHx/Y637 E0458w46dGzahcS4me+4Z6UyQjjU5WYSFo7Yr6Rxp7oK055+y2lrKYD64FN3jZ/DUXgq Ty8vcnAvkRIUkV3oz010obke5Mjxl43TTqSr0fufRe5cwYZ/Oy2KFpzVBwt/RlsPmEXh 0h+HE75gjvMiGE/RisK1dL7Ew04zPQgZ1fPlrhmwp7Zp4NCmGcUGbIdi0xASNaQ12F36 wS1Q== 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=L8bg7md6q4tF5lZBPIR4xztEd8EKd/PZkhLEXipJXXgRh3rwoEvfuv02VSSMTWnPQv 9Y0lq5fQItkvw2GTXpNrMsUW+0ks3VoPflk1xtUG9+zh0hVH95QmtSH+9wFuZtwgyZN+ 5fg7pBlpwUn0/6yC66vEFNceae7RgffYFIe2KHJFk9BqWK5cd3UYafw7lVapX73gDzy+ iZpQ1GaISKgeHuxCRRErZT10Xhh5/wyaLJ8N2c+qm/KJo26YKe0QA//qW1XEwLe+v0Cm rnGom3YQLtcCU7BQFVcKs02ta21R0VdDF2NpreWcMZ9JSwGAcGB10oHb3fO1PDfBMv7A BsrQ== X-Gm-Message-State: AOJu0YyGSxBVy6+zBj8HVzwL2XCi9AO1V3L9elvG40m87hipCnpKtYTl ThRhIP/gCgG24JInq7q+tJRfZT+EqEE= 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 Content-Type: text/plain; charset="us-ascii" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Hildenbrand , Catalin Marinas , Dave Hansen , "H. Peter Anvin" , Alexander Gordeev , Claudio Imbrenda , Will Deacon , linux-s390@vger.kernel.org, Janosch Frank , Marc Zyngier , x86@kernel.org, Ingo Molnar , Jason Gunthorpe , Zenghui Yu , Christian Borntraeger , Vasily Gorbik , Suzuki K Poulose , Heiko Carstens , Nicholas Piggin , Borislav Petkov , kvmarm@lists.linux.dev, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Oliver Upton , James Morse , Sven Schnelle , Paolo Bonzini , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. 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