• Sinan Kaya's avatar
    vfio: platform: call _RST method when using ACPI · d30daa33
    Sinan Kaya authored
    The device tree code checks for the presence of a reset driver and calls
    the of_reset function pointer by looking up the reset driver as a module.
    
    ACPI defines _RST method to perform device level reset. After the _RST
    method is executed, the OS can resume using the device. _RST method is
    expected to stop DMA transfers and IRQs.
    
    This patch introduces two functions as vfio_platform_acpi_has_reset and
    vfio_platform_acpi_call_reset. The has reset method is used to declare
    reset capability via the ioctl flag VFIO_DEVICE_FLAGS_RESET. The call
    reset function is used to execute the _RST ACPI method.
    Signed-off-by: default avatarSinan Kaya <okaya@codeaurora.org>
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    d30daa33
vfio_platform_common.c 16.6 KB