1. 10 12月, 2014 6 次提交
  2. 09 12月, 2014 4 次提交
  3. 15 10月, 2014 3 次提交
  4. 27 7月, 2014 1 次提交
  5. 13 3月, 2014 1 次提交
  6. 04 12月, 2013 1 次提交
  7. 29 10月, 2013 1 次提交
  8. 09 9月, 2013 1 次提交
    • A
      virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM · 9e266ece
      Aaron Lu 提交于
      The virtio_pci_freeze/restore are defined under CONFIG_PM but is used
      by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under
      CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but
      CONFIG_PM_RUNTIME is, the following warning message appeared:
      
      drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function]
       static int virtio_pci_freeze(struct device *dev)
                  ^
      drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function]
       static int virtio_pci_restore(struct device *dev)
                  ^
      Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Reviewed-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9e266ece
  9. 02 7月, 2013 1 次提交
    • A
      virtio-pci: fix leaks of msix_affinity_masks · f11335db
      Andrew Vagin 提交于
      vp_dev->msix_vectors should be initialized before allocating
      msix_affinity_masks, otherwise vp_free_vectors will not free these
      objects.
      
      unreferenced object 0xffff88010f969d88 (size 512):
        comm "systemd-udevd", pid 158, jiffies 4294673645 (age 80.545s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0
          [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0
          [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80
          [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10
          [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810
          [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0
          [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon]
          [<ffffffffa00d2c29>] virtballoon_probe+0xf9/0x1a0 [virtio_balloon]
          [<ffffffff813fb61e>] virtio_dev_probe+0xde/0x140
          [<ffffffff814452b8>] driver_probe_device+0x98/0x3a0
          [<ffffffff8144566b>] __driver_attach+0xab/0xb0
          [<ffffffff814432f4>] bus_for_each_dev+0x94/0xb0
          [<ffffffff81444f4e>] driver_attach+0x1e/0x20
          [<ffffffff81444910>] bus_add_driver+0x200/0x280
          [<ffffffff81445c14>] driver_register+0x74/0x160
          [<ffffffff813fb7d0>] register_virtio_driver+0x20/0x40
      
      v2: change msix_vectors uncoditionaly in vp_free_vectors
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Signed-off-by: NAndrew Vagin <avagin@openvz.org>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      f11335db
  10. 11 2月, 2013 2 次提交
  11. 04 1月, 2013 1 次提交
    • G
      Drivers: virtio: remove __dev* attributes. · 8590dbc7
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, and __devexit
      from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8590dbc7
  12. 18 12月, 2012 2 次提交
  13. 28 9月, 2012 4 次提交
  14. 31 3月, 2012 4 次提交
  15. 12 1月, 2012 3 次提交
  16. 24 11月, 2011 1 次提交
    • M
      virtio-pci: make reset operation safer · e6af578c
      Michael S. Tsirkin 提交于
      virtio pci device reset actually just does an I/O
      write, which in PCI is really posted, that is it
      can complete on CPU before the device has received it.
      
      Further, interrupts might have been pending on
      another CPU, so device callback might get invoked after reset.
      
      This conflicts with how drivers use reset, which is typically:
      	reset
      	unregister
      a callback running after reset completed can race with
      unregister, potentially leading to use after free bugs.
      
      Fix by flushing out the write, and flushing pending interrupts.
      
      This assumes that device is never reset from
      its vq/config callbacks, or in parallel with being
      added/removed, document this assumption.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e6af578c
  17. 17 11月, 2011 1 次提交
  18. 14 11月, 2011 1 次提交
  19. 02 11月, 2011 1 次提交
  20. 21 4月, 2011 1 次提交
    • A
      virtio_pci: Prevent double-free of pci regions after device hot-unplug · 31a3ddda
      Amit Shah 提交于
      In the case where a virtio-console port is in use (opened by a program)
      and a virtio-console device is removed, the port is kept around but all
      the virtio-related state is assumed to be gone.
      
      When the port is finally released (close() called), we call
      device_destroy() on the port's device.  This results in the parent
      device's structures to be freed as well.  This includes the PCI regions
      for the virtio-console PCI device.
      
      Once this is done, however, virtio_pci_release_dev() kicks in, as the
      last ref to the virtio device is now gone, and attempts to do
      
           pci_iounmap(pci_dev, vp_dev->ioaddr);
           pci_release_regions(pci_dev);
           pci_disable_device(pci_dev);
      
      which results in a double-free warning.
      
      Move the code that releases regions, etc., to the virtio_pci_remove()
      function, and all that's now left in release_dev is the final freeing of
      the vp_dev.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      31a3ddda