1. 28 4月, 2017 9 次提交
    • P
      qemu: process: Clean up priv->migTLSAlias · 8c1fee5f
      Peter Krempa 提交于
      The alias would be leaked, since it's not freed on the vm stop path.
      8c1fee5f
    • P
      qemu: process: Don't leak priv->usbaddrs after VM restart · 3ab802d6
      Peter Krempa 提交于
      Since the private data structure is not freed upon stopping a VM, the
      usbaddrs pointer would be leaked:
      
      ==15388== 136 (16 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 893 of 1,019
      ==15388==    at 0x4C2CF55: calloc (vg_replace_malloc.c:711)
      ==15388==    by 0x54BF64A: virAlloc (viralloc.c:144)
      ==15388==    by 0x5547588: virDomainUSBAddressSetCreate (domain_addr.c:1608)
      ==15388==    by 0x144D38A2: qemuDomainAssignUSBAddresses (qemu_domain_address.c:2458)
      ==15388==    by 0x144D38A2: qemuDomainAssignAddresses (qemu_domain_address.c:2515)
      ==15388==    by 0x144ED1E3: qemuProcessPrepareDomain (qemu_process.c:5398)
      ==15388==    by 0x144F51FF: qemuProcessStart (qemu_process.c:5979)
      [...]
      3ab802d6
    • P
      qemu: process: Clean automatic NUMA/cpu pinning information on shutdown · 1730cdc6
      Peter Krempa 提交于
      Clean the stale data after shutting down the VM. Otherwise the data
      would be leaked on next VM start. This happens due to the fact that the
      private data object is not freed on destroy of the VM.
      1730cdc6
    • 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 31 次提交