Hi, > If I understand correctly, one argument against the current state of > writeable fw_cfg, captured in > <https://www.mail-archive.com/qemu-devel@nongnu.org/msg354983.html>, is > that callbacks on write are not supported. Apparently, QEMU code that > uses the data written by the guest is supposed to just read that data, > not to expect a notification about it. > > I'm unsure how this can work for actual negotiation, where the guest > usually does a read/write/read cycle, and expects some kind of change > between steps #2 and #3. I don't see how that can be implemented in QEMU > without write callbacks (i.e. how QEMU can confirm or reject the > negotiation attempt).
Do you actually need negotiation? I think you only need to know whenever broadcast-smi is supported, and the presence of the etc/broadcast-smi (or however we name that) fw_cfg file indicates that. If it is there just write true/false to it to enable/disable, and qemu checks the field each time a smi is raised. cheers, Gerd