On 11/28/16 10:01, Gerd Hoffmann wrote: > 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.
Michael suggested to use negotiation like virtio does (where the host can reject invalid combinations of requested features): http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg03077.html http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg03218.html I thought negotiation was overkill: http://lists.nongnu.org/archive/html/qemu-devel/2016-11/msg03123.html but I figured I'd just stick with the recommendation. > If it is there just write true/false to it to enable/disable, and qemu > checks the field each time a smi is raised. If we agree there's no need for negotiation, I'm game. Thanks Laszlo