From: "Yanjun.Zhu" <yanjun.zhu@linux.dev>
To: David Matlack <dmatlack@google.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
Alex Williamson <alex@shazbot.org>,
Adithya Jayachandran <ajayachandra@nvidia.com>,
Alex Mastro <amastro@fb.com>,
Alistair Popple <apopple@nvidia.com>,
Andrew Morton <akpm@linux-foundation.org>,
Bjorn Helgaas <bhelgaas@google.com>, Chris Li <chrisl@kernel.org>,
David Rientjes <rientjes@google.com>,
Jacob Pan <jacob.pan@linux.microsoft.com>,
Jason Gunthorpe <jgg@nvidia.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Josh Hilke <jrhilke@google.com>,
Kevin Tian <kevin.tian@intel.com>,
kvm@vger.kernel.org, Leon Romanovsky <leonro@nvidia.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-pci@vger.kernel.org, Lukas Wunner <lukas@wunner.de>,
Mike Rapoport <rppt@kernel.org>, Parav Pandit <parav@nvidia.com>,
Philipp Stanner <pstanner@redhat.com>,
Pratyush Yadav <pratyush@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
Samiullah Khawaja <skhawaja@google.com>,
Shuah Khan <shuah@kernel.org>,
Tomita Moeko <tomitamoeko@gmail.com>,
Vipin Sharma <vipinsh@google.com>, William Tu <witu@nvidia.com>,
Yi Liu <yi.l.liu@intel.com>, Yunxiang Li <Yunxiang.Li@amd.com>
Subject: Re: [PATCH 00/21] vfio/pci: Base support to preserve a VFIO device file across Live Update
Date: Mon, 1 Dec 2025 13:56:57 -0800 [thread overview]
Message-ID: <7ad2c03d-47bf-4eb2-98f9-44919bb19b8d@linux.dev> (raw)
In-Reply-To: <CALzav=fCjZnU5jqHTwFziAcssUys+XqWX1GkM7_PGufBnVyPmQ@mail.gmail.com>
On 12/1/25 1:48 PM, David Matlack wrote:
> On Mon, Dec 1, 2025 at 1:46 PM Yanjun.Zhu <yanjun.zhu@linux.dev> wrote:
>>
>> On 12/1/25 9:44 AM, Pasha Tatashin wrote:
>>> On Mon, Dec 1, 2025 at 12:36 PM David Matlack <dmatlack@google.com> wrote:
>>>> On 2025-12-01 05:32 PM, David Matlack wrote:
>>>>> On 2025-12-01 09:16 AM, Zhu Yanjun wrote:
>>>>>> 在 2025/12/1 9:10, David Matlack 写道:
>>>>>>> On Mon, Dec 1, 2025 at 7:49 AM Zhu Yanjun <yanjun.zhu@linux.dev> wrote:
>>>>>>>> 在 2025/11/27 20:56, Zhu Yanjun 写道:
>>>>>>>>> Hi, David
>>>>>>>>>
>>>>>>>>> ERROR: modpost: "liveupdate_register_file_handler" [drivers/vfio/pci/
>>>>>>>>> vfio-pci-core.ko] undefined!
>>>>>>>>>
>>>>>>>>> ERROR: modpost: "vfio_pci_ops" [drivers/vfio/pci/vfio-pci-core.ko]
>>>>>>>>> undefined!
>>>>>>>>> ERROR: modpost: "liveupdate_enabled" [drivers/vfio/pci/vfio-pci-core.ko]
>>>>>>>>> undefined!
>>>>>>>>> ERROR: modpost: "liveupdate_unregister_file_handler" [drivers/vfio/pci/
>>>>>>>>> vfio-pci-core.ko] undefined!
>>>>>>>>> ERROR: modpost: "vfio_device_fops" [drivers/vfio/pci/vfio-pci-core.ko]
>>>>>>>>> undefined!
>>>>>>>>> ERROR: modpost: "vfio_pci_is_intel_display" [drivers/vfio/pci/vfio-pci-
>>>>>>>>> core.ko] undefined!
>>>>>>>>> ERROR: modpost: "vfio_pci_liveupdate_init" [drivers/vfio/pci/vfio-
>>>>>>>>> pci.ko] undefined!
>>>>>>>>> ERROR: modpost: "vfio_pci_liveupdate_cleanup" [drivers/vfio/pci/vfio-
>>>>>>>>> pci.ko] undefined!
>>>>>>>>> make[4]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
>>>>>>>>> make[3]: *** [Makefile:1960: modpost] Error 2
>>>>>>>>>
>>>>>>>>> After I git clone the source code from the link https://github.com/
>>>>>>>>> dmatlack/linux/tree/liveupdate/vfio/cdev/v1,
>>>>>>>>>
>>>>>>>>> I found the above errors when I built the source code.
>>>>>>>>>
>>>>>>>>> Perhaps the above errors can be solved by EXPORT_SYMBOL.
>>>>>>>>>
>>>>>>>>> But I am not sure if a better solution can solve the above problems or not.
>>>>>>>> I reviewed this patch series in detail. If I’m understanding it
>>>>>>>> correctly, there appears to be a cyclic dependency issue. Specifically,
>>>>>>>> some functions in kernel module A depend on kernel module B, while at
>>>>>>>> the same time certain functions in module B depend on module A.
>>>>>>>>
>>>>>>>> I’m not entirely sure whether this constitutes a real problem or if it’s
>>>>>>>> intentional design.
>>>>>>> Thanks for your report. Can you share the .config file you used to
>>>>>>> generate these errors?
>>>>>> IIRC, I used FC 42 default config. Perhaps you can make tests with it. If
>>>>>> this problem can not be reproduced, I will share my config with you.
>>>>>>
>>>>> What does "FC 42 default config" mean?
>>>>>
>>>>> Either way I was able to reproduce the errors you posted above by
>>>>> changing CONFIG_VFIO_PCI{_CORE} from "y" to "m".
>>>>>
>>>>> To unblock building and testing this series you can change these configs
>>>>> from "m" to "y", or the following patch (which fixed things for me):
>>>> Oops, sorry, something went wrong when I posted that diff. Here's the
>>>> correct diff:
>>>>
>>>> diff --git a/drivers/vfio/pci/Makefile b/drivers/vfio/pci/Makefile
>>>> index 929df22c079b..c2cca16e99a8 100644
>>>> --- a/drivers/vfio/pci/Makefile
>>>> +++ b/drivers/vfio/pci/Makefile
>>>> @@ -2,11 +2,11 @@
>>>>
>>>> vfio-pci-core-y := vfio_pci_core.o vfio_pci_intrs.o vfio_pci_rdwr.o vfio_pci_config.o
>>>> vfio-pci-core-$(CONFIG_VFIO_PCI_ZDEV_KVM) += vfio_pci_zdev.o
>>>> -vfio-pci-core-$(CONFIG_LIVEUPDATE) += vfio_pci_liveupdate.o
>>>> obj-$(CONFIG_VFIO_PCI_CORE) += vfio-pci-core.o
>>>>
>>>> vfio-pci-y := vfio_pci.o
>>>> vfio-pci-$(CONFIG_VFIO_PCI_IGD) += vfio_pci_igd.o
>>>> +vfio-pci-$(CONFIG_LIVEUPDATE) += vfio_pci_liveupdate.o
>>>> obj-$(CONFIG_VFIO_PCI) += vfio-pci.o
>>>>
>>>> obj-$(CONFIG_MLX5_VFIO_PCI) += mlx5/
>>>> diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
>>>> index c5b5eb509474..b9805861763a 100644
>>>> --- a/drivers/vfio/vfio_main.c
>>>> +++ b/drivers/vfio/vfio_main.c
>>>> @@ -1386,6 +1386,7 @@ const struct file_operations vfio_device_fops = {
>>>> .show_fdinfo = vfio_device_show_fdinfo,
>>>> #endif
>>>> };
>>>> +EXPORT_SYMBOL_GPL(vfio_device_fops);
>>>>
>>>> /**
>>>> * vfio_file_is_valid - True if the file is valid vfio file
>>>> diff --git a/kernel/liveupdate/luo_core.c b/kernel/liveupdate/luo_core.c
>>>> index 69298d82f404..c7a0c9c3b6a8 100644
>>>> --- a/kernel/liveupdate/luo_core.c
>>>> +++ b/kernel/liveupdate/luo_core.c
>>>> @@ -256,6 +256,7 @@ bool liveupdate_enabled(void)
>>>> {
>>>> return luo_global.enabled;
>>>> }
>>>> +EXPORT_SYMBOL_GPL(liveupdate_enabled);
>>>>
>>>> /**
>>>> * DOC: LUO ioctl Interface
>>>> diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c
>>>> index fca3806dae28..9baa88966f04 100644
>>>> --- a/kernel/liveupdate/luo_file.c
>>>> +++ b/kernel/liveupdate/luo_file.c
>>>> @@ -868,6 +868,7 @@ int liveupdate_register_file_handler(struct liveupdate_file_handler *fh)
>>>> luo_session_resume();
>>>> return err;
>>>> }
>>>> +EXPORT_SYMBOL_GPL(liveupdate_register_file_handler);
>>>>
>>>> /**
>>>> * liveupdate_unregister_file_handler - Unregister a liveupdate file handler
>>>> @@ -913,3 +914,4 @@ int liveupdate_unregister_file_handler(struct liveupdate_file_handler *fh)
>>>> liveupdate_test_register(fh);
>>>> return err;
>>>> }
>>>> +EXPORT_SYMBOL_GPL(liveupdate_unregister_file_handler);
>>
>> Sure. Exactly. The above is the same with my solution. But after that
>> EXPORT_SYMBOL_GPL, a cyclic dependency issue will occur.
> Did see the change to drivers/vfio/pci/Makefile? That fixes the
Ah, I overlooked this change. I'll conduct a test.
Thanks,
Yanjun.Zhu
> circular dependency between vfio-pci and vfio-pci-core that I created
> in this series.
next prev parent reply other threads:[~2025-12-01 21:57 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 19:35 [PATCH 00/21] vfio/pci: Base support to preserve a VFIO device file across Live Update David Matlack
2025-11-26 19:35 ` [PATCH 01/21] liveupdate: luo_flb: Prevent retrieve() after finish() David Matlack
2025-11-26 19:35 ` [PATCH 02/21] PCI: Add API to track PCI devices preserved across Live Update David Matlack
2025-11-29 10:34 ` Lukas Wunner
2025-11-29 20:10 ` Pasha Tatashin
2025-11-30 0:51 ` Jason Gunthorpe
2025-11-30 1:20 ` Pasha Tatashin
2025-12-01 13:29 ` Jason Gunthorpe
2025-12-01 18:54 ` David Matlack
2025-12-02 6:20 ` Lukas Wunner
2025-12-02 14:59 ` Jason Gunthorpe
2025-12-02 16:36 ` Chris Li
2025-12-02 18:19 ` Jason Gunthorpe
2025-12-02 21:20 ` Chris Li
2025-12-03 5:44 ` Lukas Wunner
2025-12-01 21:23 ` Pasha Tatashin
2025-11-29 20:15 ` Pasha Tatashin
2025-12-01 18:07 ` David Matlack
2025-11-26 19:35 ` [PATCH 03/21] PCI: Require driver_override for incoming Live Update preserved devices David Matlack
2025-12-02 21:16 ` David Matlack
2025-12-02 21:24 ` Chris Li
2025-11-26 19:35 ` [PATCH 04/21] vfio/pci: Register a file handler with Live Update Orchestrator David Matlack
2025-11-26 19:35 ` [PATCH 05/21] vfio/pci: Preserve vfio-pci device files across Live Update David Matlack
2025-11-26 19:35 ` [PATCH 06/21] vfio/pci: Retrieve preserved device files after " David Matlack
2025-12-03 12:55 ` Alex Mastro
2025-12-03 15:45 ` Pasha Tatashin
2025-12-03 17:29 ` David Matlack
2025-12-04 10:30 ` Alex Mastro
2025-11-26 19:35 ` [PATCH 07/21] vfio/pci: Notify PCI subsystem about devices preserved across " David Matlack
2025-11-26 19:35 ` [PATCH 08/21] vfio: Enforce preserved devices are retrieved via LIVEUPDATE_SESSION_RETRIEVE_FD David Matlack
2025-11-26 19:35 ` [PATCH 09/21] vfio/pci: Store Live Update state in struct vfio_pci_core_device David Matlack
2025-11-26 19:35 ` [PATCH 10/21] vfio/pci: Skip reset of preserved device after Live Update David Matlack
2025-11-26 19:35 ` [PATCH 11/21] selftests/liveupdate: Move luo_test_utils.* into a reusable library David Matlack
2025-11-26 19:35 ` [PATCH 12/21] selftests/liveupdate: Add helpers to preserve/retrieve FDs David Matlack
2025-11-26 19:36 ` [PATCH 13/21] vfio: selftests: Build liveupdate library in VFIO selftests David Matlack
2025-11-26 19:36 ` [PATCH 14/21] vfio: selftests: Add Makefile support for TEST_GEN_PROGS_EXTENDED David Matlack
2025-11-26 19:36 ` [PATCH 15/21] vfio: selftests: Add vfio_pci_liveupdate_uapi_test David Matlack
2025-11-26 19:36 ` [PATCH 16/21] vfio: selftests: Initialize vfio_pci_device using a VFIO cdev FD David Matlack
2025-11-26 19:36 ` [PATCH 17/21] vfio: selftests: Add vfio_pci_liveupdate_kexec_test David Matlack
2025-11-26 19:36 ` [PATCH 18/21] vfio: selftests: Expose iommu_modes to tests David Matlack
2025-11-26 19:36 ` [PATCH 19/21] vfio: selftests: Expose low-level helper routines for setting up struct vfio_pci_device David Matlack
2025-12-28 4:03 ` Zhu Yanjun
2026-01-05 17:54 ` David Matlack
2026-01-06 0:07 ` Yanjun.Zhu
2026-01-06 0:19 ` David Matlack
2025-11-26 19:36 ` [PATCH 20/21] vfio: selftests: Verify that opening VFIO device fails during Live Update David Matlack
2025-11-26 19:36 ` [PATCH 21/21] vfio: selftests: Add continuous DMA to vfio_pci_liveupdate_kexec_test David Matlack
2025-11-28 4:56 ` [PATCH 00/21] vfio/pci: Base support to preserve a VFIO device file across Live Update Zhu Yanjun
2025-12-01 15:49 ` Zhu Yanjun
2025-12-01 17:10 ` David Matlack
2025-12-01 17:16 ` Zhu Yanjun
2025-12-01 17:32 ` David Matlack
2025-12-01 17:36 ` David Matlack
2025-12-01 17:44 ` Pasha Tatashin
2025-12-01 21:45 ` Yanjun.Zhu
2025-12-01 21:48 ` David Matlack
2025-12-01 21:56 ` Yanjun.Zhu [this message]
2025-12-02 5:50 ` Zhu Yanjun
2025-12-01 21:59 ` Pasha Tatashin
2025-12-02 14:10 ` Pratyush Yadav
2025-12-02 21:29 ` David Matlack
2025-12-02 21:41 ` Pasha Tatashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ad2c03d-47bf-4eb2-98f9-44919bb19b8d@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=Yunxiang.Li@amd.com \
--cc=ajayachandra@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alex@shazbot.org \
--cc=amastro@fb.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=chrisl@kernel.org \
--cc=dmatlack@google.com \
--cc=jacob.pan@linux.microsoft.com \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=jrhilke@google.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=parav@nvidia.com \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=pstanner@redhat.com \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=saeedm@nvidia.com \
--cc=shuah@kernel.org \
--cc=skhawaja@google.com \
--cc=tomitamoeko@gmail.com \
--cc=vipinsh@google.com \
--cc=witu@nvidia.com \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.