The present disclosure provides a log collection method and device for GPU
virtualization driver, and a medium, relating to the technical field of GPU
virtualization. The method comprises: constructing an isolated and efficient log
transmission channel by allocating an independent
shared memory area for each guest
virtual machine on the host side and completing
address mapping; at the same time, starting an independent log reading thread and reading the log in the
shared memory on demand based on a configurable log collection mode, while recording the log generated on the host side, realizing the synchronous collection of double-end logs, keeping the
system at
low overhead during normal operation, and obtaining complete context information when an exception occurs; by comprehensively analyzing the first driving operation log from the
shared memory and the second driving operation log on the host side, the running behavior link across the host and the
virtual machine can be associated and restored, the accuracy and efficiency of abnormal diagnosis are improved, and the resource occupation and maintenance complexity caused by additional components are reduced.