1. 07 1月, 2015 1 次提交
    • A
      PPC: e500 pci host: Add support for ATMUs · cb3778a0
      Alexander Graf 提交于
      The e500 PCI controller has configurable windows that allow a guest OS
      to selectively map parts of the PCI bus space to CPU address space and
      to selectively map parts of the CPU address space for DMA requests into
      PCI visible address ranges.
      
      So far, we've simply assumed that this mapping is 1:1 and ignored it.
      
      However, the PCICSRBAR (CCSR mapped in PCI bus space) always has to live
      inside the first 32bits of address space. This means if we always treat
      all mappings as 1:1, this map will collide with our RAM map from the CPU's
      point of view.
      
      So this patch adds proper ATMU support which allows us to keep the PCICSRBAR
      below 32bits local to the PCI bus and have another, different window to PCI
      BARs at the upper end of address space. We leverage this on e500plat though,
      mpc8544ds stays virtually 1:1 like it was before, but now also goes via ATMU.
      
      With this patch, I can run guests with lots of RAM and not coincidently access
      MSI-X mappings while I really want to access RAM.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      cb3778a0
  2. 16 6月, 2014 4 次提交
  3. 23 12月, 2013 1 次提交
    • M
      pci-host: Consistently set cannot_instantiate_with_device_add_yet · 08c58f92
      Markus Armbruster 提交于
      Many PCI host bridges consist of a sysbus device and a PCI device.
      You need both for the thing to work.  Arguably, these bridges should
      be modelled as a single, composite devices instead of pairs of
      seemingly independent devices you can only use together, but we're not
      there, yet.
      
      Since the sysbus part can't be instantiated with device_add, yet,
      permitting it with the PCI part is useless.  We shouldn't offer
      useless options to the user, so let's set
      cannot_instantiate_with_device_add_yet for them.
      
      It's already set for Bonito, Grackle, i440FX and Raven.  Document why.
      
      Set it for the others: dec-21154, e500-host-bridge, gt64120_pci, mch,
      pbm-pci, ppc4xx-host-bridge, sh_pci_host, u3-agp, uni-north-agp,
      uni-north-internal-pci, uni-north-pci, and versatile_pci_host.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      08c58f92
  4. 29 7月, 2013 1 次提交
  5. 04 7月, 2013 2 次提交
  6. 09 4月, 2013 3 次提交
  7. 27 3月, 2013 1 次提交
  8. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  9. 19 12月, 2012 2 次提交
  10. 17 12月, 2012 1 次提交
  11. 14 12月, 2012 5 次提交
    • A
      PPC: e500: pci: Export slot2irq calculation · 9e2c1298
      Alexander Graf 提交于
      We need the calculation method to get from a PCI slot ID to its respective
      interrupt line twice. Once in the internal map function and once when
      assembling the device tree.
      
      So let's extract the calculation to a separate function that can be called
      by both users.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9e2c1298
    • A
      PPC: E500: PCI: Make IRQ calculation more generic · 05f57d9d
      Alexander Graf 提交于
      The IRQ line calculation is more or less hardcoded today. Instead, let's
      write it as an algorithmic function that theoretically allows an arbitrary
      number of PCI slots.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      05f57d9d
    • A
      PPC: E500: PCI: Make first slot qdev settable · eafb325f
      Alexander Graf 提交于
      Today the first slot id in our e500 pci implementation is hardcoded to
      0x11. Keep it there as default, but allow users to change the default to
      a different id.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      eafb325f
    • A
      PPC: e500: Declare pci bridge as bridge · 99750506
      Alexander Graf 提交于
      The new PCI host bridge device needs to identify itself as PCI host bridge.
      Declare it as such.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      99750506
    • B
      Adding BAR0 for e500 PCI controller · 3eddc1be
      Bharat Bhushan 提交于
      PCI Root complex have TYPE-1 configuration header while PCI endpoint
      have type-0 configuration header. The type-1 configuration header have
      a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci
      address space to CCSR address space. This can used for 2 purposes: 1)
      for MSI interrupt generation 2) Allow CCSR registers access when configured
      as PCI endpoint, which I am not sure is a use case with QEMU-KVM guest.
      
      What I observed is that when guest read the size of BAR0 of host controller
      configuration header (TYPE1 header) then it always reads it as 0. When
      looking into the QEMU hw/ppce500_pci.c, I do not find the PCI controller
      device registering BAR0. I do not find any other controller also doing so
      may they do not use BAR0.
      
      There are two issues when BAR0 is not there (which I can think of):
      1) There should be BAR0 emulated for PCI Root complex (TYPE1 header) and
      when reading the size of BAR0, it should give size as per real h/w.
      
      2) Do we need this BAR0 inbound address translation?
              When BAR0 is of non-zero size then it will be configured for PCI
      address space to local address(CCSR) space translation on inbound access.
      The primary use case is for MSI interrupt generation. The device is
      configured with an address offsets in PCI address space, which will be
      translated to MSI interrupt generation MPIC registers. Currently I do
      not understand the MSI interrupt generation mechanism in QEMU and also
      IIRC we do not use QEMU MSI interrupt mechanism on e500 guest machines.
      But this BAR0 will be used when using MSI on e500.
      
      I can see one more issue, There are ATMUs emulated in hw/ppce500_pci.c,
      but i do not see these being used for address translation.
      So far that works because pci address space and local address space are 1:1
      mapped. BAR0 inbound translation + ATMU translation will complete the address
      translation of inbound traffic.
      Signed-off-by: NBharat Bhushan <bharat.bhushan@freescale.com>
      [agraf: fix double variable assignment w/o read]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      3eddc1be
  12. 29 10月, 2012 1 次提交
  13. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  14. 22 8月, 2012 4 次提交
  15. 15 2月, 2012 1 次提交
  16. 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
  17. 28 1月, 2012 2 次提交
  18. 20 12月, 2011 1 次提交
  19. 25 11月, 2011 1 次提交
  20. 31 10月, 2011 2 次提交
  21. 04 9月, 2011 1 次提交
  22. 26 8月, 2011 1 次提交
  23. 25 8月, 2011 1 次提交
  24. 22 8月, 2011 1 次提交