Commit Graph

1108236 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
e2521ccbef Merge 71e80720db ("Merge tag 'kbuild-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild") into android-mainline
Steps on the way to 5.19-rc1

Resolves merge conflicts in:
	scripts/Makefile.modfinal
	scripts/Makefile.modpost

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I720cb2f0a8460e087b7985ecbeec4b760eba52ca
2022-07-07 21:38:37 +02:00
Greg Kroah-Hartman
8695a0e36a Merge 952923ddc0 ("Merge tag 'pull-18-rc1-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8379bfaff678581f387067c65ed281c9b9dff082
2022-07-07 21:38:10 +02:00
Greg Kroah-Hartman
c18ad35f74 Merge cbd76edeab ("Merge tag 'pull-18-rc1-work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia814bd353c25692f215ec9525c4979add7e62a71
2022-07-07 21:37:54 +02:00
Greg Kroah-Hartman
67e5e580a8 Merge dbe0ee4661 ("Merge tag 'pull-18-rc1-work.fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I727607da695b7451ed18e25b68a188c45364024c
2022-07-07 21:36:41 +02:00
Al Viro
2e3a42ca60 UPSTREAM: fix the breakage in close_fd_get_file() calling conventions change
It used to grab an extra reference to struct file rather than
just transferring to caller the one it had removed from descriptor
table.  New variant doesn't, and callers need to be adjusted.

Reported-and-tested-by: syzbot+47dd250f527cb7bebf24@syzkaller.appspotmail.com
Fixes: 6319194ec5 ("Unify the primitives for file descriptor closing")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 40a1926022)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5f35765ed03c018123b0e121f7d6ebe7f351f4d4
2022-07-07 21:35:13 +02:00
Greg Kroah-Hartman
c98570908b Merge 6319194ec5 ("Unify the primitives for file descriptor closing") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2e315fe100e9797a72f291da7001d1d9050cf9ff
2022-07-07 16:42:58 +02:00
Greg Kroah-Hartman
43084a9341 Merge 81132a39c1 ("fs: remove fget_many and fput_many interface") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7bde7c6ac53ab71a97f3590bc064a323c7568239
2022-07-07 16:42:47 +02:00
Greg Kroah-Hartman
3fc6ef68de Merge 4329490a78 ("io_uring_enter(): don't leave f.flags uninitialized") into android-mainline
Steps on the way to 5.19-rc1

Resolves conflicts in:
	fs/io_uring.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia9416cc0166700be89845df1efa82a8c1451d156
2022-07-07 16:42:15 +02:00
Greg Kroah-Hartman
f158dcc418 Merge d66016c5cd ("Merge tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iabf7bd7aca655e1bbad312713d4f24f1d3068a93
2022-07-07 14:15:13 +02:00
Greg Kroah-Hartman
9e56acdf25 Merge d0e60d46bc ("Merge tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I710e362db8d79f10185a4e57ac625a61e3a62265
2022-07-07 14:15:05 +02:00
Greg Kroah-Hartman
e5bd787acc Merge 23df9ba64b ("Merge tag 'for-5.19/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5d2c63e39c316349fefefe46cd39bbe216b81818
2022-07-07 13:27:06 +02:00
Greg Kroah-Hartman
a9ef02c478 Merge 4ccbe91de9 ("Merge tag 'for-linus-5.19-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibd95b0eeb08fb46f5290cc53a25324d8a1b70653
2022-07-07 13:26:57 +02:00
Greg Kroah-Hartman
56241ee9e0 Merge 45b2e5ad68 ("Merge tag 'perf-tools-for-v5.19-2022-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia190f2b2300c749c8d78057067c1ed77eb1687bd
2022-07-07 13:26:46 +02:00
Greg Kroah-Hartman
63231e2347 Merge 032dcf09e2 ("Merge tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2c7a4124da15ffa462e1b36e4a78171adbf68011
2022-07-07 13:26:35 +02:00
Greg Kroah-Hartman
9d23c8de3e Merge 77d4d3609c ("Merge tag 'regulator-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5a40a9574905e3fd155bc485469ed20222a9e5c8
2022-07-07 13:26:26 +02:00
Greg Kroah-Hartman
f80b4c21b9 Merge 1f95267583 ("Merge tag 'ntfs3_for_5.19' of https://github.com/Paragon-Software-Group/linux-ntfs3") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id62e059451ff0cb92e1a265ce2b3415bde256264
2022-07-07 13:26:08 +02:00
Greg Kroah-Hartman
b7876c8b7d Merge 67850b7bdc ("Merge tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I24c33bd2bd16545f814b1b6a615ae1f0d8faee94
2022-07-07 13:25:59 +02:00
Greg Kroah-Hartman
eb6d937732 Merge 1ec6574a3c ("Merge tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4aa2a25bd0b5815a9284abdcc00c406a6e18d0e0
2022-07-07 13:25:46 +02:00
Greg Kroah-Hartman
285f9042a7 Merge 1888e9b4bb ("Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I17b8e471a1f36bb9ccce4d80574094de0a8b101d
2022-07-07 13:25:36 +02:00
Greg Kroah-Hartman
6ad4e9656a Merge 744983d878 ("Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4946065d856cabeaa0a469294dfecba33797c3d4
2022-07-07 12:42:28 +02:00
Greg Kroah-Hartman
a447e4c8ac Merge 4e583ff9df ("Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If828d125563f4adf1dc2b176d63979ac17eed237
2022-07-07 12:42:19 +02:00
Greg Kroah-Hartman
8c1b846b44 Merge a01fe7ec42 ("Merge tag 'devicetree-fixes-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I32b25002a785c71817532079a384e4f716d04e76
2022-07-07 12:42:11 +02:00
Greg Kroah-Hartman
e00b356672 Merge 9af13088ab ("Merge tag 'arm-multiplatform-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b5f146947d6676c33e439e10549c2973a56f913
2022-07-07 12:42:02 +02:00
Greg Kroah-Hartman
af456cd375 Merge c6f2f3e2c8 ("Merge tag 'loongarch-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I05ae19048cc94eff6829c07421b885713e0945f4
2022-07-07 09:36:16 +02:00
Greg Kroah-Hartman
0968c481bc Merge 21873bd66b ("Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If311727467bac64a2f4295ce67b1d86f26e55185
2022-07-07 09:36:03 +02:00
Greg Kroah-Hartman
a69024c967 Merge f66e797b40 ("Merge tag 'riscv-for-linus-5.19-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibc74189be232d4bd98a291a70aac08886ded9dcd
2022-07-07 09:35:48 +02:00
Greg Kroah-Hartman
e2b7083040 Merge 500a434fc5 ("Merge tag 'driver-core-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie6de144a337f7e16e38738a1487e9885480ddfa2
2022-07-06 19:53:36 +02:00
Greg Kroah-Hartman
4a77dcca5c Revert "ANDROID: sched: add vendor hook for correcting cpu capacity"
This reverts commit e209b3b88d.

The hooks in arch_topology break in 5.19-rc1 so revert them for now.  If
they are still needed, we can add them back in later on.

Bug: 163935827
Cc: Yun Hsiang <yun.hsiang@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibb0c787934107ecf1882615c9002a2b91a38e5a3
2022-07-06 19:53:00 +02:00
Greg Kroah-Hartman
903a9a5ed0 Revert "ANDROID: sched: add cpumask parameter to cpu capacity vendor hook"
This reverts commit 07f80e7c1e.

Hooks in arch_topology.h conflict with upstream changes in 5.19-rc1 so
revert them for now.  If they are still needed they can come back in
later.

Bug: 167126223
Cc: Yun Hsiang <yun.hsiang@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5f794ccbbc6ef51baf8e32d08c220d551bab3164
2022-07-06 19:53:00 +02:00
Greg Kroah-Hartman
834285e43d Revert "ANDROID: sched: Add vendor hooks for update_topology"
This reverts commit 93c605314b.

There are problems with how the hooks work with the upstream changes in
5.19-rc1.  If these are still needed, they can be added back later, but
revert them for now to get the build working properly.

Bug: 200103201
Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Cc: Ashay Jaiswal <quic_ashayj@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaf2cc76822240af4fa9e7090b47d5d7a84bff6dc
2022-07-06 19:21:18 +02:00
Greg Kroah-Hartman
b9bca6992d Revert "ANDROID: topology: Add flag to indicate topology has been updated"
This reverts commit e5aa1a481e.

There are problems with hooks in the topology code changes in 5.19-rc1,
so revert them for now.  If they are still needed in the future, they
can be brought back.

Bug: 187234873
Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7d41c7af7d4582319937f818e0bde25cedd47610
2022-07-06 19:21:15 +02:00
Greg Kroah-Hartman
c18e2df05b Revert "ANDROID: arch_topology: Export thermal pressure symbol"
This reverts commit d7db9dc74f.

This should no longer be needed to be exported.  If so, please submit
the needed driver upstream.

Bug: 175847109
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I21751d44a1c28b22eec53f5f6212b1934c84febb
2022-07-06 19:21:13 +02:00
Treehugger Robot
90b20e9248 Merge "Merge 6f9b5ed8ca ("Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline" into android-mainline 2022-07-02 13:14:55 +00:00
Treehugger Robot
6af59ed151 Merge "Merge 54c2cc7919 ("Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline" into android-mainline 2022-07-02 13:13:28 +00:00
Treehugger Robot
bcc702a63f Merge "Merge 932c2989b5 ("Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into android-mainline" into android-mainline 2022-07-02 13:11:42 +00:00
Treehugger Robot
229095a2b5 Merge "Merge 78c6499c92 ("Merge tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline" into android-mainline 2022-07-01 22:35:35 +00:00
Treehugger Robot
31414f8bd2 Merge "Merge 72fbbc3d0e ("Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline" into android-mainline 2022-07-01 22:32:15 +00:00
Treehugger Robot
d75fe523d0 Merge "Merge 4ad680f083 ("Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging") into android-mainline" into android-mainline 2022-07-01 22:29:23 +00:00
Greg Kroah-Hartman
3b6d09b4a7 Merge 6f9b5ed8ca ("Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline
Steps on the way to 5.19-rc1

Resolves merge conflicts in:
	drivers/android/binder.c

Cc: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifcc17a51f95579eb91e23a2c3940cecad5582f15
2022-07-01 22:46:48 +02:00
Greg Kroah-Hartman
2825770ce3 Merge 54c2cc7919 ("Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I276fa015c31114e7fdd76ce8bec6e66c25b9fc0d
2022-07-01 22:46:00 +02:00
Greg Kroah-Hartman
2919b774ff Merge 78c6499c92 ("Merge tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8ebc847ccfb6190c7bd1c03e712e5c042677c26d
2022-07-01 22:43:36 +02:00
Greg Kroah-Hartman
63bd557bb8 Merge 72fbbc3d0e ("Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I75d5d66bcaf65819af32dcece0085363e7d94174
2022-07-01 22:43:19 +02:00
Greg Kroah-Hartman
2031c74ede Merge 34845d92bc ("Merge tag 'for-5.19/block-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I809f84ca1baedbc84ae30f5c26a12dced1223216
2022-07-01 22:43:00 +02:00
Greg Kroah-Hartman
d1343179cf Merge 5ac8bdb9ad ("Merge tag 'io_uring-5.19-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifb1cca96ab3d0a83719c780afb9f2d05dc9a95b4
2022-07-01 22:42:43 +02:00
Greg Kroah-Hartman
38c9e76513 Merge 932c2989b5 ("Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into android-mainline
Steps on the way to 5.19-rc1

Resolves merge conflicts in:
	drivers/tty/hvc/hvc_dcc.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I11d3fa88102b8efda85d2c37fee3138b211e4afa
2022-07-01 22:38:32 +02:00
Greg Kroah-Hartman
2b869d8965 Merge 4ad680f083 ("Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib8ea92592ccd22820e027da7ec71c650b73ba84f
2022-07-01 22:34:06 +02:00
Deming Wang
d712ca5a16 UPSTREAM: virtio_ring: make vring_create_virtqueue_split prettier
Add some spaces to vring_alloc_queue(make it look prettier).

Signed-off-by: Deming Wang <wangdeming@inspur.com>
Message-Id: <20220622192306.4371-1-wangdeming@inspur.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c7cc29aaeb)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I13a21cf962980ae6cdb84f5564c43b2506448baf
2022-07-01 20:24:03 +00:00
Stefano Garzarella
e14dde1bce UPSTREAM: vhost-vdpa: call vhost_vdpa_cleanup during the release
Before commit 3d56987938 ("vhost-vdpa: introduce asid based IOTLB")
we call vhost_vdpa_iotlb_free() during the release to clean all regions
mapped in the iotlb.

That commit removed vhost_vdpa_iotlb_free() and added vhost_vdpa_cleanup()
to do some cleanup, including deleting all mappings, but we forgot to call
it in vhost_vdpa_release().

This causes that if an application does not remove all mappings explicitly
(or it crashes), the mappings remain in the iotlb and subsequent
applications may fail if they map the same addresses.

Calling vhost_vdpa_cleanup() also fixes a memory leak since we are not
freeing `v->vdev.vqs` during the release from the same commit.

Since vhost_vdpa_cleanup() calls vhost_dev_cleanup() we can remove its
call from vhost_vdpa_release().

Fixes: 3d56987938 ("vhost-vdpa: introduce asid based IOTLB")
Cc: gautam.dawar@xilinx.com
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220622151407.51232-1-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 037d430556)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2101b1b45143c342bc85a379a8859474f7c5128
2022-07-01 20:24:03 +00:00
Stephan Gerhold
f9cd6692e7 UPSTREAM: virtio_mmio: Restore guest page size on resume
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>
(cherry picked from commit e0c2ce8217)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dc514a699d9fbc4a209ef9523e3bc25dbe6a3d5
2022-07-01 20:24:03 +00:00
Stephan Gerhold
f94739ce6c UPSTREAM: virtio_mmio: Add missing PM calls to freeze/restore
Most virtio drivers provide freeze/restore callbacks to finish up
device usage before suspend and to reinitialize the virtio device after
resume. However, these callbacks are currently only called when using
virtio_pci. virtio_mmio does not have any PM ops defined.

This causes problems for example after suspend to disk (hibernation),
since the virtio devices might lose their state after the VMM is
restarted. Calling virtio_device_freeze()/restore() ensures that
the virtio devices are re-initialized correctly.

Fix this by implementing the dev_pm_ops for virtio_mmio,
similar to virtio_pci_common.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Message-Id: <20220621110621.3638025-2-stephan.gerhold@kernkonzept.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit ed7ac37fde)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6be577fb90dd9c444b11676b0baf80d1c5c20de6
2022-07-01 20:24:03 +00:00