[libvirt] [PATCH v3] Support for cpu64-rhel* qemu cpu models

Jiri Denemark jdenemar at redhat.com
Tue Feb 21 16:37:37 UTC 2012


On Mon, Jan 30, 2012 at 17:25:19 +0100, Martin Kletzander wrote:
> In qemu there are 2 cpu models (cpu64-rhel5 and cpu64-rhel6) not
> supported by libvirt. This patch adds the support with the flags
> specifications from /usr/share/qemu-kvm/cpu-model/cpu-x86_64.conf

Hmm, I didn't actually look at the model definitions until now... I haven't
checked them with qemu sources, but the definitions look weird.

> diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
> index 693caf1..8c9da42 100644
> --- a/src/cpu/cpu_map.xml
> +++ b/src/cpu/cpu_map.xml
> @@ -327,6 +327,72 @@
>        <feature name='svm'/>
>      </model>
> 
> +    <model name='cpu64-rhel5'>
> +      <vendor name='AMD'/>
> +      <feature name='3dnow'/>
> +      <feature name='3dnowext'/>
         ...
> +      <feature name='svm'/>
         ...
> +    </model>

Why are these virtual models marked as made by AMD and why do they contain
those AMD-only features? The vendor is probably not a big deal, libvirt will
just avoid using these models for describing a host CPU which is not made by
AMD. However, the AMD-only features make these models incompatible with any
Intel CPU. Thus the following guest CPU element

    <cpu match='exact'>
      <model>cpu64-rhel?</model>
      <feature name='3dnow' policy='disable'/>
      <feature name='3dnowext' policy='disable'/>
      <feature name='svm' policy='disable'/>
    </cpu>

will be needed to use this model on Intel host. Are these features in fact
emulated by qemu even if host CPU doesn't support them?

Jirka




More information about the libvir-list mailing list