From a1f08fddc9aa58e46a15c95ccb1ae9e94b626bf2 Mon Sep 17 00:00:00 2001 From: Zheng Wu Date: Tue, 5 Mar 2024 11:16:36 +0800 Subject: [PATCH] lkp: virtio-mem: Allow to specify an ACPI PXM as nid commit f2af6d3978d74a7891d0f428537b4494498202cb We want to allow to specify (similar as for a DIMM), to which node a virtio-mem device (and, therefore, its memory) belongs. Add a new virtio-mem feature flag and export pxm_to_node, so it can be used in kernel module context. Intel-SIG: commit f2af6d3978d7 lkp: virtio-mem: Allow to specify an ACPI PXM as nid. Backport Allow to specify an ACPI PXM as nid patch to kernel 5.4.119. It can fix the following issue in the process of kvm LKP test: Build Errors ============ - 'ERROR: "pxm_to_node" [drivers/acpi/nfit/nfit.ko] undefined!' Acked-by: Michal Hocko # for the export Acked-by: "Rafael J. Wysocki" # for the export Acked-by: Pankaj Gupta Tested-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Oscar Salvador Cc: Michal Hocko Cc: Igor Mammedov Cc: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Cc: Len Brown Cc: linux-acpi@vger.kernel.org Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20200507140139.17083-4-david@redhat.com Signed-off-by: Michael S. Tsirkin [ Zheng Wu: amend commit log ] Signed-off-by: Zheng Wu --- drivers/acpi/numa/srat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index b6b54d1d2539..8ef44ee0d76b 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -35,6 +35,7 @@ int pxm_to_node(int pxm) return NUMA_NO_NODE; return pxm_to_node_map[pxm]; } +EXPORT_SYMBOL(pxm_to_node); int node_to_pxm(int node) { -- Gitee