From: "Cédric Le Goater" <clegoate@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>
Cc: qemu-s390x@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH] hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge
Date: Mon, 1 Jul 2024 23:24:28 +0200 [thread overview]
Message-ID: <41d6d6ca-e434-488b-81a8-5db158ecf81d@redhat.com> (raw)
In-Reply-To: <20240701200108.154271-1-thuth@redhat.com>
On 7/1/24 10:01 PM, Thomas Huth wrote:
> The initial virtio-net-ccw devices currently do not have a proper parent
> in the QOM tree, so they show up under /machine/unattached - which is
> somewhat ugly. Let's attach them to /machine/virtual-css-bridge/virtual-css
> instead.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Thanks,
C.
> ---
> hw/s390x/s390-virtio-ccw.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index cd063f8b64..0d58e5ab75 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -216,8 +216,11 @@ static void s390_init_ipl_dev(const char *kernel_filename,
> static void s390_create_virtio_net(BusState *bus, const char *name)
> {
> DeviceState *dev;
> + int cnt = 0;
>
> while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
> + g_autofree char *childname = g_strdup_printf("%s[%d]", name, cnt++);
> + object_property_add_child(OBJECT(bus), childname, OBJECT(dev));
> qdev_realize_and_unref(dev, bus, &error_fatal);
> }
> }
next prev parent reply other threads:[~2024-07-01 21:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 20:01 [PATCH] hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge Thomas Huth
2024-07-01 21:24 ` Cédric Le Goater [this message]
2024-07-02 4:45 ` Philippe Mathieu-Daudé
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=41d6d6ca-e434-488b-81a8-5db158ecf81d@redhat.com \
--to=clegoate@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).