]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
virtio_mmio: Restore guest page size on resume
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Tue, 21 Jun 2022 11:06:21 +0000 (13:06 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:52:55 +0000 (10:52 +0200)
commit17700791f5b94d02a1bdc9accbec7fd938bb2069
treea2e7e8b06e1be9ebd7f2f3be8f2a7ce5baa814cb
parent0b70acdf202af2b86e74cea1ca20df7ac3de09e2
virtio_mmio: Restore guest page size on resume

BugLink: https://bugs.launchpad.net/bugs/1988351
[ Upstream commit e0c2ce8217955537dd5434baeba061f209797119 ]

Virtio devices might lose their state when the VMM is restarted
after a suspend to disk (hibernation) cycle. This means that the
guest page size register must be restored for the virtio_mmio legacy
interface, since otherwise the virtio queues are not functional.

This is particularly problematic for QEMU that currently still defaults
to using the legacy interface for virtio_mmio. Write the guest page
size register again in virtio_mmio_restore() to make legacy virtio_mmio
devices work correctly after hibernation.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Message-Id: <20220621110621.3638025-3-stephan.gerhold@kernkonzept.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/virtio/virtio_mmio.c