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. 16 4月, 2012 1 次提交
  3. 15 4月, 2012 2 次提交
  4. 15 3月, 2012 2 次提交
    • D
      pseries: Add support for level interrupts to XICS · d07fee7e
      David Gibson 提交于
      The pseries "xics" interrupt controller, like most interrupt
      controllers can support both message (i.e. edge sensitive) interrupts
      and level sensitive interrupts, but it needs to know which are which.
      
      When I implemented the xics emulation for qemu, the only devices we
      supported were the PAPR virtual IO devices.  These devices only use
      message interrupts, so they were the only ones I implemented in xics.
      
      Since then, however, we have added support for PCI devices, which use
      level sensitive interrupts.  It turns out the message interrupt logic
      still actually works most of the time for these, but there are
      circumstances where we can lost interrupts due to the incorrect
      interrupt logic.
      
      This patch, therefore, implements the correct xics level-sensitive
      interrupt logic.  The type of the interrupt is set when a device
      allocates a new xics interrupt.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d07fee7e
    • A
      ppc hw/: Don't use CPUState · e2684c0b
      Andreas Färber 提交于
      Scripted conversion:
        for file in hw/ppc*.[hc] hw/mpc8544_guts.c hw/spapr*.[hc] hw/virtex_ml507.c hw/xics.c; do
          sed -i "s/CPUState/CPUPPCState/g" $file
        done
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Acked-by: NAnthony Liguori <aliguori@us.ibm.com>
      e2684c0b
  5. 15 2月, 2012 1 次提交
  6. 04 2月, 2012 2 次提交
    • A
      qdev: kill off DeviceInfo · d307af79
      Anthony Liguori 提交于
      It is no longer used in the tree since everything is done natively through
      QEMU Object Model.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d307af79
    • 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
  7. 28 1月, 2012 3 次提交
  8. 03 1月, 2012 4 次提交
  9. 18 11月, 2011 2 次提交
  10. 31 10月, 2011 1 次提交
    • D
      pseries: Use Book3S-HV TCE acceleration capabilities · 0f5cb298
      David Gibson 提交于
      The pseries machine of qemu implements the TCE mechanism used as a
      virtual IOMMU for the PAPR defined virtual IO devices.  Because the
      PAPR spec only defines a small DMA address space, the guest VIO
      drivers need to update TCE mappings very frequently - the virtual
      network device is particularly bad.  This means many slow exits to
      qemu to emulate the H_PUT_TCE hypercall.
      
      Sufficiently recent kernels allow this to be mitigated by implementing
      H_PUT_TCE in the host kernel.  To make use of this, however, qemu
      needs to initialize the necessary TCE tables, and map them into itself
      so that the VIO device implementations can retrieve the mappings when
      they access guest memory (which is treated as a virtual DMA
      operation).
      
      This patch adds the necessary calls to use the KVM TCE acceleration.
      If the kernel does not support acceleration, or there is some other
      error creating the accelerated TCE table, then it will still fall back
      to full userspace TCE implementation.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      0f5cb298
  11. 29 10月, 2011 1 次提交
  12. 06 10月, 2011 3 次提交
    • D
      pseries: Refactor spapr irq allocation · e6c866d4
      David Gibson 提交于
      Paulo Bonzini changed the original spapr code, which manually assigned irq
      numbers for each virtual device, to allocate them automatically from the
      device initialization. That allowed spapr virtual devices to be constructed
      with -device, which is a good start.  However, the way that patch worked
      doesn't extend nicely for the future when we want to support devices other
      than sPAPR VIO devices (e.g. virtio and PCI).
      
      This patch rearranges the irq allocation to be global across the sPAPR
      environment, so it can be used by other bus types as well.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e6c866d4
    • P
      spapr: make irq customizable via qdev · 416343b1
      Paolo Bonzini 提交于
      This also lets the user see the irq in "info qtree".
      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>
      416343b1
    • 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
  13. 21 8月, 2011 1 次提交
  14. 02 4月, 2011 5 次提交