From: Damien Hedde <damien.hedde@greensocs.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"David Hildenbrand" <david@redhat.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Peter Xu" <peterx@redhat.com>, "Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
"Mark Burton" <mark.burton@greensocs.com>
Subject: Re: [RFC PATCH v5 0/3] Sysbus device generic QAPI plug support
Date: Mon, 30 May 2022 16:05:30 +0200 [thread overview]
Message-ID: <5a7b14fa-15ef-42c2-1072-d0aec0795718@greensocs.com> (raw)
In-Reply-To: <CAFEAcA_BinJMmqdTBoCs3V-dqSRQ_jjL7FpdMxCr1etZgn0i_A@mail.gmail.com>
On 5/30/22 12:25, Peter Maydell wrote:
> On Mon, 30 May 2022 at 10:50, Damien Hedde <damien.hedde@greensocs.com> wrote:
>> TYPE_SYS_BUS_DEVICE also comes with reset support.
>> If a device is on not on any bus it is not reached by the root sysbus
>> reset which propagates to every device (and other sub-buses).
>> Even if we move all the mmio/sysbus-irq logic into TYPE_DEVICE, we will
>> still miss that. The bus is needed to handle the reset.
>> For devices created in machine init code, we have the option to do it in
>> the machine reset handler. But for user created device, this is an issue.
>
> Yes, the missing reset support in TYPE_DEVICE is a design
> flaw that we really should try to address.
>
>> If we end up putting in TYPE_DEVICE support for mmios, interrupts and
>> some way to do the bus reset. What would be the difference between the
>> current TYPE_SYS_BUS_DEVICE ?
>
> There would be none, and the idea would be to get rid of
> TYPE_SYS_BUS_DEVICE entirely...
>
Do you expect the bus object to disappear in the process (bus-less
system) or transforming the sysbus into a ~TYPE_BUS thing ?
Assuming we manage to sort out this does cold plugging using the
following scenario looks ok ? (regarding having to issue one command to
create the device AND some commands to handle memory-region and
interrupt lines)
> device_add driver=ibex-uart id=uart chardev=serial0
> sysbus-mmio-map device=uart addr=1073741824
> qom-set path=uart property=sysbus-irq[0] value=plic/unnamed-gpio-in[1]
TYPE_DEVICE or TYPE_SYS_BUS_DEVICE, my goal is still to be able to
cold-plug a "ibex-uart" define its memory map and choose which irq I
wire where.
Thanks,
Damien
next prev parent reply other threads:[~2022-05-30 14:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 13:48 [RFC PATCH v5 0/3] Sysbus device generic QAPI plug support Damien Hedde
2022-05-24 13:48 ` [RFC PATCH v5 1/3] none-machine: allow cold plugging sysbus devices Damien Hedde
2022-05-24 13:48 ` [RFC PATCH v5 2/3] softmmu/memory: add memory_region_try_add_subregion function Damien Hedde
2022-05-24 13:48 ` [RFC PATCH v5 3/3] add sysbus-mmio-map qapi command Damien Hedde
2022-05-24 17:44 ` [RFC PATCH v5 0/3] Sysbus device generic QAPI plug support Mark Cave-Ayland
2022-05-25 9:51 ` Damien Hedde
2022-05-25 11:45 ` Peter Maydell
2022-05-25 13:32 ` Damien Hedde
2022-05-25 19:20 ` Mark Cave-Ayland
2022-05-30 9:50 ` Damien Hedde
2022-05-30 10:25 ` Peter Maydell
2022-05-30 14:05 ` Damien Hedde [this message]
2022-05-31 8:00 ` Mark Cave-Ayland
2022-05-31 9:22 ` Damien Hedde
2022-05-31 20:43 ` Mark Cave-Ayland
2022-06-01 8:39 ` Damien Hedde
2022-06-01 9:07 ` David Hildenbrand
2022-06-01 10:45 ` Mark Cave-Ayland
2022-06-01 10:36 ` Mark Cave-Ayland
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=5a7b14fa-15ef-42c2-1072-d0aec0795718@greensocs.com \
--to=damien.hedde@greensocs.com \
--cc=alistair.francis@wdc.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=edgar.iglesias@xilinx.com \
--cc=eduardo@habkost.net \
--cc=f4bug@amsat.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.burton@greensocs.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wangyanan55@huawei.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).