diff options
| author | Xiong Weimin <xiongweimin@kylinos.cn> | 2026-06-26 10:05:44 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-08-03 23:08:17 -0400 |
| commit | db09a0f62f888da11bca2f4aba65a7b60b4eb6f5 (patch) | |
| tree | d0adf215d541d3ef397a262a6bae6047f5c46e13 | |
| parent | 1263264b5af268dba19f27520a7fb135a5c8f07e (diff) | |
| download | linux-next-db09a0f62f888da11bca2f4aba65a7b60b4eb6f5.tar.gz linux-next-db09a0f62f888da11bca2f4aba65a7b60b4eb6f5.zip | |
vdpa_sim: clear pending_kick on device reset
vdpasim_kick_vq() sets pending_kick when a virtqueue is kicked while
the device is suspended (!running but DRIVER_OK). vdpasim_resume()
later replays kicks for all virtqueues when pending_kick is set.
vdpasim_do_reset() clears running and status but leaves pending_kick
unchanged. If a kick is deferred during suspend and the device is
reset before resume, a later resume can spuriously kick every
virtqueue even though no new work was queued after reset.
Clear pending_kick in vdpasim_do_reset() together with the other
device state that must not survive a reset.
Tested-on: openEuler VM (6.16.8, /usr/src/linux-6.16.8)
Tested-by: Xiong Weimin <xiongweimin@kylinos.cn>
Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260626020545.607600-2-15927021679@163.com>
| -rw-r--r-- | drivers/vdpa/vdpa_sim/vdpa_sim.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index c748fe451163..aa3741b8778d 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -161,6 +161,7 @@ static void vdpasim_do_reset(struct vdpasim *vdpasim, u32 flags) } vdpasim->running = false; + vdpasim->pending_kick = false; spin_unlock(&vdpasim->iommu_lock); vdpasim->features = 0; |
