[libvirt] [RFC] Support for CPUID masking

Matthias Bolte matthias.bolte at googlemail.com
Wed Sep 2 11:56:27 UTC 2009


2009/9/2 Jiri Denemark <jdenemar at redhat.com>:
> Hi,
>
> We need to provide support for CPU ID masking. Xen and VMware ESX are examples
> of current hypervisors which support such masking.

[...]

> <domain type='xen' id='42'>
>    ...
>    <features>
>        <pae/>
>        <acpi/>
>        <apic/>
>        <cpuid>
>            <mask level='1' register='ebx'>
>                xxxx:xxxx:0000:1010:xxxx:xxxx:xxxx:xxxx
>            </mask>
>            <mask level='1' register='ecx'>
>                xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx1x:xxxx
>            </mask>
>            <mask level='1' register='edx'>
>                xxx1:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
>            </mask>
>            <mask level='80000001' register='ecx'>
>                xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx1x
>            </mask>
>            <mask level='80000008' register='ecx'>
>                xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx00:1001
>            </mask>
>        </cpuid>
>    </features>
>    ...
> </domain>
>

I like the proposed mapping for the domain XML, because it's an 1:1
mapping of what VMware uses in the VI API [1] and the VMX config.
Beside that VMware has two more possible values for the CPUID bits: H
and R. Both are used to define how to handle/interpret those bits in
the context of VMotion (migration).

For example the domain XML snippet above maps to this VMX snippet:

cpuid.1.ebx = "XXXXXXXX00001010XXXXXXXXXXXXXXXX"
cpuid.1.ecx = "XXXXXXXXXXXXXXXXXXXXXXXXXX1XXXXX"
cpuid.1.edx = "XXX1XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
cpuid.80000001.ecx = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1X"
cpuid.80000008.ecx = "XXXXXXXXXXXXXXXXXXXXXXXXXX001001"

Matthias

[1] http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.CpuIdInfo.html




More information about the libvir-list mailing list