1. 15 5月, 2017 3 次提交
  2. 28 4月, 2017 2 次提交
    • P
      5237a74d
    • J
      qemu: Add support for guest CPU cache · df13c0b4
      Jiri Denemark 提交于
      This patch maps /domain/cpu/cache element into -cpu parameters:
      
      - <cache mode='passthrough'/> is translated to host-cache-info=on
      - <cache level='3' mode='emulate'/> is transformed into l3-cache=on
      - <cache mode='disable'/> is turned in host-cache-info=off,l3-cache=off
      
      Any other <cache> element is forbidden.
      
      The tricky part is detecting whether QEMU supports the CPU properties.
      
      The 'host-cache-info' property is introduced in v2.4.0-1389-ge265e3e480,
      earlier QEMU releases enabled host-cache-info by default and had no way
      to disable it. If the property is present, it defaults to 'off' for any
      QEMU until at least 2.9.0.
      
      The 'l3-cache' property was introduced later by v2.7.0-200-g14c985cffa.
      Earlier versions worked as if l3-cache=off was passed. For any QEMU
      until at least 2.9.0 l3-cache is 'off' by default.
      
      QEMU 2.9.0 was the first release which supports probing both properties
      by running device-list-properties with typename=host-x86_64-cpu. Older
      QEMU releases did not support device-list-properties command for CPU
      devices. Thus we can't really rely on probing them and we can just use
      query-cpu-model-expansion QMP command as a witness.
      
      Because the cache property probing is only reliable for QEMU >= 2.9.0
      when both are already supported for quite a few releases, we let QEMU
      report an error if a specific cache mode is explicitly requested. The
      other mode (or both if a user requested CPU cache to be disabled) is
      explicitly turned off for QEMU >= 2.9.0 to avoid any surprises in case
      the QEMU defaults change. Any older QEMU already turns them off so not
      doing so explicitly does not make any harm.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      df13c0b4
  3. 27 4月, 2017 1 次提交
  4. 30 3月, 2017 3 次提交
    • J
      qemu: Check non-migratable host CPU features · 385c1cc9
      Jiri Denemark 提交于
      CPU features which change their value from disabled to enabled between
      two calls to query-cpu-model-expansion (the first with no extra
      properties set and the second with 'migratable' property set to false)
      can be marked as enabled and non-migratable in qemuMonitorCPUModelInfo.
      
      Since the code consuming qemuMonitorCPUModelInfo currently ignores the
      migratable flag, this change is effectively changing the CPU model
      advertised in domain capabilities to contain all features (even those
      which block migration). And this matches what we do for QEMU older than
      2.9.0, when we detect all CPUID bits ourselves without asking QEMU.
      
      As a result of this change
      
          <cpu mode='host-model'>
            <feature name='invtsc' policy='require'/>
          </cpu>
      
      will work with all QEMU versions. Such CPU definition would be forbidden
      with QEMU >= 2.9.0 without this patch.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      385c1cc9
    • J
      qemu: Check migratable host CPU features · 91927c62
      Jiri Denemark 提交于
      If calling query-cpu-model-expansion on the 'host'/'max' CPU model with
      'migratable' property set to false succeeds, we know QEMU is able to
      tell us which features would disable migration. Thus we can mark all
      enabled features as migratable.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      91927c62
    • J
      qemuMonitorCPUModelInfo: Add support for non-migratable features · 03a6a0db
      Jiri Denemark 提交于
      QEMU is able to tell us whether a CPU feature would block migration or
      not. This patch adds support for storing such features in
      qemuMonitorCPUModelInfo.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      03a6a0db
  5. 27 3月, 2017 2 次提交
  6. 21 3月, 2017 1 次提交
  7. 17 3月, 2017 2 次提交
  8. 04 3月, 2017 6 次提交
  9. 03 3月, 2017 1 次提交
    • A
      qemu: Drop QEMU_CAPS_PCI_MULTIBUS · 5b783379
      Andrea Bolognani 提交于
      Due to the extra architecture-specific logic, it's already
      necessary for users to call virQEMUCapsHasPCIMultiBus(),
      so the capability itself is just a pointless distraction.
      5b783379
  10. 20 2月, 2017 2 次提交
  11. 07 12月, 2016 2 次提交
  12. 06 12月, 2016 1 次提交
  13. 28 11月, 2016 2 次提交
    • J
      qemu: Add support for unavailable-features · a1adfb0f
      Jiri Denemark 提交于
      QEMU 2.8.0 adds support for unavailable-features in
      query-cpu-definitions reply. The unavailable-features array lists CPU
      features which prevent a corresponding CPU model from being usable on
      current host. It can only be used when all the unavailable features are
      disabled. Empty array means the CPU model can be used without
      modifications.
      
      We can use unavailable-features for providing CPU model usability info
      in domain capabilities XML:
      
          <domainCapabilities>
            ...
            <cpu>
              <mode name='host-passthrough' supported='yes'/>
              <mode name='host-model' supported='yes'>
                <model fallback='allow'>Skylake-Client</model>
                ...
              </mode>
              <mode name='custom' supported='yes'>
                <model usable='yes'>qemu64</model>
                <model usable='yes'>qemu32</model>
                <model usable='no'>phenom</model>
                <model usable='yes'>pentium3</model>
                <model usable='yes'>pentium2</model>
                <model usable='yes'>pentium</model>
                <model usable='yes'>n270</model>
                <model usable='yes'>kvm64</model>
                <model usable='yes'>kvm32</model>
                <model usable='yes'>coreduo</model>
                <model usable='yes'>core2duo</model>
                <model usable='no'>athlon</model>
                <model usable='yes'>Westmere</model>
                <model usable='yes'>Skylake-Client</model>
                ...
              </mode>
            </cpu>
            ...
          </domainCapabilities>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      a1adfb0f
    • J
      tests: Add QEMU 2.8.0 capabilities data · 047e7dd9
      Jiri Denemark 提交于
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      047e7dd9
  14. 26 11月, 2016 2 次提交
  15. 25 11月, 2016 1 次提交
  16. 09 11月, 2016 2 次提交
  17. 02 11月, 2016 1 次提交
  18. 26 10月, 2016 1 次提交
  19. 12 10月, 2016 3 次提交
    • P
      qemu_capabilities: check for existence of virtio-vga · 6869428c
      Pavel Hrdina 提交于
      Commit 21373feb added support for primary virtio-vga device but it was
      checking for virtio-gpu.  Let's check for existence of virtio-vga if we
      want to use it.
      
      Virtio video device is currently represented by three different models
      *virtio-gpu-device*, *virtio-gpu-pci* and *virtio-vga*.  The first two
      models are tied together and if virtio video devices is compiled in they
      both exist.  However, the *virtio-vga* model doesn't have to exist on
      some architectures even if the first two models exist.  So we cannot
      group all three together.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      6869428c
    • P
      qemu_capabilities: mark QEMU_CAPS_VGA_QXL capability as deprecated · 05af6784
      Pavel Hrdina 提交于
      If QEMU in question supports QMP, this capability is set if
      QEMU_CAPS_DEVICE_QXL was set based on existence of "-device qxl". If
      libvirt needs to parse *help*, because there is no QMP support, it
      checks for existence of "-vga qxl", but it also parses output of
      "-device ?" and sets QEMU_CAPS_DEVICE_QXL too.
      
      Now that libvirt supports only QEMU that has "-device" implemented it's
      safe to drop this capability and stop using it.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      05af6784
    • P
      qemu_capabilities: join capabilities for qxl and qxl-vga devices · 34a4447b
      Pavel Hrdina 提交于
      This patch simplifies QEMU capabilities for QXL video device.  QEMU
      exposes this device as *qxl-vga* and *qxl* and they are both the same
      device with the same set of parameters, the only difference is that
      *qxl-vga* includes VGA compatibility.
      
      Based on QEMU code they are tied together so it's safe to check only for
      presence of only one of them.
      
      This patch also removes an invalid test case "video-qxl-sec-nodevice"
      where there is only *qxl-vga* device and *qxl* device is not present.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      34a4447b
  20. 20 9月, 2016 1 次提交
  21. 25 8月, 2016 1 次提交
    • P
      qemu: capabilities: Extract availability of new cpu hotplug for machine types · 920bbe5c
      Peter Krempa 提交于
      QEMU reports whether 'query-hotpluggable-cpus' is supported for a given
      machine type. Extract and cache the information using the capability
      cache.
      
      When copying the capabilities for a new start of qemu, mask out the
      presence of QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS if the machine type
      doesn't support hotpluggable cpus.
      920bbe5c