1. 10 7月, 2013 4 次提交
  2. 08 7月, 2013 13 次提交
    • A
      Merge remote-tracking branch 'mst/tags/for_anthony' into staging · dc11549e
      Anthony Liguori 提交于
      pci,misc enhancements
      
      This includes some pci enhancements:
      
      Better support for systems with multiple PCI root buses
      FW cfg interface for more robust pci programming in BIOS
      Minor fixes/cleanups for fw cfg and cross-version migration -
          because of dependencies with other patches
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Sun 07 Jul 2013 03:11:18 PM CDT using RSA key ID D28D5469
      # gpg: Can't check signature: public key not found
      
      # By David Gibson (10) and others
      # Via Michael S. Tsirkin
      * mst/tags/for_anthony:
        pci: Fold host_buses list into PCIHostState functionality
        pci: Remove domain from PCIHostBus
        pci: Simpler implementation of primary PCI bus
        pci: Add root bus parameter to pci_nic_init()
        pci: Add root bus argument to pci_get_bus_devfn()
        pci: Replace pci_find_domain() with more general pci_root_bus_path()
        pci: Use helper to find device's root bus in pci_find_domain()
        pci: Abolish pci_find_root_bus()
        pci: Move pci_read_devaddr to pci-hotplug-old.c
        pci: Cleanup configuration for pci-hotplug.c
        pvpanic: fix fwcfg for big endian hosts
        pvpanic: initialization cleanup
        MAINTAINERS: s/Marcelo/Paolo/
        e1000: cleanup process_tx_desc
        pc_piix: cleanup init compat handling
        pc: pass PCI hole ranges to Guests
        pci: store PCI hole ranges in guestinfo structure
        range: add Range structure
      
      Message-id: 1373228271-31223-1-git-send-email-mst@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      dc11549e
    • D
      pci: Fold host_buses list into PCIHostState functionality · 7588e2b0
      David Gibson 提交于
      The host_buses list is an odd structure - a list of pointers to PCI root
      buses existing in parallel to the normal qdev tree structure.  This patch
      removes it, instead putting the link pointers into the PCIHostState
      structure, which have a 1:1 relationship to PCIHostBus structures anyway.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      7588e2b0
    • D
      pci: Remove domain from PCIHostBus · 2b8cc89a
      David Gibson 提交于
      There are now no users of the domain field of PCIHostBus, so remove it
      from the structure, and as a parameter from the pci_host_bus_register()
      function which sets it.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2b8cc89a
    • D
      pci: Simpler implementation of primary PCI bus · 9bc47305
      David Gibson 提交于
      Currently pci_find_primary_bus() searches the list of root buses for one
      with domain 0.  But since host buses are always registered with domain 0,
      this just amounts to finding the only PCI host bus.  The only remaining
      users of pci_find_primary_bus() are in pci-hotplug-old.c, which implements
      the old style pci_add/pci_del commands.
      
      Therefore, this patch redefines pci_find_primary_bus() to find the only
      PCI root bus, returning an error if there are multiple roots.  The callers
      in pci-hotplug-old.c are updated correspondingly, to produce sensible
      error messages.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9bc47305
    • D
      pci: Add root bus parameter to pci_nic_init() · 29b358f9
      David Gibson 提交于
      At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
      only create a NIC under the primary PCI root.  As we add support for
      multiple PCI roots, that may no longer be the case.  This patch adds a root
      bus parameter to pci_nic_init() (and updates callers accordingly) to allow
      the machine init code using it to specify the right PCI root for NICs
      created by old-style -net nic parameters.  NICs created new-style, with
      -device can of course be put anywhere.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      29b358f9
    • D
      pci: Add root bus argument to pci_get_bus_devfn() · 85c6e4fa
      David Gibson 提交于
      pci_get_bus_devfn() interprets a full PCI address string to give a PCIBus *
      and device/function number within that bus.  Currently it assumes it is
      working on an address under the primary PCI root bus.  This patch extends
      it to allow the caller to specify a root bus.  This might seem a little odd
      since the supplied address can (theoretically) include a PCI domain number.
      However, attempting to use a non-zero domain number there is currently an
      error, so that shouldn't really cause problems.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      85c6e4fa
    • D
      pci: Replace pci_find_domain() with more general pci_root_bus_path() · 568f0690
      David Gibson 提交于
      pci_find_domain() is used in a number of places where we want an id for a
      whole PCI domain (i.e. the subtree under a PCI root bus).  The trouble is
      that many platforms may support multiple independent host bridges with no
      hardware supplied notion of domain number.
      
      This patch, therefore, replaces calls to pci_find_domain() with calls to
      a new pci_root_bus_path() returning a string.  The new call is implemented
      in terms of a new callback in the host bridge class, so it can be defined
      in some way that's well defined for the platform.  When no callback is
      available we fall back on the qbus name.
      
      Most current uses of pci_find_domain() are for error or informational
      messages, so the change in identifiers should be harmless.  The exception
      is pci_get_dev_path(), whose results form part of migration streams.  To
      maintain compatibility with old migration streams, the PIIX PCI host is
      altered to always supply "0000" for this path, which matches the old domain
      number (since the code didn't actually support domains other than 0).
      
      For the pseries (spapr) PCI bridge we use a different platform-unique
      identifier (pseries machines can routinely have dozens of PCI host
      bridges).  Theoretically that breaks migration streams, but given that we
      don't yet have migration support for pseries, it doesn't matter.
      
      Any other machines that have working migration support including PCI
      devices will need to be updated to maintain migration stream compatibility.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      568f0690
    • D
      pci: Use helper to find device's root bus in pci_find_domain() · c473d18d
      David Gibson 提交于
      Currently pci_find_domain() performs two functions - it locates the PCI
      root bus above the given bus, then looks up that root bus's domain number.
      This patch adds a helper function to perform the first task, finding the
      root bus for a given PCI device.  This is then used in pci_find_domain().
      This changes pci_find_domain()'s signature slightly, taking a PCIDevice
      instead of a PCIBus - since all callers passed something of the form
      dev->bus, this simplifies things slightly.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c473d18d
    • D
      pci: Abolish pci_find_root_bus() · 1ef7a2a2
      David Gibson 提交于
      pci_find_root_bus() takes a domain parameter.  Currently PCI root buses
      with domain other than 0 can't be created, so this is more or less a long
      winded way of retrieving the main PCI root bus.  Numbered domains don't
      actually properly cover the (non x86) possibilities for multiple PCI root
      buses, so this patch for now enforces the domain == 0 restriction in other
      places to replace pci_find_root_bus() with an explicit
      pci_find_primary_bus().
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1ef7a2a2
    • J
      MAINTAINERS: Add myself into MAINTAINERS file · 945dad6d
      Jia Liu 提交于
      Add myself into MAINTAINERS file, I'll looking at target-openrisc
      and hw/openrisc.
      Signed-off-by: NJia Liu <proljc@gmail.com>
      Message-id: 1372769717-852-1-git-send-email-proljc@gmail.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      945dad6d
    • P
      MAINTAINERS: fix bad F: patterns · 6e481d57
      Peter Maydell 提交于
      This patch fixes a number of incorrect F: patterns which didn't
      match any files in the source tree. This was caused by a mix
      of minor typos (- for _ and the like) and a few entries which
      hadn't been correctly updated following the rearrangement of hw/.
      
      Offending entries were located with the following shell rune:
      
       for pattern in $(sed -ne 's/^F: //p' MAINTAINERS); do
         if ! stat --printf='' $pattern 2>/dev/null; then
           echo bad pattern: $pattern
         fi
       done
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Acked-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
      Message-id: 1372070972-30776-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6e481d57
    • A
      Merge remote-tracking branch 'stefanha/block' into staging · 9b4abb46
      Anthony Liguori 提交于
      # By Fam Zheng (2) and Stefan Hajnoczi (1)
      # Via Stefan Hajnoczi
      * stefanha/block:
        block: fix bdrv_flush() ordering in bdrv_close()
        curl: refuse to open URL from HTTP server without range support
        vmdk: Implement .bdrv_has_zero_init
      
      Message-id: 1373023972-3587-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      9b4abb46
    • A
      Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging · c3ab4c9c
      Anthony Liguori 提交于
      # By Paolo Bonzini (50) and others
      # Via Paolo Bonzini
      * bonzini/iommu-for-anthony: (66 commits)
        exec: change some APIs to take AddressSpaceDispatch
        exec: remove cur_map
        exec: put memory map in AddressSpaceDispatch
        exec: separate current radix tree from the one being built
        exec: move listener from AddressSpaceDispatch to AddressSpace
        memory: move MemoryListener declaration earlier
        exec: separate current memory map from the one being built
        exec: change well-known physical sections to macros
        qom: Use atomics for object refcounting
        memory: add reference counting to FlatView
        memory: use a new FlatView pointer on every topology update
        memory: access FlatView from a local variable
        add a header file for atomic operations
        hw/[u-x]*: pass owner to memory_region_init* functions
        hw/t*: pass owner to memory_region_init* functions
        hw/s*: pass owner to memory_region_init* functions
        hw/p*: pass owner to memory_region_init* functions
        hw/n*: pass owner to memory_region_init* functions
        hw/m*: pass owner to memory_region_init* functions
        hw/i*: pass owner to memory_region_init* functions
        ...
      
      Message-id: 1372950842-32422-1-git-send-email-pbonzini@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c3ab4c9c
  3. 05 7月, 2013 3 次提交
    • S
      block: fix bdrv_flush() ordering in bdrv_close() · 58fda173
      Stefan Hajnoczi 提交于
      Since 80ccf93b we flush the block device during close.  The
      bdrv_drain_all() call should come before bdrv_flush() to ensure guest
      write requests have completed.  Otherwise we may miss pending writes
      when flushing.
      
      Call bdrv_drain_all() again for safety as the final step after
      bdrv_flush().  This should not be necessary but we can be paranoid here
      in case bdrv_flush() left I/O pending.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      58fda173
    • F
      curl: refuse to open URL from HTTP server without range support · 3494d650
      Fam Zheng 提交于
      CURL driver requests partial data from server on guest IO req. For HTTP
      and HTTPS, it uses "Range: ***" in requests, and this will not work if
      server not accepting range. This patch does this check when open.
      
       * Removed curl_size_cb, which is not used: On one hand it's registered to
         libcurl as CURLOPT_WRITEFUNCTION, instead of CURLOPT_HEADERFUNCTION,
         which will get called with *data*, not *header*. On the other hand the
         s->len is assigned unconditionally later.
      
         In this gone function, the sscanf for "Content-Length: %zd", on
         (void *)ptr, which is not guaranteed to be zero-terminated, is
         potentially a security bug. So this patch fixes it as a side-effect. The
         bug is reported as: https://bugs.launchpad.net/qemu/+bug/1188943
         (Note the bug is marked "private" so you might not be able to see it)
      
       * Introduced curl_header_cb, which is used to parse header and mark the
         server as accepting range if "Accept-Ranges: bytes" line is seen from
         response header. If protocol is HTTP or HTTPS, but server response has
         no not this support, refuse to open this URL.
      
      Note that python builtin module SimpleHTTPServer is an example of not
      supporting range, if you need to test this driver, get a better server
      or use internet URLs.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3494d650
    • F
      vmdk: Implement .bdrv_has_zero_init · da7a50f9
      Fam Zheng 提交于
      Depending on the subformat, has_zero_init queries underlying storage for
      flat extent. If it has a flat extent and its underlying storage doesn't
      have zero init, return 0. Otherwise return 1.
      
      Aligns the operator assignments.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      da7a50f9
  4. 04 7月, 2013 20 次提交