[PATCH 0/2] Set user creatable for flag ibex uart and plic

Damien Hedde posted 2 patches 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210811093838.18719-1-damien.hedde@greensocs.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Paolo Bonzini <pbonzini@redhat.com>
hw/char/ibex_uart.c | 1 +
hw/intc/ibex_plic.c | 1 +
2 files changed, 2 insertions(+)
[PATCH 0/2] Set user creatable for flag ibex uart and plic
Posted by Damien Hedde 2 years, 9 months ago
Hi,

This small series only consist in setting the user_creatable flag
of ibex_uart and ibex_plic devices. These two devices are already
using properties to configure themselves so nothing else is required.

Note that this change alone will not allow creation of these devices
using -device cli option or device_add qmp command as they are sysbus
devices.

We do that because we are currently working on adding the possibily
to configure/build a machine from qmp commands (see this rfc:
https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg03706.html). 
We are using these simple devices in order to test our additions.

We prefer to send these 2 patches on a separate series as they are not
really related to the main topic. We will send a following series
for the additions.

Thanks,
Damien

Damien Hedde (2):
  hw/char/ibex_uart: set user-creatable
  hw/char/ibex_plic: set user-creatable

 hw/char/ibex_uart.c | 1 +
 hw/intc/ibex_plic.c | 1 +
 2 files changed, 2 insertions(+)

-- 
2.32.0


Re: [PATCH 0/2] Set user creatable for flag ibex uart and plic
Posted by Peter Maydell 2 years, 9 months ago
On Wed, 11 Aug 2021 at 10:43, Damien Hedde <damien.hedde@greensocs.com> wrote:
> This small series only consist in setting the user_creatable flag
> of ibex_uart and ibex_plic devices. These two devices are already
> using properties to configure themselves so nothing else is required.
>
> Note that this change alone will not allow creation of these devices
> using -device cli option or device_add qmp command as they are sysbus
> devices.
>
> We do that because we are currently working on adding the possibily
> to configure/build a machine from qmp commands (see this rfc:
> https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg03706.html).
> We are using these simple devices in order to test our additions.
>
> We prefer to send these 2 patches on a separate series as they are not
> really related to the main topic. We will send a following series
> for the additions.

No, these patches should go in with your other series that
requires them, please. As standalone patches they are definitely
wrong, because (as you note) you cannot usefully user-create a
sysbus device like these from the command line.

Even there I'm not convinced that just marking the devices
user-creatable is the right thing -- if we support creating
a complete machine from QMP commands we probably want to think
about whether that means we need to have separate categories
of "only creatable from C code", "only creatable as part of
QMP machine creation", "creatable on commandline but only
for cold-plug", and "hotpluggable".

-- PMM

Re: [PATCH 0/2] Set user creatable for flag ibex uart and plic
Posted by Damien Hedde 2 years, 9 months ago

On 8/11/21 1:15 PM, Peter Maydell wrote:
> On Wed, 11 Aug 2021 at 10:43, Damien Hedde <damien.hedde@greensocs.com> wrote:
>> This small series only consist in setting the user_creatable flag
>> of ibex_uart and ibex_plic devices. These two devices are already
>> using properties to configure themselves so nothing else is required.
>>
>> Note that this change alone will not allow creation of these devices
>> using -device cli option or device_add qmp command as they are sysbus
>> devices.
>>
>> We do that because we are currently working on adding the possibily
>> to configure/build a machine from qmp commands (see this rfc:
>> https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg03706.html).
>> We are using these simple devices in order to test our additions.
>>
>> We prefer to send these 2 patches on a separate series as they are not
>> really related to the main topic. We will send a following series
>> for the additions.
> 
> No, these patches should go in with your other series that
> requires them, please. As standalone patches they are definitely
> wrong, because (as you note) you cannot usefully user-create a
> sysbus device like these from the command line.
> 
> Even there I'm not convinced that just marking the devices
> user-creatable is the right thing -- if we support creating
> a complete machine from QMP commands we probably want to think
> about whether that means we need to have separate categories
> of "only creatable from C code", "only creatable as part of
> QMP machine creation", "creatable on commandline but only
> for cold-plug", and "hotpluggable".
> 
> -- PMM
> 

I understand, we will put them in the main series where
we will discuss all of this.

Thanks,
--
Damien