From: Stefan Hajnoczi <stefanha@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
pkrempa@redhat.com, "Daniel P. Berrangé" <berrange@redhat.com>,
"Paul Durrant" <paul@xen.org>,
"Anthony PERARD" <anthony@xenproject.org>
Subject: Re: [PATCH v2 0/2] qdev-monitor: avoid QemuOpts in QMP device_add
Date: Mon, 12 Aug 2024 14:15:34 -0400 [thread overview]
Message-ID: <20240812181534.GC69160@fedora.redhat.com> (raw)
In-Reply-To: <87wmkz5oqk.fsf@pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
On Fri, Aug 02, 2024 at 10:10:43AM +0200, Markus Armbruster wrote:
> Can we additionally cut out the QemuOpts middleman in
> usbback_portid_add()?
>
> qdict = qdict_new();
> qdict_put_str(qdict, "driver", "usb-host");
> tmp = g_strdup_printf("%s.0", usbif->xendev.qdev.id);
> qdict_put_str(qdict, "bus", tmp);
> g_free(tmp);
> tmp = g_strdup_printf("%s-%u", usbif->xendev.qdev.id, port);
> qdict_put_str(qdict, "id", tmp);
> g_free(tmp);
> qdict_put_int(qdict, "port", port);
> qdict_put_int(qdict, "hostbus", atoi(busid));
> qdict_put_str(qdict, "hostport", portname);
> opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict,
> &error_abort);
> usbif->ports[port - 1].dev = USB_DEVICE(qdev_device_add(opts, &local_err));
>
> Trying this is up to you!
Paul or Anthony: Do you know how to run usbback_portid_add() for
testing? I would like to make sure that suggested the code change works
and don't have experience running the Xen code in QEMU.
Thanks,
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2024-08-12 18:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 14:05 [PATCH v2 0/2] qdev-monitor: avoid QemuOpts in QMP device_add Stefan Hajnoczi
2024-08-01 14:05 ` [PATCH v2 1/2] " Stefan Hajnoczi
2024-08-02 8:01 ` Markus Armbruster
2024-08-12 18:07 ` Stefan Hajnoczi
2024-08-29 14:09 ` Markus Armbruster
2024-08-01 14:05 ` [PATCH v2 2/2] vl: use qmp_device_add() in qemu_create_cli_devices() Stefan Hajnoczi
2024-08-02 8:07 ` Markus Armbruster
2024-08-02 8:10 ` [PATCH v2 0/2] qdev-monitor: avoid QemuOpts in QMP device_add Markus Armbruster
2024-08-12 18:15 ` Stefan Hajnoczi [this message]
2024-08-13 8:18 ` Paul Durrant
2024-08-27 19:20 ` Stefan Hajnoczi
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=20240812181534.GC69160@fedora.redhat.com \
--to=stefanha@redhat.com \
--cc=anthony@xenproject.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=pkrempa@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.