* Daniel P. Berrangé ([email protected]) wrote: > On Thu, Oct 09, 2025 at 01:56:09AM +0000, Dr. David Alan Gilbert wrote: > > * Gerd Hoffmann ([email protected]) wrote: > > > Starting with the edk2-stable202508 tag OVMF (and ArmVirt too) have > > > optional support for logging to a memory buffer. There is guest side > > > support -- for example in linux kernels v6.17+ -- to read that buffer. > > > But that might not helpful if your guest stops booting early enough that > > > guest tooling can not be used yet. So host side support to read that > > > log buffer is a useful thing to have. > > > > > > This patch implements both qmp and hmp monitor commands to read the > > > firmware log. > > > > > > Signed-off-by: Gerd Hoffmann <[email protected]> > > > > I'm OK with that, but I wonder if it would be better to have a command > > that wrote the buffer to a file rather than displaying it directly; I don't > > think we normally have anything else which outputs that much raw guest > > provided data directly. > > I assume when it goes wrong you end up with random unprintable junk in > > the buffer. > > 128 KB is on the high side, but is not terrible. Libvirt (arbitrarily) > caps a QMP reply at 10 MB. Libvirt is going to want to send this on to > the client app and will likely do that streaming in memory, so having > it iin a file is not required from our POV. > > IIRC, some of the query-block command replies can get insanely huge > when the qcow2 chain is very long.
OK, what about sanitisation - if that text contains random binary what happens, or should we make sure it's sanitised? Dave > With regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| > -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
