1. 30 12月, 2008 3 次提交
    • R
      virtio: Don't use PAGE_SIZE in virtio_pci.c · 480daab4
      Rusty Russell 提交于
      The virtio PCI devices don't depend on the guest page size.  This matters
      now PowerPC virtio is gaining ground (they like 64k pages).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      480daab4
    • K
      virtio: struct device - replace bus_id with dev_name(), dev_set_name() · 99e0b6c8
      Kay Sievers 提交于
      This patch is part of a larger patch series which will remove
      the "char bus_id[20]" name string from struct device. The device
      name is managed in the kobject anyway, and without any size
      limitation, and just needlessly copied into "struct device".
      
      To set and read the device name dev_name(dev) and dev_set_name(dev)
      must be used. If your code uses static kobjects, which it shouldn't
      do, "const char *init_name" can be used to statically provide the
      name the registered device should have. At registration time, the
      init_name field is cleared, to enforce the use of dev_name(dev) to
      access the device name at a later time.
      
      We need to get rid of all occurrences of bus_id in the entire tree
      to be able to enable the new interface. Please apply this patch,
      and possibly convert any remaining remaining occurrences of bus_id.
      
      We want to submit a patch to -next, which will remove bus_id from
      "struct device", to find the remaining pieces to convert, and finally
      switch over to the new api, which will remove the 20 bytes array
      and does no longer have a size limitation.
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      99e0b6c8
    • H
      virtio-pci queue allocation not page-aligned · 13b1eb33
      Hollis Blanchard 提交于
      kzalloc() does not guarantee page alignment, and in fact this broke when
      I enabled CONFIG_SLUB_DEBUG_ON.
      
      (Thanks to Anthony Liguori for spotting the missing kfree sub)
      Signed-off-by: NHollis Blanchard <hollisb@us.ibm.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (fixed kfree)
      Tested-by: NAnthony Liguori <aliguori@us.ibm.com>
      13b1eb33
  2. 25 7月, 2008 2 次提交
  3. 30 5月, 2008 2 次提交
    • R
      virtio: set device index in common code. · b769f579
      Rusty Russell 提交于
      Anthony Liguori points out that three different transports use the virtio code,
      but each one keeps its own counter to set the virtio_device's index field.  In
      theory (though not in current practice) this means that names could be
      duplicated, and that risk grows as more transports are created.
      
      So we move the selection of the unique virtio_device.index into the common code
      in virtio.c, which has the side-benefit of removing duplicate code.
      
      The only complexity is that lguest and S/390 use the index to uniquely identify
      the device in case of catastrophic failure before register_virtio_device() is
      called: now we use the offset within the descriptor page as a unique identifier
      for the printks.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Chris Lalancette <clalance@redhat.com>
      Cc: Anthony Liguori <anthony@codemonkey.ws>
      b769f579
    • R
      virtio: virtio_pci should not set bus_id. · 5610bd15
      Rusty Russell 提交于
      The common virtio code sets the bus_id, overriding anything virtio_pci
      sets anyway.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Chris Lalancette <clalance@redhat.com>
      Cc: Anthony Liguori <anthony@codemonkey.ws>
      5610bd15
  4. 02 5月, 2008 2 次提交
    • R
      virtio: explicit advertisement of driver features · c45a6816
      Rusty Russell 提交于
      A recent proposed feature addition to the virtio block driver revealed
      some flaws in the API: in particular, we assume that feature
      negotiation is complete once a driver's probe function returns.
      
      There is nothing in the API to require this, however, and even I
      didn't notice when it was violated.
      
      So instead, we require the driver to specify what features it supports
      in a table, we can then move the feature negotiation into the virtio
      core.  The intersection of device and driver features are presented in
      a new 'features' bitmap in the struct virtio_device.
      
      Note that this highlights the difference between Linux unsigned-long
      bitmaps where each unsigned long is in native endian, and a
      straight-forward little-endian array of bytes.
      
      Drivers can still remove feature bits in their probe routine if they
      really have to.
      
      API changes:
      - dev->config->feature() no longer gets and acks a feature.
      - drivers should advertise their features in the 'feature_table' field
      - use virtio_has_feature() for extra sanity when checking feature bits
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c45a6816
    • H
      virtio: fix sparse return void-valued expression warnings · 597d56e4
      Harvey Harrison 提交于
      drivers/virtio/virtio_pci.c:148:2: warning: returning void-valued expression
      drivers/virtio/virtio_pci.c:155:2: warning: returning void-valued expression
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      597d56e4
  5. 31 3月, 2008 1 次提交
  6. 28 3月, 2008 1 次提交
  7. 17 3月, 2008 1 次提交
  8. 04 2月, 2008 2 次提交