1. 12 7月, 2016 1 次提交
  2. 01 7月, 2016 1 次提交
  3. 19 5月, 2016 1 次提交
  4. 11 1月, 2016 1 次提交
  5. 07 7月, 2015 1 次提交
    • D
      spapr: Merge sPAPREnvironment into sPAPRMachineState · 28e02042
      David Gibson 提交于
      The code for -machine pseries maintains a global sPAPREnvironment structure
      which keeps track of general state information about the guest platform.
      This predates the existence of the MachineState structure, but performs
      basically the same function.
      
      Now that we have the generic MachineState, fold sPAPREnvironment into
      sPAPRMachineState, the pseries specific subclass of MachineState.
      
      This is mostly a matter of search and replace, although a few places which
      relied on the global spapr variable are changed to find the structure via
      qdev_get_machine().
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      28e02042
  6. 09 3月, 2015 2 次提交
  7. 29 7月, 2013 1 次提交
  8. 20 6月, 2013 3 次提交
  9. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  10. 19 12月, 2012 1 次提交
  11. 04 10月, 2012 2 次提交
    • D
      pseries: Rework implementation of TCE bypass · 53724ee5
      David Gibson 提交于
      On the pseries machine the IOMMU (aka TCE tables) is always active for all
      PCI and VIO devices.  Mostly to simplify the SLOF firmware, we implement an
      extension which allows the IOMMU to be temporarily disabled for certain
      devices.
      
      Currently this is implemented by setting the device's DMAContext pointer to
      NULL (thus reverting to qemu's default no-IOMMU DMA behaviour), then
      replacing it when bypass mode is disabled.
      
      This approach causes a bunch of complications though.  It complexifies the
      management of the DMAContext lifetimes, it's problematic for savevm/loadvm,
      and it means that while bypass is active we have nowhere to store the
      device's LIOBN (Logical IO Bus Number, used to identify DMA address
      spaces).  At present we regenerate the LIOBN from other address information
      but this restricts how we can allocate LIOBNs.
      
      This patch gives up on this approach, replacing it with the much simpler
      one of having a 'bypass' boolean flag in the TCE state structure.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      53724ee5
    • D
      pseries: Remove never used flags field from spapr vio devices · 490d4a2b
      David Gibson 提交于
      The general device state structure for PAPR VIO emulated devices includes a
      'flags' field which was never used.  This patch removes it.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      490d4a2b
  12. 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
  13. 28 6月, 2012 1 次提交
  14. 18 6月, 2012 1 次提交
  15. 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
  16. 16 4月, 2012 2 次提交
  17. 15 4月, 2012 2 次提交
  18. 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
  19. 28 1月, 2012 1 次提交
  20. 03 1月, 2012 2 次提交
  21. 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
  22. 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: 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
  23. 10 5月, 2011 1 次提交
    • D
      Place pseries vty devices at addresses more similar to existing machines · b4a78527
      David Gibson 提交于
      Currently the qemu pseries machine numbers its virtual serial devices
      from 0.  However, existing pSeries machines running pHyp number them from
      0x30000000.
      
      In theory these indices are arbitrary, since everything necessary for the
      kernel to find them is advertised in the device tree.  However the debian
      installer, at least, incorrectly looks for a device named vty@30... to
      determine whether to use the hypervisor console.
      
      Therefore this patch moves the numbers we use to match the existing pHyp
      practice, in order to workaround broken userspace apps of this type.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b4a78527
  24. 02 4月, 2011 8 次提交