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=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, 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 A4C20C10F27 for ; Tue, 10 Mar 2020 15:08:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5CF4420727 for ; Tue, 10 Mar 2020 15:08:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ojbxj8Lh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CF4420727 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1129C6B000A; Tue, 10 Mar 2020 11:08:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09C646B000C; Tue, 10 Mar 2020 11:08:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7E196B000D; Tue, 10 Mar 2020 11:08:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id CC1CC6B000A for ; Tue, 10 Mar 2020 11:08:26 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9E7FB2C0C for ; Tue, 10 Mar 2020 15:08:26 +0000 (UTC) X-FDA: 76579783812.07.copy05_83acc6ed4f260 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 94E6B1803F9A4 for ; Tue, 10 Mar 2020 15:08:25 +0000 (UTC) X-HE-Tag: copy05_83acc6ed4f260 X-Filterd-Recvd-Size: 7846 Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 15:08:24 +0000 (UTC) Received: by mail-il1-f193.google.com with SMTP id g126so12303717ilh.2 for ; Tue, 10 Mar 2020 08:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B2NvWyknmU7bJ18J7QQIrUNg+e9LtN7ECCCGMfh2zd8=; b=ojbxj8LhuV2xD99AMnXDjVWc3G/BRB+kxmhXpFOmKZ1DEHirweXCbVm81PI+1DK+dT UuABXalBCnjHLzODWyHIeBfselGI++fFm61uaT7yz4iLnz2Sv2fvq6kPKGVtfW0Jbkyc 99bKZhrqbfN9G+RWpelkfpxbhMPq6hS8bwIeNKYlYqj05Cipp8K8rrWKMAr909j3NDxc MLZrHyfSV/mNY/bPUvFpLtDd3L3gSag0WLUaXYEXUF3jiyO+3lt2pWdz4cv2Z55SPe8w JaoQ4KcwY070ZOTpsHXv1B/TtFF2+0mReRG8EXyB+14YwzTMgcYRxTP6QsnIoh8ApvsG xk2w== 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=B2NvWyknmU7bJ18J7QQIrUNg+e9LtN7ECCCGMfh2zd8=; b=Sg/UEDhnIvRvcaVKlwOAHT6uAl3E3Nx+o9pDnbSlnfAThyIjUKNZRILZRxG9Y75Caf 3TtatSf3+pU36fqj7N74gUX/M6Q/Qwab2pphGndD9lJBmewmTk1ag6nA+WzoRXUcJiGO ls55kXMmwwxHLsmxima4HjOmL0HLkVmlPbNGqNMCGAMtyq7KQQvvaJWPCYAHmYoqPl4S 2mbjyat79LY7NsC7pmNp2RhdZFhhnH7S72gCUz6gKdzZRYa9mnXr0fUlqT0KNqokVeU7 tFI4hoOfVO/TI0uFD6gHnWJCrE3z3ckQuFoKj59xPrGokc98ToU9XlO1duCwiqi3ZUk+ 79aA== X-Gm-Message-State: ANhLgQ2ZL4ZFZwNaKI79icUo75HlneJWGn2Us0rBk1JjWZODfVEvLjII H8lGz+t0ohSek8nyhLsFizXaxQ6l8lXNhxnecxE= X-Google-Smtp-Source: ADFU+vsHCK0bP3gjTD0Qzz4Zo93QE9aluR1MjfQAw5XSvxXWYmopq79NduFkeB9scd65MzL052ISeScGLJ3OWn7mTnU= X-Received: by 2002:a05:6e02:4cd:: with SMTP id f13mr21278517ils.237.1583852903818; Tue, 10 Mar 2020 08:08:23 -0700 (PDT) MIME-Version: 1.0 References: <202003091047.yO0wlUGy%lkp@intel.com> <293bcd25-934f-dd57-3314-bbcf00833e51@redhat.com> <4932d976-1fff-db01-7e79-bd79ad18d96e@redhat.com> <8373ea85-40d8-972c-fb45-dcfc9142f13b@redhat.com> In-Reply-To: <8373ea85-40d8-972c-fb45-dcfc9142f13b@redhat.com> From: Alexander Duyck Date: Tue, 10 Mar 2020 08:08:12 -0700 Message-ID: Subject: Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' To: David Hildenbrand Cc: Anup Patel , kbuild test robot , linux-riscv , Anup Patel , Atish Patra , Palmer Dabbelt , Alistair Francis , Linux Memory Management List , Andrew Morton , "Michael S. Tsirkin" 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 5:13 AM David Hildenbrand wrote: > > On 10.03.20 13:02, Anup Patel wrote: > > On Tue, Mar 10, 2020 at 3:56 PM David Hildenbrand wrote: > >> > >> On 10.03.20 11:22, David Hildenbrand wrote: > >>> On 10.03.20 03:19, 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 > >>> > >>> IMHO that's perfectly valid. You might want to have ballooning without > >>> page compaction (MEMORY_BALLOON). Same with PAGE_REPORTING. > >>> > >>> AFAIK, "select" will still allow you to disable these things - which > >>> used to work fine with MEMORY_BALLOON (did that myself when debugging a > >>> compaction issue). > >>> > >> > >> Correction: I disabled BALLOON_COMPACTION back then ... so ignore my > >> comment regarding that :) > >> > >> But we should be able to build VIRTIO_BALLOON without PAGE_REPORTING > >> somehow IMHO. > > > > I have moved all VIRTIO driver selection to defconfigs for RISC-V which was > > the case before. > > > > Here's the patch: > > https://patchwork.kernel.org/patch/11429217/ > > Make perfect sense. Still I think we might want to have the option to > build without page reporting in the future, similar to building without > balloon compaction (which is another discussion). As far as page reporting it would be pretty simple to make it so that we can build without having it enabled. It would just depend on how we want to go about it. My past experience has been that you end up having to create a third Kconfig option that depends on VIRTIO_BALLOON and selects the other config item. Then it is just a matter of figuring out if we want to use the new define as a wrapper in the virtio balloon driver, or if we want to create stubbed-out versions of page reporting and balloon compaction. - Alex