1. 26 11月, 2016 5 次提交
    • J
      qemu: Enable KVM when probing capabilities · 25ba9c31
      Jiri Denemark 提交于
      CPU related capabilities may differ depending on accelerator used when
      probing. Let's use KVM if available when probing QEMU and fall back to
      TCG. The created capabilities already contain all we need to distinguish
      whether KVM or TCG was used:
      
          - KVM was used when probing capabilities:
              QEMU_CAPS_KVM is set
              QEMU_CAPS_ENABLE_KVM is not set
      
          - TCG was used and QEMU supports KVM, but it failed (e.g., missing
            kernel module or wrong /dev/kvm permissions)
              QEMU_CAPS_KVM is not set
              QEMU_CAPS_ENABLE_KVM is set
      
          - KVM was not used and QEMU does not support it
              QEMU_CAPS_KVM is not set
              QEMU_CAPS_ENABLE_KVM is not set
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      25ba9c31
    • J
      qemucapsprobe: Ignore all greetings except the first one · 73078906
      Jiri Denemark 提交于
      When starting QEMU more than once during a single probing process,
      qemucapsprobe utility would save QMP greeting several times, which
      doesn't play well with our test monitor.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      73078906
    • J
      qemu: Probe KVM state earlier · 429a7b23
      Jiri Denemark 提交于
      Let's set QEMU_CAPS_KVM and QEMU_CAPS_ENABLE_KVM early so that the rest
      of the probing code can use these capabilities to handle KVM/TCG replies
      differently.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      429a7b23
    • J
      qemu: Use -machine when probing capabilities via QMP · e73447f6
      Jiri Denemark 提交于
      Using -machine instead of -M for QMP probing is safe because any QEMU
      binary which is capable of QMP probing supports -machine.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e73447f6
    • J
      qemu: Make QMP probing process reusable · 4c5d05ea
      Jiri Denemark 提交于
      The code that runs a new QEMU process to be used for probing
      capabilities is separated into four reusable functions so that any code
      that wants to probe a QEMU process may just follow a few simple steps:
      
          cmd = virQEMUCapsInitQMPCommandNew(...);
          virQEMUCapsInitQMPCommandRun(cmd);
      
          /* talk to the running QEMU process using its QMP monitor */
      
          if (reprobeIsRequired) {
              virQEMUCapsInitQMPCommandAbort(cmd, ...);
              virQEMUCapsInitQMPCommandRun(cmd);
      
              /* talk to the running QEMU process again */
          }
      
          virQEMUCapsInitQMPCommandFree(cmd);
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      4c5d05ea
  2. 25 11月, 2016 13 次提交
  3. 24 11月, 2016 9 次提交
  4. 23 11月, 2016 13 次提交