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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 1BCFBC10DCE for ; Tue, 10 Mar 2020 06:08:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 993B524679 for ; Tue, 10 Mar 2020 06:08:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="A7wPt15X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 993B524679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D08456B0005; Tue, 10 Mar 2020 02:08:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB8B36B0006; Tue, 10 Mar 2020 02:08:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA8716B0007; Tue, 10 Mar 2020 02:08:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id A09666B0005 for ; Tue, 10 Mar 2020 02:08:46 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5B60F181AEF00 for ; Tue, 10 Mar 2020 06:08:46 +0000 (UTC) X-FDA: 76578423852.15.judge37_4c86ca2ccb434 X-HE-Tag: judge37_4c86ca2ccb434 X-Filterd-Recvd-Size: 7750 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Mar 2020 06:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583820525; 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=zW8Umv/Agp2bpd64V5+Tlu6r79pt91PcpR/fWF6jrvg=; b=A7wPt15Xp9y9SW58ia1nuH+mXmtzZYOriKtkDdz0+XTBwRUCpT20Aekt4xmslpwkWs1tlk KPmmeV0mfo2iZm5H1/TeIaaSqeh7BY+K5WTaWT2ZTyZHy+lsaE7OGnEvMl7fXCuRuGlChT EkkBXnqLY+XEEQhNsLfzr1cKKG0CfEc= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-johqvtQVPFGCNhFD2WE0ug-1; Tue, 10 Mar 2020 02:08:41 -0400 X-MC-Unique: johqvtQVPFGCNhFD2WE0ug-1 Received: by mail-qk1-f199.google.com with SMTP id 22so9041208qkc.7 for ; Mon, 09 Mar 2020 23:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uJTqn/3km1cWGkR5O9zni0+fw9f0gcK2eW7HEp2x1xo=; b=N7pHSDSpsJ8U15z5y0dgK9cJecPlqFhthEe7oMpIKOyLwWyPa9g5cXBAyWYeWb7fp2 xDbLLad6YyOGNLfEArC8HSqFPq61a5IHnMd2why271f/1uEe0vpB6cItmI4UIPoUuH2q c+I8UfBK69/YgzXCZHUXjm1SB9FBt7E2SIJ2GUJPXx5pz+f91BY3XRFr1e7eVOkPsNeK +ni3N1t7GqQE1LmpJSHvV59/UouX48jybA3cLkYF+CJlymSP6NvvqlyWzz5BOGFXHfWi V15PZqWJWarhjohO65nbdkuv5rmMYjmpsAlIi9c112eLW2BBblD4De8u8bgimgMgarQz hiVA== X-Gm-Message-State: ANhLgQ0TPik2OpdD0MlmUKezKgFW9hAvq6iR4nz2esvrL30b9mldiomH H3s8Xm+c4OfMlBWG1akS/zrsDTC7GdC0pN+LK0CvI9vd5JfCBHVPdUabtP8sXfJsTVpToVD9e91 V5g29CXTO8/w= X-Received: by 2002:a05:620a:522:: with SMTP id h2mr18123543qkh.260.1583820520599; Mon, 09 Mar 2020 23:08:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtevqsGmilW8qDhekgTD6e5+LBJJDkMUzFLdu4foh4wAiWquHACMIZexE5jNqq36JlmX5ECYw== X-Received: by 2002:a05:620a:522:: with SMTP id h2mr18123533qkh.260.1583820520334; Mon, 09 Mar 2020 23:08:40 -0700 (PDT) Received: from redhat.com (bzq-79-178-2-19.red.bezeqint.net. [79.178.2.19]) by smtp.gmail.com with ESMTPSA id v12sm22112284qti.84.2020.03.09.23.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 23:08:39 -0700 (PDT) Date: Tue, 10 Mar 2020 02:08:34 -0400 From: "Michael S. Tsirkin" To: Alexander Duyck Cc: kbuild test robot , linux-riscv@lists.infradead.org, anup.patel@wdc.com, atish.patra@wdc.com, palmerdabbelt@google.com, alistair.francis@wdc.com, Andrew Morton , Linux Memory Management List , Christian Borntraeger Subject: Re: [linux-next:master 7003/7050] include/linux/virtio_config.h:113: undefined reference to `page_reporting_unregister' Message-ID: <20200310015958-mutt-send-email-mst@kernel.org> References: <202003091047.yO0wlUGy%lkp@intel.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 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 bran= ch '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/s= bin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > git checkout 120359931943d2b801ce51a1a045dcc0a5d1a55b > > # save the attached .config to linux build tree > > GCC_VERSION=3D7.5.0 make.cross ARCH=3Driscv > > > > 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_repo= rting_unregister' > > drivers/virtio/virtio_balloon.o: In function `virtio_cread32': > > include/linux/virtio_config.h:423: undefined reference to `balloon_p= age_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_repo= rting_register' > > drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_remove= ': > > drivers/gpu/drm/virtio/virtgpu_drv.c:139: undefined reference to `dr= m_dev_unplug' > > drivers/gpu/drm/virtio/virtgpu_drv.c:140: undefined reference to `dr= m_atomic_helper_shutdown' > > drivers/gpu/drm/virtio/virtgpu_drv.c:141: undefined reference to `dr= m_dev_put' > > drivers/gpu/drm/virtio/virtgpu_drv.o: In function `virtio_gpu_probe'= : >=20 > 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 >=20 > I think I traced the problem down. It looks like it is related to this pa= tch: > RISC-V: Add kconfig option for QEMU virt machine >=20 > We add kconfig option for QEMU virt machine and select all > required VIRTIO drivers using this kconfig option. >=20 > Signed-off-by: Anup Patel > Reviewed-by: Atish Patra > Reviewed-by: Palmer Dabbelt > Reviewed-by: Alistair Francis > Signed-off-by: Palmer Dabbelt >=20 >=20 > 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/kconf= ig-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. 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? --=20 MST