1. 13 7月, 2017 6 次提交
    • J
      qemu: Rename qemuProcessUpdateLiveGuestCPU · e6ed55e4
      Jiri Denemark 提交于
      In addition to updating a guest CPU definition the function verifies
      that all required features are provided to the guest. Let's make it
      obvious by calling it qemuProcessUpdateAndVerifyCPU.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      e6ed55e4
    • J
      qemu: Add qemuProcessVerifyCPU · 5cac2fe1
      Jiri Denemark 提交于
      Separated from qemuProcessUpdateLiveGuestCPU. The function makes sure
      a guest CPU provides all features required by a domain definition.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      5cac2fe1
    • J
      qemu: Add qemuProcessFetchGuestCPU · 40d246a2
      Jiri Denemark 提交于
      Separated from qemuProcessUpdateLiveGuestCPU. Its purpose is to fetch
      guest CPU data from a running QEMU process. The data can later be used
      to verify and update the active guest CPU definition.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      40d246a2
    • J
      cpu_x86: Properly disable unknown CPU features · 83e081b8
      Jiri Denemark 提交于
      CPU features unknown to a hypervisor will not be present in dataDisabled
      even though the features won't naturally be enabled because.
      Thus any features we asked for which are not in dataEnabled should be
      considered disabled.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      83e081b8
    • J
      qemu: Don't update CPU when checking ABI stability · ee68bb39
      Jiri Denemark 提交于
      When checking ABI stability between two domain definitions, we first
      make migratable copies of them. However, we also asked for the guest CPU
      to be updated, even though the updated CPU is supposed to be already
      included in the original definitions. Moreover, if we do this on the
      destination host during migration, we're potentially updating the
      definition with according to an incompatible host CPU.
      
      While updating the CPU when checking ABI stability doesn't make any
      sense, it actually just worked because updating the CPU doesn't do
      anything for custom CPUs (only host-model CPUs are affected) and we
      updated both definitions in the same way.
      
      Less then a year ago commit v2.3.0-rc1~42 stopped updating the CPU in
      the definition we got internally and only the user supplied definition
      was updated. However, the same commit started updating host-model CPUs
      to custom CPUs which are not affected by the request to update the CPU.
      So it still seemed to work right, unless a user upgraded libvirt 2.2.0
      to a newer version while there were some domains with host-model CPUs
      running on the host. Such domains couldn't be migrated with a user
      supplied XML since libvirt would complain:
      
          Target CPU mode custom does not match source host-model
      
      The fix is pretty straightforward, we just need to stop updating the CPU
      when checking ABI stability.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1463957Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      ee68bb39
    • J
      Avoid hidden cgroup mount points · dacd160d
      Juan Hernandez 提交于
      Currently the scan of the /proc/mounts file used to find cgroup mount
      points doesn't take into account that mount points may hidden by other
      mount points. For, example in certain Kubernetes environments the
      /proc/mounts contains the following lines:
      
        cgroup /sys/fs/cgroup/net_prio,net_cls cgroup ...
        tmpfs /sys/fs/cgroup tmpfs ...
        cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ...
      
      In this particular environment the first mount point is hidden by the
      second one. The correct mount point is the third one, but libvirt will
      never process it because it only checks the first mount point for each
      controller (net_cls in this case). So libvirt will try to use the first
      mount point, which doesn't actually exist, and the complete detection
      process will fail.
      
      To avoid that issue this patch changes the virCgroupDetectMountsFromFile
      function so that when there are duplicates it takes the information from
      the last line in /proc/mounts. This requires removing the previous
      explicit condition to skip duplicates, and adding code to free the
      memory used by the processing of duplicated lines.
      
      Related-To: https://bugzilla.redhat.com/1468214
      Related-To: https://github.com/kubevirt/libvirt/issues/4Signed-off-by: NJuan Hernandez <jhernand@redhat.com>
      dacd160d
  2. 12 7月, 2017 5 次提交
  3. 11 7月, 2017 29 次提交