From nobody Thu May 16 10:27:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559549840; cv=none; d=zoho.com; s=zohoarc; b=gSjec16XpWbfciP/Qmu4C4r1qG0KoXPv3AW0wq34q7jN3b4XjTfwKoQ9RbH3rNk5e7wp9BkNpXi0tH/xkEmX/OJYpY4dgp9gbhKLMDX2+d4gJcStPJsdGJ3WqOIll9gQVTzsLfTWWVck6TbRLfwIIKq4TwFgHHiujNiq6dEEMz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559549840; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=rf0V6Kg0FhsBpg7sPbqatquZFg/xApxfG+xNMkeAayw=; b=i37E77DJAAgJLWOmCW9+xrFREdHGGVUmD8hbE8edI0q8RGRhUmGJfn4osh4jfNxOBupYhPuaDk6OpiEm6lXociF6DYy4lKITpP8Hx7N2NpPdBzqtzRnml52kQikQuzsdsNfS5WS3HcGZHM1E9Mjk691gJS2tPGCDAAXpUF+T+to= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559549840942425.5559739996402; Mon, 3 Jun 2019 01:17:20 -0700 (PDT) Received: from localhost ([127.0.0.1]:59447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXi9X-00080d-OY for importer@patchew.org; Mon, 03 Jun 2019 04:17:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXi67-00061o-PA for qemu-devel@nongnu.org; Mon, 03 Jun 2019 04:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXi66-0006fZ-P3 for qemu-devel@nongnu.org; Mon, 03 Jun 2019 04:13:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hXi66-0006eb-Jx for qemu-devel@nongnu.org; Mon, 03 Jun 2019 04:13:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EEFA181127 for ; Mon, 3 Jun 2019 08:13:37 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id CBF7A1B465; Mon, 3 Jun 2019 08:13:36 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 3 Jun 2019 10:13:34 +0200 Message-Id: <20190603081335.8185-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 03 Jun 2019 08:13:38 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] qgraph: allow extra_device_opts on contains nodes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 --- 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 ae2fb5de1c..01b2a22c08 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 =3D g_new0(char *, (QOS_PATH_MAX_ELEMENT_SIZE * 2)); int path_vec_size =3D 0; =20 - char *after_cmd =3D NULL, *before_cmd =3D NULL, *after_device =3D NULL; + char *after_cmd, *before_cmd, *after_device; + GString *after_device_str =3D g_string_new(""); char *node_name =3D orig_path->name, *path_str; =20 GString *cmd_line =3D 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 =3D=3D 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); } =20 path_vec[path_vec_size++] =3D qos_graph_edge_get_name(path->path_e= dge); @@ -382,12 +382,15 @@ static void walk_path(QOSGraphNode *orig_path, int le= n) if (after_cmd) { g_string_append(cmd_line2, after_cmd); } + if (after_device) { + g_string_append(after_device_str, after_device); + } } =20 path_vec[path_vec_size++] =3D 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); =20 --=20 2.21.0