[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/36] qapi/meson: Restrict qdev code to system-mode emulation
From: |
Paolo Bonzini |
Subject: |
[PULL 31/36] qapi/meson: Restrict qdev code to system-mode emulation |
Date: |
Fri, 29 Jan 2021 12:18:09 +0100 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Beside a CPU device, user-mode emulation doesn't access
anything else from qdev subsystem.
Tools don't need anything from qdev.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210122204441.2145197-10-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
MAINTAINERS | 1 +
qapi/meson.build | 6 +++++-
stubs/meson.build | 2 ++
stubs/qdev.c | 23 +++++++++++++++++++++++
4 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 stubs/qdev.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 34359a99b8..d2dd7c2422 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2523,6 +2523,7 @@ F: qapi/qom.json
F: qapi/qdev.json
F: scripts/coccinelle/qom-parent-type.cocci
F: softmmu/qdev-monitor.c
+F: stubs/qdev.c
F: qom/
F: tests/check-qom-interface.c
F: tests/check-qom-proplist.c
diff --git a/qapi/meson.build b/qapi/meson.build
index ab68e7900e..2839871b47 100644
--- a/qapi/meson.build
+++ b/qapi/meson.build
@@ -35,7 +35,6 @@ qapi_all_modules = [
'misc-target',
'net',
'pragma',
- 'qdev',
'pci',
'qom',
'rdma',
@@ -49,6 +48,11 @@ qapi_all_modules = [
'ui',
'yank',
]
+if have_system
+ qapi_all_modules += [
+ 'qdev',
+ ]
+endif
qapi_storage_daemon_modules = [
'block-core',
diff --git a/stubs/meson.build b/stubs/meson.build
index 1a656cd070..a054d5877f 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -53,4 +53,6 @@ endif
if have_system
stub_ss.add(files('semihost.c'))
stub_ss.add(files('xen-hw-stub.c'))
+else
+ stub_ss.add(files('qdev.c'))
endif
diff --git a/stubs/qdev.c b/stubs/qdev.c
new file mode 100644
index 0000000000..92e6143134
--- /dev/null
+++ b/stubs/qdev.c
@@ -0,0 +1,23 @@
+/*
+ * QOM stubs
+ *
+ * Copyright (c) 2021 Red Hat, Inc.
+ *
+ * Author:
+ * Philippe Mathieu-Daudé <philmd@redhat.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#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)
+{
+ /* Nothing to do. */
+}
--
2.29.2
- [PULL 18/36] target/i86: implement PKS, (continued)
- [PULL 18/36] target/i86: implement PKS, Paolo Bonzini, 2021/01/29
- [PULL 15/36] virtio-scsi: don't uninitialize queues that we didn't initialize, Paolo Bonzini, 2021/01/29
- [PULL 22/36] meson: Warn when TCI is selected but TCG backend is available, Paolo Bonzini, 2021/01/29
- [PULL 19/36] configure: Fix --enable-tcg-interpreter, Paolo Bonzini, 2021/01/29
- [PULL 20/36] configure: Improve TCI feature description, Paolo Bonzini, 2021/01/29
- [PULL 21/36] meson: Explicit TCG backend used, Paolo Bonzini, 2021/01/29
- [PULL 26/36] pc-bios/meson: Only install EDK2 blob firmwares with system emulation, Paolo Bonzini, 2021/01/29
- [PULL 24/36] build-sys: make libslirp a meson subproject, Paolo Bonzini, 2021/01/29
- [PULL 25/36] tests/meson: Only build softfloat objects if TCG is selected, Paolo Bonzini, 2021/01/29
- [PULL 28/36] meson: Merge trace_events_subdirs array, Paolo Bonzini, 2021/01/29
- [PULL 31/36] qapi/meson: Restrict qdev code to system-mode emulation,
Paolo Bonzini <=
- [PULL 23/36] slirp: update to git master, Paolo Bonzini, 2021/01/29
- [PULL 27/36] meson: Restrict block subsystem processing, Paolo Bonzini, 2021/01/29
- [PULL 32/36] qapi/meson: Remove QMP from user-mode emulation, Paolo Bonzini, 2021/01/29
- [PULL 30/36] meson: Restrict emulation code, Paolo Bonzini, 2021/01/29
- [PULL 35/36] hvf: Fetch cr4 before evaluating CPUID(1), Paolo Bonzini, 2021/01/29
- [PULL 36/36] accel/kvm/kvm-all: Fix wrong return code handling in dirty log code, Paolo Bonzini, 2021/01/29
- [PULL 29/36] meson: Restrict some trace event directories to user/system emulation, Paolo Bonzini, 2021/01/29
- [PULL 33/36] qapi/meson: Restrict system-mode specific modules, Paolo Bonzini, 2021/01/29
- [PULL 34/36] qapi/meson: Restrict UI module to system emulation and tools, Paolo Bonzini, 2021/01/29
- Re: [PULL 00/36] Misc patches (buildsys, i386, fuzzing) for 2021-01-29, Peter Maydell, 2021/01/29