lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/8] vfio/pci: Invalidate mmaps and block the access in D3hot power state
On Tue, Apr 26, 2022 at 09:42:45AM +0800, kernel test robot wrote:
> ...

> sparse warnings: (new ones prefixed by >>)
> >> drivers/vfio/pci/vfio_pci_config.c:703:13: sparse: sparse: restricted pci_power_t degrades to integer
> drivers/vfio/pci/vfio_pci_config.c:703:22: sparse: sparse: restricted pci_power_t degrades to integer

I dunno what Alex thinks, but we have several of these warnings in
drivers/pci/. I'd like to get rid of them, but we haven't figured out
a good way yet. So this might be something we just live with for now.

> vim +703 drivers/vfio/pci/vfio_pci_config.c
>
> 694
> 695 /*
> 696 * It takes all the required locks to protect the access of power related
> 697 * variables and then invokes vfio_pci_set_power_state().
> 698 */
> 699 static void
> 700 vfio_lock_and_set_power_state(struct vfio_pci_core_device *vdev,
> 701 pci_power_t state)
> 702 {
> > 703 if (state >= PCI_D3hot)
> 704 vfio_pci_zap_and_down_write_memory_lock(vdev);
> 705 else
> 706 down_write(&vdev->memory_lock);
> 707
> 708 vfio_pci_set_power_state(vdev, state);
> 709 up_write(&vdev->memory_lock);
> 710 }
> 711
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp

\
 
 \ /
  Last update: 2022-04-26 16:15    [W:0.141 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site