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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2024C10F27 for ; Tue, 10 Mar 2020 08:43:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8A297208E4 for ; Tue, 10 Mar 2020 08:43:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="iEIi6bYb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A297208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F2D806B0005; Tue, 10 Mar 2020 04:43:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EB82D6B0006; Tue, 10 Mar 2020 04:43:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7F6E6B0007; Tue, 10 Mar 2020 04:43:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B8EC76B0005 for ; Tue, 10 Mar 2020 04:43:33 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 397B621E4 for ; Tue, 10 Mar 2020 08:43:33 +0000 (UTC) X-FDA: 76578813906.13.team30_7640f32a2fb4b X-HE-Tag: team30_7640f32a2fb4b X-Filterd-Recvd-Size: 7372 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 08:43:32 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 25so315868wmk.3 for ; Tue, 10 Mar 2020 01:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DYA7BZb39MKDC8qklnJCLBS4YWQvxLUiNIQ+Da1cYlY=; b=iEIi6bYbOtvsYr2kXQLs5I/aXFNWwt90dLOpCBZzYUfQ/sAnJUoMsNQCHdussbyfmm bsWPM4ITWAlUUumo0xINkbry2IlMEVY4HpiE2IZhWk3cFGFkl1VrNJimaSAgoeWB7WJ5 np/iXY1ZmguYoAk9urEZKTt7TiMadxxjJkC0JKTme3Vb8aqZ2LvndPCRZk0+Ei3vV6my 5ZluJg/iu+6YWzd6BmOdD3AM04iRninzPz7XflOxJGfhTZAZ87KJeBWwRogStnNcAIYn wIzh3AIKJCaRp5SEFer15gM1igFcPeumxQ+p/bJ3ZL+ohRRjM3h/NhGDbRnB7GXa5aQp mlWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DYA7BZb39MKDC8qklnJCLBS4YWQvxLUiNIQ+Da1cYlY=; b=FVbkqg07CpYS6nIunsWY3cs1NLYzNhCF+wc2gVSaAfTyQJ+KhMMulKwKTMnrSJtt9a RNeoZHMtit7krfV7FBrdsVHGmi4RIy69T8XqeVmPZaPg1YCxOPsQQw1ZDCkSIG+/IyPY pB4OM6YX7edgX69ixoemA4hffUEnb4FtKmHPpsI+T6s3P7I5fcEj92rKObJ6YFjp6PRD bva6rN/qusnYxhet92nDUD53L1uZPsYWs5MsQYB+t0ARINRw8q0BASqmDiEGUZrYHsE6 8bBwZQ9mF9a+Y/dSlf+7QgGTo1rR+R57jgfK1//udmsSDC9XQ1JWX1Gn7JXLJxAXEmWT cBIg== X-Gm-Message-State: ANhLgQ0bakKRPimXmusJQEZIk/E78G7PiBsMyTnY1uwmG2KOrPn2y/KS MM0fx6UAdH1NTbbPEOYJ6+uEu59dLBOFc9G60u48EA== X-Google-Smtp-Source: ADFU+vuQcSj5Uo77SCtRl46EOSr5nGQu5aWu5ywN8k0Nr9BeRWTuhqz/WzJBjK1e7ygZmJhMS+GWb1RSUa6vYbT/a6c= X-Received: by 2002:a1c:9c87:: with SMTP id f129mr1025162wme.26.1583829810957; Tue, 10 Mar 2020 01:43:30 -0700 (PDT) MIME-Version: 1.0 References: <202003091047.yO0wlUGy%lkp@intel.com> <20200310015958-mutt-send-email-mst@kernel.org> In-Reply-To: <20200310015958-mutt-send-email-mst@kernel.org> From: Anup Patel Date: Tue, 10 Mar 2020 14:13:19 +0530 Message-ID: Subject: Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' To: "Michael S. Tsirkin" Cc: Alexander Duyck , Anup Patel , kbuild test robot , Linux Memory Management List , Palmer Dabbelt , Christian Borntraeger , Atish Patra , Alistair Francis , linux-riscv , Andrew Morton Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Mar 10, 2020 at 11:38 AM Michael S. Tsirkin wrote: > > On Mon, Mar 09, 2020 at 07:19:51PM -0700, Alexander Duyck wrote: > > On Sun, Mar 8, 2020 at 7:54 PM kbuild test robot wrote: > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > > head: b86a6a241b7c60ca7a6ca4fb3c0d2aedbbf2c1b6 > > > commit: 120359931943d2b801ce51a1a045dcc0a5d1a55b [7003/7050] Merge branch 'akpm-current/current' > > > config: riscv-randconfig-a001-20200308 (attached as .config) > > > compiler: riscv64-linux-gcc (GCC) 7.5.0 > > > reproduce: > > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > > chmod +x ~/bin/make.cross > > > git checkout 120359931943d2b801ce51a1a045dcc0a5d1a55b > > > # save the attached .config to linux build tree > > > GCC_VERSION=7.5.0 make.cross ARCH=riscv > > > > > > If you fix the issue, kindly add following tag > > > Reported-by: kbuild test robot > > > > > > All errors (new ones prefixed by >>): > > > > > > drivers/virtio/virtio_balloon.o: In function `leak_balloon': > > > drivers/virtio/virtio_balloon.c:281: undefined reference to `balloon_page_dequeue' > > > drivers/virtio/virtio_balloon.o: In function `__virtio_test_bit': > > > >> include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' > > > drivers/virtio/virtio_balloon.o: In function `virtio_cread32': > > > include/linux/virtio_config.h:423: undefined reference to `balloon_page_alloc' > > > drivers/virtio/virtio_balloon.o: In function `fill_balloon': > > > >> drivers/virtio/virtio_balloon.c:233: undefined reference to `balloon_page_enqueue' > > > drivers/virtio/virtio_balloon.o: In function `__virtio_test_bit': > > > >> include/linux/virtio_config.h:113: undefined reference to `page_reporting_register' > > > drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_remove': > > > drivers/gpu/drm/virtio/virtgpu_drv.c:139: undefined reference to `drm_dev_unplug' > > > drivers/gpu/drm/virtio/virtgpu_drv.c:140: undefined reference to `drm_atomic_helper_shutdown' > > > drivers/gpu/drm/virtio/virtgpu_drv.c:141: undefined reference to `drm_dev_put' > > > drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_probe': > > > > It looks like somehow the config has CONFIG_VIRTIO_BALLOON enabled, > > but didn't select CONFIG_MEMORY_BALLOON nor CONFIG_PAGE_REPORTING That > > shouldn't be possible since in drivers/virtio/Kconfig we have the > > following: > > config VIRTIO_BALLOON > > tristate "Virtio balloon driver" > > depends on VIRTIO > > select MEMORY_BALLOON > > select PAGE_REPORTING > > > > I think I traced the problem down. It looks like it is related to this patch: > > RISC-V: Add kconfig option for QEMU virt machine > > > > We add kconfig option for QEMU virt machine and select all > > required VIRTIO drivers using this kconfig option. > > > > Signed-off-by: Anup Patel > > Reviewed-by: Atish Patra > > Reviewed-by: Palmer Dabbelt > > Reviewed-by: Alistair Francis > > Signed-off-by: Palmer Dabbelt > > > > > > The problem is it is using select to enable things that have > > dependencies, and as a result it is enabling things without enabling > > the bits needed to support them. That isn't recommended and is > > actually called out to something to avoid in the kconfig-language > > documentation: > > https://elixir.bootlin.com/linux/latest/source/Documentation/kbuild/kconfig-language.rst#L143 > > > I agree. And when we change virtio we likely won't remember to fix up RISC-V. > So please don't poke at it from arches. I will fix RISC-V Kconfig. Is it fine to use "imply" inplace of "select" ? Regards, Anup > The right way to do this IMHO is via ARCH_DEFCONFIG, and using > a defconfig per board. > And I think the same applies to s390 and virtio console. > Christian? > > -- > MST > >