Philippe Mathieu-Daudé <phi...@linaro.org> writes: > On 16/1/23 07:40, Markus Armbruster wrote: >> Peter Maydell <peter.mayd...@linaro.org> writes: >> >>> On Mon, 9 Jan 2023 at 14:19, Philippe Mathieu-Daudé <phi...@linaro.org> >>> wrote: >>>> >>>> On 9/1/23 14:33, BALATON Zoltan wrote: >>>>> On Mon, 9 Jan 2023, Philippe Mathieu-Daudé wrote: >>>>>> Use the same property name than the TYPE_PFLASH_CFI01 model. >>>>> >>>>> Nothing uses it? Can this break command lines and if so do we need >>>>> deprecation or some compatibility function until everybody changed their >>>>> usage? >>>> >>>> Good point... I missed that :/ >>> >>> That should not be possible, because the cfi02 device >>> is a sysbus device that must be mapped into memory. There's >>> no useful way to use it on the QEMU commandline; the only >>> users are those creating it from C code within QEMU. >> >> I'd say beware of -global, but "fortunately" cfi.pflash01 cannot work >> with it, since its '.' sabotages the -global's syntax. > > But we use it in tests...: > > $ git grep global.*cfi.pflash > tests/qtest/pflash-cfi02-test.c:266: " -global driver=cfi.pflash02," > tests/qtest/pflash-cfi02-test.c:268: " -global driver=cfi.pflash02," > ...
Ah, I forgot the alternate syntax! commit 3751d7c43f795b45ffdb9429cfb09c6beea55c68 Author: Paolo Bonzini <pbonz...@redhat.com> Date: Thu Apr 9 14:16:19 2015 +0200 vl: allow full-blown QemuOpts syntax for -global -global does not work for drivers that have a dot in their name, such as cfi.pflash01. This is just a parsing limitation, because such globals can be declared easily inside a -readconfig file. To allow this usage, support the full QemuOpts key/value syntax for -global too, for example "-global driver=cfi.pflash01,property=secure,value=on". The two formats do not conflict, because the key/value syntax does not have a period before the first equal sign. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> So we aren't "fortunate" after all. >> Related prior discussion in the cover letter of "[PATCH RFC 0/1] QOM >> type names and QAPI" and the replies to it: >> Message-Id: <20210129081519.3848145-1-arm...@redhat.com> >> https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07541.html >> The patch there became commit e178113ff6 "hw: Replace anti-social QOM >> type names". >> [...] >>