qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 8/9] hw/core: Add qdev stub for user-mode


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 8/9] hw/core: Add qdev stub for user-mode
Date: Sat, 14 Mar 2020 11:49:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/14/20 10:46 AM, Philippe Mathieu-Daudé wrote:
On 3/13/20 7:46 PM, Philippe Mathieu-Daudé wrote:
While user-mode does not use peripherals (devices), it uses a
CPU which is a device.
In the next commit we will reduce the QAPI generated code for
user-mode. Since qdev.c calls qapi_event_send_device_deleted(),
let's add a stub for it.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
  hw/core/qdev-stubs.c  | 20 ++++++++++++++++++++
  hw/core/Makefile.objs |  1 +
  2 files changed, 21 insertions(+)
  create mode 100644 hw/core/qdev-stubs.c

diff --git a/hw/core/qdev-stubs.c b/hw/core/qdev-stubs.c
new file mode 100644
index 0000000000..0819dcba12
--- /dev/null
+++ b/hw/core/qdev-stubs.c
@@ -0,0 +1,20 @@
+/*
+ * QAPI qdev stubs
+ *
+ * Copyright (c) 2020 Red Hat, Inc.
+ *
+ * Author:
+ *   Philippe Mathieu-Daudé <address@hidden>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/qapi-events-qdev.h"
+
+void qapi_event_send_device_deleted(bool has_device,
+                                    const char *device, const char *path)
+{
+}
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index 6215e7c208..89bf247173 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -8,6 +8,7 @@ common-obj-y += vmstate-if.o
  # irq.o needed for qdev GPIO handling:
  common-obj-y += irq.o
+common-obj-$(call lnot,$(CONFIG_SOFTMMU)) += qdev-stubs.o

This should be:

    obj-$(call lnot,$(CONFIG_SOFTMMU)) += qdev-stubs.o

Actually I moved it to stub-obj-y which makes things easier.


(not common).

  common-obj-$(CONFIG_SOFTMMU) += reset.o
  common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
  common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o





reply via email to

[Prev in Thread] Current Thread [Next in Thread]