1. 02 2月, 2013 1 次提交
  2. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  3. 19 12月, 2012 1 次提交
    • P
      net: reorganize headers · 1422e32d
      Paolo Bonzini 提交于
      Move public headers to include/net, and leave private headers in net/.
      Put the virtio headers in include/net/tap.h, removing the multiple copies
      that existed.  Leave include/net/tap.h as the interface for NICs, and
      net/tap_int.h as the interface for OS-specific parts of the tap backend.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1422e32d
  4. 31 10月, 2012 1 次提交
  5. 16 8月, 2012 1 次提交
    • A
      pseries: Rework irq assignment to avoid carrying qemu_irqs around · a307d594
      Alexey Kardashevskiy 提交于
      Currently, the interfaces in the pseries machine code for assignment
      and setup of interrupts pass around qemu_irq objects.  That was done
      in an attempt not to be too closely linked to the specific XICS
      interrupt controller.  However interactions with the device tree setup
      made that attempt rather futile, and XICS is part of the PAPR spec
      anyway, so this really just meant we had to carry both the qemu_irq
      pointers and the XICS irq numbers around.
      
      This mess will just get worse when we add upcoming PCI MSI support,
      since that will require tracking a bunch more interrupt.  Therefore,
      this patch reworks the spapr code to just use XICS irq numbers
      (roughly equivalent to GSIs on x86) and only retrieve the qemu_irq
      pointers from the XICS code when we need them (a trivial lookup).
      
      This is a reworked and generalized version of an earlier spapr_pci
      specific patch from Alexey Kardashevskiy.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      [agraf: fix checkpath warning]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a307d594
  6. 01 8月, 2012 1 次提交
  7. 23 7月, 2012 1 次提交
  8. 28 6月, 2012 1 次提交
  9. 02 5月, 2012 1 次提交
    • D
      pseries: Implement automatic PAPR VIO address allocation · d601fac4
      David Gibson 提交于
      PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary,
      "address" used as a token to the hypercalls which manipulate them.
      
      Currently the pseries machine code does an ok job of allocating these
      addresses when the legacy -net nic / -serial and so forth options are used
      but will fail to allocate them properly when using -device.
      
      Specifically, you can use -device if all addresses are explicitly assigned.
      Without explicit assignment, only one VIO device of each type (network,
      console, SCSI) will be assigned properly, any further ones will attempt
      to take the same address leading to a fatal error.
      
      This patch fixes the situation by adding a proper address allocator to the
      VIO "bus" code.  This is used both by -device and the legacy options and
      default devices.  Addresses can still be explicitly assigned with -device
      options if desired.
      
      This patch changes the (guest visible) numbering of VIO devices, but since
      their addresses are discovered using the device tree and already differ
      from the numbering found on existing PowerVM systems, this does not break
      compatibility.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d601fac4
  10. 16 4月, 2012 1 次提交
  11. 15 4月, 2012 1 次提交
  12. 15 3月, 2012 1 次提交
  13. 15 2月, 2012 1 次提交
  14. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  15. 28 1月, 2012 3 次提交
  16. 03 1月, 2012 1 次提交
  17. 06 10月, 2011 2 次提交
    • P
      spapr: prepare for qdevification of irq · 77c7ea5e
      Paolo Bonzini 提交于
      Restructure common properties for sPAPR devices so that IRQ definitions
      can be added in one place.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      77c7ea5e
    • P
      spapr: proper qdevification · 277f9acf
      Paolo Bonzini 提交于
      Right now the spapr devices cannot be instantiated with -device,
      because the IRQs need to be passed to the spapr_*_create functions.
      Do this instead in the bus's init wrapper.
      
      This is particularly important with the conversion from scsi-disk
      to scsi-{cd,hd} that Markus made.  After his patches, if you
      specify a scsi-cd device attached to an if=none drive, the default
      VSCSI controller will not be created and, without qdevification,
      you will not be able to add yours.
      
      NOTE from agraf: added small compile fix
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      277f9acf
  18. 20 5月, 2011 1 次提交
  19. 07 4月, 2011 1 次提交
  20. 02 4月, 2011 1 次提交