1. 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
  2. 15 4月, 2012 1 次提交
    • D
      pseries: Consolidate hack for RTAS display-character usage · 5f2e2ba2
      David Gibson 提交于
      Currently the pseries machine contains not one but two somewhat ugly hacks
      to allow printing of early debug messages before the guest has properly
      read the device tree.
      
      First, we special case H_PUT_TERM_CHAR so that a vtermno of 0 (usually
      invalid) will look for a suitable vty and use that.  This supports Linux's
      early debug code which will use H_PUT_TERM_CHAR with vtermno==0 before
      reading the device tree.  Second, we support the RTAS display-character call.
      This takes no vtermno so we assume the address of the default first VTY.
      
      This patch makes things more consistent by folding the second hack into the
      first.  Now, display-character uses the existing vty_lookup() function to
      do the same search for a suitable VTY.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      5f2e2ba2
  3. 15 3月, 2012 1 次提交
  4. 15 2月, 2012 1 次提交
  5. 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
  6. 28 1月, 2012 3 次提交
  7. 03 1月, 2012 3 次提交
  8. 18 11月, 2011 3 次提交
  9. 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
  10. 22 8月, 2011 1 次提交
  11. 02 4月, 2011 2 次提交