]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cpuUpdate() for updating guest CPU according to host CPU
authorJiri Denemark <jdenemar@redhat.com>
Tue, 23 Mar 2010 08:32:50 +0000 (09:32 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 26 Mar 2010 22:01:58 +0000 (23:01 +0100)
commit661ae104c2bc894733098a760f0a57cd7d7ca10e
tree2fdd199eea24093fda6e171cdbca1492b6591700
parent5982168290c9d75441abccbce100306c4e4535d6
cpuUpdate() for updating guest CPU according to host CPU

Useful mainly for migration. cpuUpdate changes guest CPU requirements in
the following way:

- match == "strict" || match == "exact"
    - optional features which are supported by host CPU are changed into
      required features
    - optional features which are not supported by host CPU are disabled
    - all other features remain untouched
- match == "minimum"
    - match is changed into "exact"
    - optional features and all features not mentioned in guest CPU
      specification which are supported by host CPU become required
      features
    - other optional features are disabled
    - all other features remain untouched

This ensures that no feature will suddenly disappear from the guest
after migration.
src/cpu/cpu.c
src/cpu/cpu.h
src/cpu/cpu_generic.c
src/cpu/cpu_x86.c
src/libvirt_private.syms