QemuGL had issues on Ubuntu, these where fixed with a workaround but need a cleaner solution
And also, QEMU GL passthrough on qemux86 images ends up flooding the buffer with "vmsvga_fifo_read_raw: FIFO empty during CMD 17"
*** Bug 125 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > QemuGL had issues on Ubuntu, these where fixed with a workaround but need a > cleaner solution Josh, Can you provide more details on the issue and workaround? Thanks,
The workaround was pushed by Jeff Dike in commit 8ce85086f697eb0b08076ee8939d3167cab4c549: "qemu: Work around the crash seen on Ubuntu. Due to different stack contents in sdl_display_init on Ubuntu vs other distros, an uninitialized structure is causing a crash. Zeroing the structure makes the behavior uniform across distros, avoiding the Ubuntu crash, but doesn't fix the underlying bugs, notably: the return value of SDL_GetWMInfo needs to be checked, as it's currently failing silently the underlying reason for the failure of SDL_GetWMInfo needs to be found - there is a GetWMINfo method in the internal SDL structure which is NULL, and the reason for this needs to be found." http://git.pokylinux.org/?p=poky.git;a=commit;h=8ce85086f697eb0b08076ee8939d3167cab4c549
FYI: I am seeing the message again "vmsvga_fifo_read_raw: FIFO empty during CMD 19" Note sure if this was fixed as part or is it a new bug?
it was not fixed yet. I'll look at this.
This issue is not easily reproduced on my side. After several times of catching, I found something interesting... ==== Back Ground ==== Vmware designed one specific VGA device to accelerate the emulation, where an FIFO is used for syncing command. OS driver is assumed to produce command @ index of "next_cmd", while emulated hardware consumes command @ index of "stop". E.g. to produce a command for update, OS driver need put 5 elements on the FIFO: CMD_UPDATE, x, y, width, and height. In QEMU, a timer is set to check the FIFO periodically: if FIFO is not empty, parse the command first, and get UPDATE in this case. Then get the 4 parameters from the FIFO, to update the related region. ==== Phenomenon ==== When this bug happened, there is only 4 elements in FIFO, that is, QEMU starts checking the FIFO before OS driver insert height. It is "incomplete command". QEMU GL patch change the behavior towards it. Without GL patch, "incomplete command" is ignored. QEMU timer get a meaningless value under "stop", and still update "stop", which leads a invalid FIFO state. But considering OS driver will put height soon, this is not so harmful(Only one invalid parameter). With GL patch, "incomplete command" is detected, and 0 is returned without updating "stop". After missing height is inserted in future, it's treated as command rather than parameter next time. Disorder is spreading form now on... ==== root cause ==== I only reproduced this issue for several times, and deduced the root cause by observation and code investigation. I'm not 100% sure. QEMU is an emulator, that emulating all the guest os binary including vmware VGA driver. So QEMU works in a big loop, where it emulate some guest binary, then run timers including FIFO checking. So I believe that before guest driver insert "height", QEMU ends this iteration of emulation, and starts FIFO checking. The bug always start from trying to fetch missing height for UPDATE command in my observation. Maybe some nature of QEMU emulation caused this. In theory, guest driver should put all the elements in FIFO, then update the "next_cmd”. But it uses one slow path, like this: while (bytes > 0) { iowrite32(*buffer++, fifo_mem + (next_cmd >> 2)); next_cmd += sizeof(uint32_t); if (unlikely(next_cmd == max)) next_cmd = min; mb(); iowrite32(next_cmd, fifo_mem + SVGA_FIFO_NEXT_CMD); mb(); bytes -= sizeof(uint32_t); } Notice it updates "next_cmd" after inserting each element. == Fixes == Need update the "next_cmd" in total after the while loop, so that QEMU would see nothing.
http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=27b68f9f4c178c60e7095001a7dda3864068c6ae
No longer seeing the error.