"Alano Song" <[email protected]> writes:

> Hi all,
>
> I am writing to share a patch and ask for some advice.
>
> I noticed there is no DesignWare I2C controller model in QEMU,
> so I have attempted to add it:
> https://lore.kernel.org/qemu-devel/[email protected]/
>
> I have a couple of questions regarding the patch:
>
> 1) Is it acceptable to submit the I2C controller model by itself,
>     without instantiating it on any specific machine board?

The problem with this approach is the code can very easily bitrot if it
is not exercised by anything. We also tend to cull code that isn't used
(for example if the old machine model was removed and we didn't notice
at the time it was the only user of a device).

>     Users who need it could then add it to their own machine models.

There is a long term aspiration to support dynamic machine models so
they can be defined with some sort of Domain Specific Language (DSL).
Until we reach that state we can only support devices used by machine
models in the upstream.

>     1.1) If it is required to instantiate the new model on a machine board,
>         which board would you recommend for this purpose?
>
>         Patch reviewer remained me, that the arm/virt board is a main model 
> used.
>         And I don't want make troubles on such important model.

virt is a poor choice for as it is the main platform for virtualisation
so adding extra devices just increases the potential surface area for
security exploits.

Ideally you would find a real machine that uses the IP and model that
board. Looking at Zephyr it doesn't look like there are any existing
QEMU models missing it:

  
https://docs.zephyrproject.org/latest/boards/index.html#show-shields=false&compatibles=snps%2Cdesignware-i2c

>
> 2) Coincidentally, I found that Joel Stanley is doing the same work,HAHA :)
>     
> https://lore.kernel.org/qemu-devel/[email protected]/
>
>     What should I do next, may be we can work together to submit such
>     model ?

I would contact Joel/Chris (cc'd) and collaborate on getting the best of
both patches. It looks like the patch is part of a larger series that
ads a new machine which solves one of the problems.

>
> Best Regards,
> Alano Song.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to