1. 03 10月, 2014 1 次提交
    • C
      qemu: Don't compare CPU against host for TCG · 445a09bd
      Cole Robinson 提交于
      Right now when building the qemu command line, we try to do various
      unconditional validations of the guest CPU against the host CPU. However
      this checks are overly applied. The only time we should use the checks
      are:
      
      - The user requests host-model/host-passthrough, or
      
      - When KVM is requsted. CPU features requested in TCG mode are always
        emulated by qemu and are independent of the host CPU, so no host CPU
        checks should be performed.
      
      Right now if trying to specify a CPU for arm on an x86 host, it attempts
      to do non-sensical validation and falls over.
      
      Switch all the test cases that were intending to test CPU validation to
      use KVM, so they continue to test the intended code.
      
      Amend some aarch64 XML tests with a CPU model, to ensure things work
      correctly.
      445a09bd
  2. 27 9月, 2012 1 次提交
    • D
      Remove probing of CPU models when launching QEMU guests · ed769e18
      Daniel P. Berrange 提交于
      When launching a QEMU guest the binary is probed to discover
      the list of supported CPU names. Remove this probing with a
      simple lookup of CPU models in the qemuCapsPtr object. This
      avoids another invocation of the QEMU binary during the
      startup path.
      
      As a nice benefit we can now remove all the nasty hacks from
      the test suite which were done to avoid having to exec QEMU
      on the test system. The building of the -cpu command line
      can just rely on data we pre-populate in qemuCapsPtr.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ed769e18
  3. 09 5月, 2012 1 次提交
    • O
      numad: Always output 'placement' of <vcpu> · d70f2e11
      Osier Yang 提交于
      <vcpu> is not an optional node. The value for its 'placement'
      actually always defaults to 'static' in the underlying codes.
      (Even no 'cpuset' and 'placement' is specified, the domain
      process will be pinned to all the available pCPUs).
      d70f2e11
  4. 08 3月, 2012 1 次提交
    • E
      xml: output memory unit for clarity · 26545784
      Eric Blake 提交于
      Make it obvious to 'dumpxml' readers what unit we are using,
      since our default of KiB for memory (1024) differs from qemu's
      default of MiB; and differs from our use of bytes for storage.
      
      Tests were updated via:
      
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/"
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/"
      
      followed by a few fixes for the stragglers.
      
      Note that with this patch, the RNG for <memory> still forbids
      validation of anything except unit='KiB', since the code silently
      ignores the attribute; a later patch will expand <memory> to allow
      scaled input in the code and update the RNG to match.
      
      * docs/schemas/basictypes.rng (unit): Add 'bytes'.
      (scaledInteger): New define.
      * docs/schemas/storagevol.rng (sizing): Use it.
      * docs/schemas/storagepool.rng (sizing): Likewise.
      * docs/schemas/domaincommon.rng (memoryKBElement): New define; use
      for memory elements.
      * src/conf/storage_conf.c (virStoragePoolDefFormat)
      (virStorageVolDefFormat): Likewise.
      * src/conf/domain_conf.h (_virDomainDef): Document unit used
      internally.
      * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef):
      Likewise.
      * tests/*data/*.xml: Update all tests.
      * tests/*out/*.xml: Likewise.
      * tests/define-dev-segfault: Likewise.
      * tests/openvzutilstest.c (testReadNetworkConf): Likewise.
      * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
      26545784
  5. 17 1月, 2012 1 次提交
    • J
      cpu: Optionally forbid fallback CPU models · a6f88cbd
      Jiri Denemark 提交于
      In case a hypervisor doesn't support the exact CPU model requested by a
      domain XML, we automatically fallback to a closest CPU model the
      hypervisor supports (and make sure we add/remove any additional features
      if needed). This patch adds 'fallback' attribute to model element, which
      can be used to disable this automatic fallback.
      a6f88cbd
  6. 29 1月, 2011 1 次提交
    • M
      Add VIR_DIV_UP to divide memory or storage request sizes with round up · d9ad8ac3
      Matthias Bolte 提交于
      Use it in all places where a memory or storage request size is converted
      to a larger granularity. This avoids requesting too small memory or storage
      sizes that could result from the truncation done by a simple division.
      
      This extends the round up fix in 6002e040
      to the whole codebase.
      
      Instead of reporting errors for odd values in the VMX code round them up.
      
      Update the QEMU Argv tests accordingly as the original memory size 219200
      isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
      it to 219100 and 219136. Use two different values intentionally to make
      sure that rounding up works.
      
      Update virsh.pod accordingly, as rounding down and rejecting are replaced
      by rounding up.
      d9ad8ac3
  7. 02 12月, 2010 1 次提交