Skip to content
  • Alex Williamson's avatar
    vfio-pci: Manage user power state transitions · 2dd11948
    Alex Williamson authored
    
    
    We give the user access to change the power state of the device but
    certain transitions result in an uninitialized state which the user
    cannot resolve.  To fix this we need to mark the PowerState field of
    the PMCSR register read-only and effect the requested change on behalf
    of the user.  This has the added benefit that pdev->current_state
    remains accurate while controlled by the user.
    
    The primary example of this bug is a QEMU guest doing a reboot where
    the device it put into D3 on shutdown and becomes unusable on the next
    boot because the device did a soft reset on D3->D0 (NoSoftRst-).
    
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    2dd11948