1. 30 6月, 2016 1 次提交
  2. 29 8月, 2015 1 次提交
  3. 01 7月, 2015 9 次提交
  4. 30 6月, 2015 8 次提交
  5. 27 6月, 2015 3 次提交
    • J
      qemu: Resolve Coverity RESOURCE_LEAK · 782355a7
      John Ferlan 提交于
      Commit id '15fa84ac' added the alias fetch, but forgot to free it.
      782355a7
    • L
      qemu: always permit PCI devices to be manually assigned to a PCIe bus · 1e15be1b
      Laine Stump 提交于
      When support for the pcie-root and dmi-to-pci-bridge buses on a Q35
      machinetype was added, I was concerned that even though qemu at the
      time allowed plugging a PCI device into a PCIe port, that it might not
      be supported in the future. To prevent painful backtracking in the
      possible future where this happened, I disallowed such connections
      except in a few specific cases requested by qemu developers (indicated
      in the code with the flag VIR_PCI_CONNECT_TYPE_EITHER_IF_CONFIG).
      
      Now that a couple years have passed, there is a clear message from
      qemu that there is no danger in allowing PCI devices to be plugged
      into PCIe ports. This patch eliminates
      VIR_PCI_CONNECT_TYPE_EITHER_IF_CONFIG and changes the code to always
      allow PCI->PCIe or PCIe->PCI connection *when the PCI address is
      specified in the config. (For newly added devices that haven't yet
      been given a PCI address, the auto-placement still prefers using the
      correct type of bus).
      1e15be1b
    • L
      qemu: refactor qemuBuildControllerDevStr to eliminate future duplicate code · 1074fc50
      Laine Stump 提交于
      The PCI case of the switch statement in this function contains another
      switch statement with a case for each model. Currently every model
      except pci-root and pcie-root has a check for index > 0 (since only
      those two can have index==0), and the function should never be called
      for those two anyway. If we move the check for !pci[e]-root to the top
      of the pci case, then we can move the check for index > 0 out of the
      individual model cases. This will save repeating that check for the
      three new controller models about to be added.
      1074fc50
  6. 26 6月, 2015 7 次提交
    • P
      qemu: monitor: Remove qemuMonitorGetBlockExtent · 78aefb52
      Peter Krempa 提交于
      Now that qemuMonitorGetAllBlockStatsInfo collects also wr_highest_offset
      the whole function can be killed.
      78aefb52
    • P
      qemu: Refactor qemuDomainGetBlockInfo · 15fa84ac
      Peter Krempa 提交于
      Change the code so that it queries the monitor when the VM is alive.
      15fa84ac
    • P
      qemu: monitor: Open-code retrieval of wr_highest_offset · 0d130a01
      Peter Krempa 提交于
      Instead of using qemuMonitorJSONDevGetBlockExtent (which I plan to
      remove later) extract the data in place.
      
      Additionally add a flag that will be set when the wr_highest_offset was
      extracted correctly so that callers can act according to that.
      
      The test case addition should help make sure that everything works.
      0d130a01
    • P
    • P
      internal: Introduce virCheckNonEmptyStringArgGoto and reuse it · 14062e6f
      Peter Krempa 提交于
      The helper makes sure that strings passed to APIs are non-NULL and
      non-empty. This allows to drop some inlined checks where it does not
      make sense.
      14062e6f
    • M
      qemuBuildMemoryBackendStr: Honour passed @pagesize · 70d75ffc
      Michal Privoznik 提交于
      So far the argument has not much meaning and was practically ignored.
      This is not good since when doing memory hotplug, the size of desired
      hugepage backing is passed in that argument. Taking closer look at the
      tests I'm fixing reveals the bug. For instance, while the following is
      in the test:
      
          <memory model='dimm'>
            <source>
              <nodemask>1-3</nodemask>
              <pagesize unit='KiB'>4096</pagesize>
            </source>
            <target>
              <size unit='KiB'>524287</size>
              <node>0</node>
            </target>
            <address type='dimm' slot='0' base='0x100000000'/>
          </memory>
      
      the generated commandline corresponding to this XML was:
      
          -object memory-backend-ram,id=memdimm0,size=536870912,\
          host-nodes=1-3,policy=bind
      
      Have you noticed? Yes, memory-backend-ram! Nothing can be further away
      from the right answer. The hugepage backing is requested in the XML
      and we happily ignore it. This is just not right. It's
      memory-backend-file which should have been used:
      
          -object memory-backend-file,id=memdimm0,prealloc=yes,\
          mem-path=/dev/hugepages4M/libvirt/qemu,size=536870912,\
          host-nodes=1-3,policy=bind
      
      The problem is, that @pagesize passed to qemuBuildMemoryBackendStr
      (where this part of commandline is built) was ignored. The hugepage to
      back memory was searched only and only by NUMA nodes pinning. This
      works only for regular guest NUMA nodes.
      
      Then, I'm changing the hugepages size in the test XMLs too. This is
      simply because in the test suite we create dummy mount points just for
      2M and 1G hugepages. And in the test 4M was requested. I'm sticking to
      2M, but 1G should just work too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      70d75ffc
    • M
      qemuBuildMemoryBackendStr: Fix hugepages lookup process · f8e9deb1
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1196644
      
      This function constructs the backend (host facing) part of the
      memory device.  At the beginning, the configured hugepages are
      searched to find the best match for given guest NUMA node.
      Configured hugepages can have a @nodeset attribute to specify on
      which guest NUMA nodes should be the hugepages backing used.
      There is, however, one 'corner case'. Users may just tell 'use
      hugepages to back all the nodes'. In other words:
      
        <memoryBacking>
          <hugepages/>
        </memoryBacking>
      
        <cpu>
          <numa>
            <cell id='0' cpus='0-1' memory='1024000' unit='KiB'/>
          </numa>
        </cpu>
      
      Our code fails in this case. Well, since there's no @nodeset (nor
      any <page/> child element to <hugepages/>) we fail to lookup the
      default hugepage size to use.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f8e9deb1
  7. 25 6月, 2015 1 次提交
  8. 24 6月, 2015 3 次提交
  9. 23 6月, 2015 3 次提交
    • E
      Convert SCSI logical unit from unsigned int to unsigned long long · 22b8a617
      Eric Farman 提交于
      The SCSI Architecture Model defines a logical unit address
      as 64-bits in length, so change the field accordingly so
      that the entire value could be stored.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      22b8a617
    • E
      Print SCSI address attributes bus, target, unit as unsigned integer · 3b7983ad
      Eric Farman 提交于
      The address elements are all unsigned integers, so we should
      use the appropriate print directive when printing it.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      3b7983ad
    • E
      qemu: simplify json parsing · 40783db3
      Eric Blake 提交于
      Rather than grabbing an arbitrary JSON value and then checking
      if it has the right type, we might as well request the correct
      type to begin with.
      
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONIOProcessEvent)
      (qemuMonitorJSONCommandWithFd, qemuMonitorJSONHandleGraphics)
      (qemuMonitorJSONGetStatus, qemuMonitorJSONExtractCPUInfo)
      (qemuMonitorJSONGetVirtType, qemuMonitorJSONGetBalloonInfo)
      (qemuMonitorJSONGetMemoryStats)
      (qemuMonitorJSONDevGetBlockExtent)
      (qemuMonitorJSONGetOneBlockStatsInfo)
      (qemuMonitorJSONGetAllBlockStatsInfo)
      (qemuMonitorJSONBlockStatsUpdateCapacityOne)
      (qemuMonitorJSONBlockStatsUpdateCapacity)
      (qemuMonitorJSONGetBlockExtent)
      (qemuMonitorJSONGetMigrationStatusReply)
      (qemuMonitorJSONGetDumpGuestMemoryCapability)
      (qemuMonitorJSONAddFd, qemuMonitorJSONQueryRxFilterParse)
      (qemuMonitorJSONExtractChardevInfo)
      (qemuMonitorJSONDiskNameLookupOne)
      (qemuMonitorJSONDiskNameLookup)
      (qemuMonitorJSONGetAllBlockJobInfo)
      (qemuMonitorJSONBlockIoThrottleInfo, qemuMonitorJSONGetVersion)
      (qemuMonitorJSONGetMachines, qemuMonitorJSONGetCPUDefinitions)
      (qemuMonitorJSONGetCommands, qemuMonitorJSONGetEvents)
      (qemuMonitorJSONGetKVMState, qemuMonitorJSONGetObjectTypes)
      (qemuMonitorJSONGetObjectListPaths)
      (qemuMonitorJSONGetObjectProps, qemuMonitorJSONGetTargetArch)
      (qemuMonitorJSONGetMigrationCapabilities)
      (qemuMonitorJSONGetStringArray, qemuMonitorJSONAttachCharDev)
      (qemuMonitorJSONGetCPUx86Data, qemuMonitorJSONGetIOThreads)
      (qemuMonitorJSONGetMemoryDeviceInfo): Use shorter idioms.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      40783db3
  10. 22 6月, 2015 3 次提交
  11. 19 6月, 2015 1 次提交