qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: eric.auger@redhat.com, eric.auger.pro@gmail.com,
	peter.maydell@linaro.org, qemu-arm@nongnu.org,
	qemu-devel@nongnu.org, alex.williamson@redhat.com,
	pranav.sawargaonkar@gmail.com
Cc: diana.craciun@freescale.com, christoffer.dall@linaro.org,
	drjones@redhat.com, Bharat.Bhushan@freescale.com, fkan@apm.com
Subject: [Qemu-devel] [RFC v5 6/8] hw: platform-bus: Add platform bus stub
Date: Mon, 17 Oct 2016 19:38:28 +0000	[thread overview]
Message-ID: <1476733110-14293-7-git-send-email-eric.auger@redhat.com> (raw)
In-Reply-To: <1476733110-14293-1-git-send-email-eric.auger@redhat.com>

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

diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index a4c94e5..f6ececc 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -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
diff --git a/hw/core/platform-bus-stub.c b/hw/core/platform-bus-stub.c
new file mode 100644
index 0000000..41d4ab6
--- /dev/null
+++ b/hw/core/platform-bus-stub.c
@@ -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)
+{
+}
-- 
1.9.1

  parent reply	other threads:[~2016-10-17 19:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 19:38 [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 1/8] linux-headers: Partial update for MSI IOVA handling Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 2/8] hw: vfio: common: vfio_get_iommu_type1_info Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 3/8] memory: Add reserved_iova region type Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 4/8] memory: memory_region_find_by_name Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 5/8] hw: platform-bus: Enable to map any memory region onto the platform-bus Eric Auger
2016-10-17 19:38 ` Eric Auger [this message]
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 7/8] hw: vfio: common: vfio_prepare_msi_mapping Eric Auger
2016-10-17 19:38 ` [Qemu-devel] [RFC v5 8/8] hw: vfio: common: Adapt vfio_listeners for reserved_iova region Eric Auger
2016-10-17 20:16 ` [Qemu-devel] [RFC v5 0/8] KVM PCI/MSI passthrough with mach-virt no-reply
2016-10-17 20:56   ` Auger Eric
2016-10-18  5:49     ` Fam Zheng
2016-10-18 13:34     ` Fam Zheng
2016-10-18 13:49       ` Auger Eric

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=1476733110-14293-7-git-send-email-eric.auger@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=alex.williamson@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=diana.craciun@freescale.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=fkan@apm.com \
    --cc=peter.maydell@linaro.org \
    --cc=pranav.sawargaonkar@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).