From: Markus Armbruster <armbru@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
inesvarhol <inesvarhol@proton.me>,
"Inès Varhol" <ines.varhol@telecom-paris.fr>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-devel@nongnu.org,
"Alistair Francis" <alistair@alistair23.me>,
"Arnaud Minier" <arnaud.minier@telecom-paris.fr>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
qemu-arm@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v5 2/3] tests/qtest: Add STM32L4x5 EXTI QTest testcase
Date: Mon, 08 Jan 2024 17:21:40 +0100 [thread overview]
Message-ID: <87jzojbxt7.fsf@pond.sub.org> (raw)
In-Reply-To: <ab6ecb71-7c29-45e6-b69f-9e36d05fd6d6@ilande.co.uk> (Mark Cave-Ayland's message of "Sun, 7 Jan 2024 14:04:27 +0000")
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:
> On 05/01/2024 10:13, Philippe Mathieu-Daudé wrote:
>
>> (+Mark & Eduardo)
>> On 4/1/24 14:37, inesvarhol wrote:
>>>
>>> Le jeudi 4 janvier 2024 à 14:05, Philippe Mathieu-Daudé <philmd@linaro.org> a écrit :
>>>
>>> Hello,
>>>
>>>>> +static void test_edge_selector(void)
>>>>> +{
>>>>> + enable_nvic_irq(EXTI0_IRQ);
>>>>> +
>>>>> + / Configure EXTI line 0 irq on rising edge */
>>>>> + qtest_set_irq_in(global_qtest, "/machine/unattached/device[0]/exti",
>>>>
>>>>
>>>> Markus, this qtest use seems to expect some stability in QOM path...
>>>>
>>>> Inès, Arnaud, having the SoC unattached is dubious, it belongs to
>>>> the machine.
>>>
>>> Noted, we will fix that.
>>> Should we be concerned about the "stability in QOM path" ?
>>
>> Don't worry about this Inès, I wanted to raise Markus attention on this.
>>
>> You showed a legit use of stable QOM path, and Markus told me recently
>> there is no contract for QOM paths (it shouldn't be considered as a
>> stable API). IIRC Markus explanation, "/unattached" container was
>> added as a temporary hack to allow migrating QDev objects to QOM (see
>> around commit da57febfed "qdev: give all devices a canonical path",
>> 11 years ago).
>>
>> I agree anything under "/unattached" can be expected to be stable
>> (but we need a community consensus). Then the big question remaining
>> is "can any qom-path out of /unattached be considered stable?"
>
> For the moment I would definitely say no, and that is mainly because if we were to assume that QOM paths were stable today then I can see it being a barrier to updating older code to meet our current guidelines.
>
> These days I think more about QOM paths being related to the lifecycle of the objects e.g. a machine object has child devices, which may also consist of a number of other children in the case of a multi-function device. For me this means that using object_resolve_path_component() to look up a child object seems reasonable, in contrast with expecting the entire path to be stable.
>
> One thing I think about often is whether the use of device[n] is suitable within QOM tree. For example, if I have a command line like:
>
> -device foo,myprop=prop0,id=fooid0 -device foo,myprop=prop1,id=fooid1
>
> currently they would appear in "info qom-tree" as:
>
> /machine
> /unattached
> /device[0] (foo)
> /device[1] (foo)
Actually
/machine
/peripheral (container)
/fooid0 (foo
/fooid1 (foo)
If you omit id=..., you get
/machine
/peripheral-anon (container)
/device[2] (usb-mouse)
/device[3] (usb-mouse)
or similar; the actual numbers in [brackets] depend on the board.
> whereas it feels this could be done better as:
>
> /machine
> /unattached
> /foo[0] (fooid0)
> /foo[1] (fooid1)
>
> This would automatically place devices of the same type within a QOM array to allow them to be accessed separately by type, or even directly via the "id" if we assume they are unique. In particular if you have a machine with 2 foo in-built devices you could then potentially configure them separately using -global foo[0].myprop=newprop0 and/or -global foo[1].myprop=newprop1 which is something that currently isn't possible.
>
>
> ATB,
>
> Mark.
next prev parent reply other threads:[~2024-01-08 16:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 16:19 [PATCH v5 0/3] Add device STM32L4x5 EXTI Inès Varhol
2023-12-28 16:19 ` [PATCH v5 1/3] hw/misc: Implement " Inès Varhol
2024-01-04 13:14 ` Philippe Mathieu-Daudé
2024-01-04 13:23 ` Samuel Tardieu
2024-01-04 13:40 ` Philippe Mathieu-Daudé
2024-01-04 13:59 ` Samuel Tardieu
2024-01-04 14:06 ` inesvarhol
2023-12-28 16:19 ` [PATCH v5 2/3] tests/qtest: Add STM32L4x5 EXTI QTest testcase Inès Varhol
2024-01-04 3:39 ` Alistair Francis
2024-01-04 13:05 ` Philippe Mathieu-Daudé
2024-01-04 13:37 ` inesvarhol
2024-01-05 10:13 ` Philippe Mathieu-Daudé
2024-01-05 10:19 ` Philippe Mathieu-Daudé
2024-01-08 16:15 ` Markus Armbruster
2024-01-07 14:04 ` Mark Cave-Ayland
2024-01-08 16:21 ` Markus Armbruster [this message]
2024-01-05 10:24 ` Daniel P. Berrangé
2024-01-05 22:16 ` Philippe Mathieu-Daudé
2024-01-04 13:33 ` Philippe Mathieu-Daudé
2024-01-04 13:45 ` inesvarhol
2023-12-28 16:19 ` [PATCH v5 3/3] hw/arm: Connect STM32L4x5 EXTI to STM32L4x5 SoC Inès Varhol
2024-01-04 3:42 ` Alistair Francis
2024-01-04 13:17 ` 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=87jzojbxt7.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alistair@alistair23.me \
--cc=arnaud.minier@telecom-paris.fr \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=ines.varhol@telecom-paris.fr \
--cc=inesvarhol@proton.me \
--cc=lvivier@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.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).