1. 12 3月, 2019 10 次提交
  2. 11 3月, 2019 6 次提交
  3. 08 3月, 2019 21 次提交
  4. 07 3月, 2019 3 次提交
    • V
      qemu: Fix query-cpus-fast target architecture detection · 696239ba
      Viktor Mihajlovski 提交于
      Since qemu 2.13 reports the target architecture in a property called
      'target' additionally to the property 'arch', that has been used in
      qemu 2.12 in the response data of 'query-cpus-fast'.
      Libvirts monitor code prefers the 'target' property over 'arch'.
      
      At least for s390(x), target is reported as 's390x' while arch is 's390'.
      In a later step a comparison is performed against 's390' which fails for
      qemu 2.13 and later.
      
      In consequence the architecture specific data for s390 won't be extracted
      from the returned data, leading to incorrect values being reported by
      virsh domstats --vcpu.
      
      Changing to check explicitly for 's390' and 's390x'.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.ibm.com>
      Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
      696239ba
    • M
      cpu: Don't access invalid memory in virCPUx86Translate · 62cb9c33
      Michal Privoznik 提交于
      Problem is that if there are no signatures for a CPU, then we
      still allocate cpu->signatures (even though with size 0). Later,
      we access cpu->signatures[0] if cpu->signatures is not NULL.
      
       Invalid read of size 4
          at 0x5F439D7: virCPUx86Translate (cpu_x86.c:2930)
          by 0x5F3C239: virCPUTranslate (cpu.c:927)
          by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870)
          ...
        Address 0xf752d40 is 0 bytes after a block of size 0 alloc'd
          at 0x4C30EC6: calloc (vg_replace_malloc.c:711)
          by 0x5DBDE4E: virAllocN (viralloc.c:190)
          by 0x5F3E4FA: x86ModelCopySignatures (cpu_x86.c:990)
          by 0x5F3E60F: x86ModelCopy (cpu_x86.c:1008)
          by 0x5F3E7CB: x86ModelFromCPU (cpu_x86.c:1068)
          by 0x5F4397E: virCPUx86Translate (cpu_x86.c:2922)
          by 0x5F3C239: virCPUTranslate (cpu.c:927)
          by 0x57CE7A1: qemuProcessUpdateGuestCPU (qemu_process.c:5870)
          ...
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      62cb9c33
    • D
      qemu_domain: add a PPC64 memLockLimit helper · 7a686fd2
      Daniel Henrique Barboza 提交于
      There is a lot of documentation in the comments about how PPC64 handles
      passthrough VFIO devices to calculate the @memLockLimit. And more will
      be added with the PPC64 NVLink2 support code.
      
      Let's remove the PPC64 code from qemuDomainGetMemLockLimitBytes()
      body and put it into a helper function. This will simplify the
      flow of qemuDomainGetMemLockLimitBytes() that handles all the other
      platforms and improves readability of the PPC64 specifics.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      7a686fd2