diff mbox series

[v3,2/7] hw/xen: Relax dependency on FSDEV_9P

Message ID 20210201112905.545144-3-f4bug@amsat.org (mailing list archive)
State New
Headers show
Series hw/xen: Introduce XEN_FV/XEN_PV Kconfig | expand

Commit Message

Philippe Mathieu-Daudé Feb. 1, 2021, 11:29 a.m. UTC
Relax the dependency on 9pfs by using the 'imply' Kconfig rule.
This fixes when XEN_PV without XEN_FV:

  /usr/bin/ld: libcommon.fa.p/hw_xen_xen-legacy-backend.c.o: in function
  `xen_be_register_common':
  hw/xen/xen-legacy-backend.c:754: undefined reference to `xen_9pfs_ops'

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/xen/xen-legacy-backend.c | 3 ++-
 accel/Kconfig               | 2 +-
 hw/xen/meson.build          | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index b61a4855b7b..338d443a5c0 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -33,6 +33,7 @@ 
 #include "hw/xen/xen-legacy-backend.h"
 #include "hw/xen/xen_pvdev.h"
 #include "monitor/qdev.h"
+#include CONFIG_DEVICES
 
 DeviceState *xen_sysdev;
 BusState *xen_sysbus;
@@ -750,7 +751,7 @@  void xen_be_register_common(void)
 
     xen_be_register("console", &xen_console_ops);
     xen_be_register("vkbd", &xen_kbdmouse_ops);
-#ifdef CONFIG_VIRTFS
+#ifdef CONFIG_FSDEV_9P
     xen_be_register("9pfs", &xen_9pfs_ops);
 #endif
 #ifdef CONFIG_USB_LIBUSB
diff --git a/accel/Kconfig b/accel/Kconfig
index 461104c7715..7565ccf69e6 100644
--- a/accel/Kconfig
+++ b/accel/Kconfig
@@ -15,4 +15,4 @@  config KVM
 
 config XEN
     bool
-    select FSDEV_9P if VIRTFS
+    imply FSDEV_9P
diff --git a/hw/xen/meson.build b/hw/xen/meson.build
index 076954b89ca..3c2062b9b3e 100644
--- a/hw/xen/meson.build
+++ b/hw/xen/meson.build
@@ -2,12 +2,12 @@ 
   'xen-backend.c',
   'xen-bus-helper.c',
   'xen-bus.c',
-  'xen-legacy-backend.c',
   'xen_devconfig.c',
   'xen_pvdev.c',
 ))
 
 xen_specific_ss = ss.source_set()
+xen_specific_ss.add(files('xen-legacy-backend.c'))
 xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files(
   'xen-host-pci-device.c',
   'xen_pt.c',