mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
virtio-gpu: Handle virtio_gpu_virgl_init() failure
virtio_gpu_virgl_init() may fail, leading to a further Qemu crash because Qemu assumes it never fails. Check virtio_gpu_virgl_init() return code and don't execute virtio commands on error. Failed virtio_gpu_virgl_init() will result in a timed out virtio commands for a guest OS. Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Message-Id: <20241024210311.118220-5-dmitry.osipenko@collabora.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
committed by
Alex Bennée
parent
a0a8f47fd0
commit
7e688d1bf5
@@ -222,11 +222,18 @@ struct VirtIOGPUClass {
|
||||
Error **errp);
|
||||
};
|
||||
|
||||
/* VirtIOGPUGL renderer states */
|
||||
typedef enum {
|
||||
RS_START, /* starting state */
|
||||
RS_INIT_FAILED, /* failed initialisation */
|
||||
RS_INITED, /* initialised and working */
|
||||
RS_RESET, /* inited and reset pending, moves to start after reset */
|
||||
} RenderState;
|
||||
|
||||
struct VirtIOGPUGL {
|
||||
struct VirtIOGPU parent_obj;
|
||||
|
||||
bool renderer_inited;
|
||||
bool renderer_reset;
|
||||
RenderState renderer_state;
|
||||
|
||||
QEMUTimer *fence_poll;
|
||||
QEMUTimer *print_stats;
|
||||
|
||||
Reference in New Issue
Block a user