[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/24] qgraph: allow extra_device_opts on contains no
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 09/24] qgraph: allow extra_device_opts on contains nodes |
Date: |
Mon, 3 Jun 2019 19:10:28 +0200 |
Allow choosing the bus that the device will be placed on, in case
the machine has more than one. Otherwise, the bus may not match
the base address of the controller we attach it to.
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/qos-test.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tests/qos-test.c b/tests/qos-test.c
index ae2fb5d..01b2a22 100644
--- a/tests/qos-test.c
+++ b/tests/qos-test.c
@@ -340,7 +340,8 @@ static void walk_path(QOSGraphNode *orig_path, int len)
char **path_vec = g_new0(char *, (QOS_PATH_MAX_ELEMENT_SIZE * 2));
int path_vec_size = 0;
- char *after_cmd = NULL, *before_cmd = NULL, *after_device = NULL;
+ char *after_cmd, *before_cmd, *after_device;
+ GString *after_device_str = g_string_new("");
char *node_name = orig_path->name, *path_str;
GString *cmd_line = g_string_new("");
@@ -363,9 +364,8 @@ static void walk_path(QOSGraphNode *orig_path, int len)
/* append node command line + previous edge command line */
if (path->command_line && etype == QEDGE_CONSUMED_BY) {
g_string_append(cmd_line, path->command_line);
- if (after_device) {
- g_string_append(cmd_line, after_device);
- }
+ g_string_append(cmd_line, after_device_str->str);
+ g_string_truncate(after_device_str, 0);
}
path_vec[path_vec_size++] = qos_graph_edge_get_name(path->path_edge);
@@ -382,12 +382,15 @@ static void walk_path(QOSGraphNode *orig_path, int len)
if (after_cmd) {
g_string_append(cmd_line2, after_cmd);
}
+ if (after_device) {
+ g_string_append(after_device_str, after_device);
+ }
}
path_vec[path_vec_size++] = NULL;
- if (after_device) {
- g_string_append(cmd_line, after_device);
- }
+ g_string_append(cmd_line, after_device_str->str);
+ g_string_free(after_device_str, true);
+
g_string_append(cmd_line, cmd_line2->str);
g_string_free(cmd_line2, true);
--
1.8.3.1
- [Qemu-devel] [PULL 00/24] Misc patches for 2019-06-03, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 01/24] test-thread-pool: be more reliable, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 02/24] vl: make -accel help to list enabled accelerators only, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 03/24] checkpatch: allow SPDX-License-Identifier, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 04/24] memory: Remove memory_region_get_dirty(), Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 07/24] edu: mmio: allow 64-bit access in read dispatch, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 08/24] edu: uses uint64_t in dma operation, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 09/24] qgraph: allow extra_device_opts on contains nodes,
Paolo Bonzini <=
- [Qemu-devel] [PULL 05/24] i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitor, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 20/24] tests: convert ds1338-test to qtest, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 17/24] libqos: add ARM n800 machine object, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 14/24] imx25-pdk: create ds1338 for qtest inside the test, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 18/24] libqos: add ARM imx25-pdk machine object, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 15/24] libqos: split I2CAdapter initialization and allocation, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 21/24] libqos: i2c: move address into QI2CDevice, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 19/24] tests: convert OMAP i2c tests to qgraph, Paolo Bonzini, 2019/06/03
- [Qemu-devel] [PULL 24/24] q35: Revert to kernel irqchip, Paolo Bonzini, 2019/06/03