1. 28 4月, 2017 6 次提交
    • W
      xlconfigtest: add tests for 'nestedhvm' support · 5ade0ff9
      Wim ten Have 提交于
      Testing various configuration schemas targeting postive and negative
      nestedhvm under libvirt <cpu mode="host-passthrough"> configuration.
      
      Mode "host-passthrough" generates nestedhvm=1 in/from xl format where
      
      Intel virtualization (VT-x):
      <feature policy='disable' name='vmx'/>
      
          or
      
      AMD virtualization (AMD-V):
      <feature policy='disable' name='svm'/>
      
      disables virtualization mode under guest domains.
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      5ade0ff9
    • W
      xenconfig: add conversions for xen-xl · 8659e7ff
      Wim ten Have 提交于
      Per xen-xl conversions from and to native under host-passthrough
      mode we take care for Xen (nestedhvm = mode) applied and inherited
      settings generating or processing correct feature policy:
      
      [On Intel (VT-x) architectures]
      <feature policy='disable' name='vmx'/>
      
      or
      
      [On AMD (AMD-V) architectures]
      <feature policy='disable' name='svm'/>
      
      It will then generate (or parse) for nestedhvm=1 in/from xl format.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      8659e7ff
    • W
      libxl: set nestedhvm for mode host-passthrough · c268b9ea
      Wim ten Have 提交于
      Xen feature nestedhvm is the option on Xen 4.4+ which enables
      nested virtualization when mode host-passthrough is applied.
      
      nested HVM is enabled by adding below on the target domain;
      <cpu mode='host-passthrough'/>
      
      Virtualization on target domain can be disabled by specifying
      such under feature policy rule on target name;
      
      [On Intel (VT-x) architecture]
      <feature policy='disable' name='vmx'/>
      
      or:
      
      [On AMD (AMD-V) architecture]
      <feature policy='disable' name='svm'/>
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      c268b9ea
    • 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
    • J
      Add support for CPU cache specification · a646a601
      Jiri Denemark 提交于
      This patch introduces
      
          <cache level='N' mode='emulate'/>
          <cache mode='passthrough'/>
          <cache mode='disable'/>
      
      sub element of /domain/cpu. Currently only a single <cache> element is
      allowed.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      a646a601
    • J
      conf: Rename mode parameter in virCPUDefParseXML · e841a411
      Jiri Denemark 提交于
      The type of this parameter is virCPUType so calling it 'mode' is pretty
      strange, 'type' is a much better name.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e841a411
  2. 27 4月, 2017 34 次提交