summaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-03-05 13:19:59 +0100
committerRichard Weinberger <richard@nod.at>2021-06-17 21:45:44 +0200
commit43c590cb86665be702c0af0231a10ec813df9cfd (patch)
treedc1c8389fce0e298bf113e880eb457e0bd69de5e /arch/um/include
parent68f5d3f3b6543266b29e047cfaf9842333019b4c (diff)
downloadlinux-43c590cb86665be702c0af0231a10ec813df9cfd.tar.bz2
um: virtio/pci: enable suspend/resume
The UM virtual PCI devices currently cannot be suspended properly since the virtio driver already disables VQs well before the PCI bus's suspend_noirq wants to complete the transition by writing to PCI config space. After trying around for a long time with moving the devices on the DPM list, trying to create dependencies between them, etc. I gave up and instead added UML specific cross-driver API that lets the virt-pci code enable not suspending/resuming VQs for its devices. This then allows the PCI bus suspend_noirq to still talk to the device, and suspend/resume works properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/linux/virtio-uml.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/um/include/linux/virtio-uml.h b/arch/um/include/linux/virtio-uml.h
new file mode 100644
index 000000000000..2f652fa90f04
--- /dev/null
+++ b/arch/um/include/linux/virtio-uml.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2021 Intel Corporation
+ * Author: Johannes Berg <johannes@sipsolutions.net>
+ */
+
+#ifndef __VIRTIO_UML_H__
+#define __VIRTIO_UML_H__
+
+void virtio_uml_set_no_vq_suspend(struct virtio_device *vdev,
+ bool no_vq_suspend);
+
+#endif /* __VIRTIO_UML_H__ */