@@ -18,5 +18,5 @@ common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
common-obj-$(CONFIG_SOFTMMU) += register.o
common-obj-$(CONFIG_SOFTMMU) += or-irq.o
common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
-
+common-obj-$(call land,$(CONFIG_SOFTMMU),$(call lnot,$(CONFIG_PLATFORM_BUS))) += platform-bus-stub.o
obj-$(CONFIG_SOFTMMU) += generic-loader.o
new file mode 100644
@@ -0,0 +1,27 @@
+/*
+ * Platform Bus device stub
+ *
+ * platform_bus_map_region is used in VFIO common code
+ *
+ * Copyright Red Hat, Inc. 2016
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "qemu/osdep.h"
+#include "hw/platform-bus.h"
+
+void platform_bus_map_region(PlatformBusDevice *pbus, MemoryRegion *mr)
+{
+}
platform_bus_map_region is bound to be called in VFIO common code. Let's compile this stub in case CONFIG_SOFTMMU is set (VFIO requirement) and CONFIG_PLATFORM_BUS is not set. Signed-off-by: Eric Auger <eric.auger@redhat.com> --- hw/core/Makefile.objs | 2 +- hw/core/platform-bus-stub.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 hw/core/platform-bus-stub.c