mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
Each driver supporting CPU selection must fill in host CPU capabilities. When filling them, drivers for hypervisors running on the same node as libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers, such as VMware, need to implement their own way of getting such data. Raw data can be decoded into virCPUDefPtr using cpuDecode() function. When implementing virConnectCompareCPU(), a hypervisor driver can just call cpuCompareXML() function with host CPU capabilities. For each guest for which a driver supports selecting CPU models, it must set the appropriate feature in guest's capabilities: virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0) Actions needed when a domain is being created depend on whether the hypervisor understands raw CPU data (currently CPUID for i686, x86_64 architectures) or symbolic names has to be used. Typical use by hypervisors which prefer CPUID (such as VMware and Xen): - convert guest CPU configuration from domain's XML into a set of raw data structures each representing one of the feature policies: cpuEncode(conn, architecture, guest_cpu_config, &forced_data, &required_data, &optional_data, &disabled_data, &forbidden_data) - create a mask or whatever the hypervisor expects to see and pass it to the hypervisor Typical use by hypervisors with symbolic model names (such as QEMU): - get raw CPU data for a computed guest CPU: cpuGuestData(conn, host_cpu, guest_cpu_config, &data) - decode raw data into virCPUDefPtr with a possible restriction on allowed model names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h * configure.in: check for CPUID instruction * src/Makefile.am: glue the new files in * src/libvirt_private.syms: add new private symbols * po/POTFILES.in: add new cpu files containing translatable strings |
||
---|---|---|
.. | ||
.gitignore | ||
af.po | ||
am.po | ||
ar.po | ||
as.po | ||
be.po | ||
bg.po | ||
bn_IN.po | ||
bn.po | ||
bs.po | ||
ca.po | ||
cs.po | ||
cy.po | ||
da.po | ||
de.po | ||
el.po | ||
en_GB.po | ||
es.po | ||
et.po | ||
eu_ES.po | ||
fa.po | ||
fi.po | ||
fr.po | ||
gl.po | ||
gu.po | ||
he.po | ||
hi.po | ||
hr.po | ||
hu.po | ||
hy.po | ||
id.po | ||
is.po | ||
it.po | ||
ja.po | ||
ka.po | ||
kn.po | ||
ko.po | ||
ku.po | ||
libvirt.pot | ||
lo.po | ||
lt.po | ||
lv.po | ||
Makevars | ||
mk.po | ||
ml.po | ||
mr.po | ||
ms.po | ||
my.po | ||
nb.po | ||
nl.po | ||
nn.po | ||
nso.po | ||
or.po | ||
pa.po | ||
pl.po | ||
POTFILES.in | ||
pt_BR.po | ||
pt.po | ||
ro.po | ||
ru.po | ||
si.po | ||
sk.po | ||
sl.po | ||
sq.po | ||
sr.po | ||
sr@latin.po | ||
sv.po | ||
ta.po | ||
te.po | ||
th.po | ||
tr.po | ||
uk.po | ||
ur.po | ||
vi.po | ||
zh_CN.po | ||
zh_TW.po | ||
zu.po |