vfio: platform: Fix using devices in PM Domains
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 29 May 2018 17:15:28 +0000 (19:15 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 8 Jun 2018 16:24:37 +0000 (10:24 -0600)
commit415eb9fc0e23071fc8cdd1c7bf42e4a54b6521d3
tree290a0b4591d24973b2903e6128c9c7771ad32c2f
parente77addf018f0c8d947ddc0bef2cd6d4791da7dde
vfio: platform: Fix using devices in PM Domains

If a device is part of a PM Domain (e.g. power and/or clock domain), its
power state is managed using Runtime PM.  Without Runtime PM, the device
may not be powered up or clocked, causing subtle failures, crashes, or
system lock-ups when the device is accessed by the guest.

Fix this by adding Runtime PM support, powering the device when the VFIO
device is opened by the guest.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/platform/vfio_platform_common.c