[PATCH 1/1] accel/kvm/kvm-all: fix vm crash when set dirty ring and memorybacking

2023-03-23 Thread Jiajing Zhou
From: "zhoujiajing.vergil" It is possible enter this function when the cpu not finished creating but is already in the cpu list. The value of dirty_gfns is null, causing vm crash here. When both dirty-ring and memorybacking are set, creating a vm will assert on kvm_dirty_ring_reap_one. Part of

[RFC] accel/kvm/kvm-all: fix vm crash when set dirty ring and memorybacking

2023-03-23 Thread Jiajing Zhou
From: "zhoujiajing.vergil" It is possible enter this function when the cpu not finished creating but is already in the cpu list. The value of dirty_gfns is null, causing vm crash here. The call stack is as follows: kvm_dirty_ring_reaper_thread -> kvm_dirty_ring_reap