Description of problem:
Currently, if all feature flags of a vcpu model are supported by host, the model is shown by getVdsCaps, regardless of its make. This invites clients to run AMD guests on Intel or vice versa, which is not supported by RHEV3.0.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run vdsm on Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
AMD's Opteron_G1 is listed
Only Intel CPUs are listed.
Reported models are taken from libvirt's /usr/share/libvirt/cpu_map.xml, which also lists the vendor of each CPU.
Dan, please ack if we're going to solve for 6.3 or move flag to upstream/6.4
> Vdsm already has an acked bug for this issue
> Bug 737104 - disallow cross-vendor VM emulation
> (for 3.1, please raise urgency if you want it back-ported)
It seems required to me since we have already one customer w/ the issue
and assuming RHEV3.0 succeeds, we'll have plenty of others.
Agreed, Requesting for Z stream.
Currently vdsm uses compareCPU(<cpu match="minimum"><model>%s</model></cpu>)
How should we change the xml to take the model's vendor into account?
<cpu match="minimum"><model>%s</model></cpu> will match any compatible CPU regardless on its vendor. You need to explicitly mention <vendor> if you need only CPUs from that vendor to be compatible.
That is, <cpu match="minimum"><model>%s</model><vendor>Intel</vendor></cpu> will only be compatible with host running on a sufficiently capable CPU made by Intel. Similarly <cpu match="minimum"><model>%s</model><vendor>AMD</vendor></cpu> says host CPU is required to be made by AMD.
Note that you are allowed to ask for a combination that doesn't seem to make sense, for example <cpu match="minimum"><model>Penryn</model><vendor>AMD</vendor></cpu> means you want Penryn-compatible CPU made by AMD.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
VDSM did not previously take into account the 'make' of a host's CPU when retrieving its capabilities. This made it possible to run AMD guests on Intel hosts, and Intel guests on AMD hosts, with unpredictable results. VDSM has been updated to return the 'make' of the host's CPU to prevent this from occurring.
Tested on rhel 6.2 vdsm-4.9-112.9.el6_2.x86_64 and rhel6.3 vdsm-4.9.6-4.5.x86_64.
Only Intel CPUs are listed.
Moving to VERIFIED.
The bug is solved badly. It does not recognize most modern CPUs as Intel's.
(In reply to comment #12)
> The bug is solved badly. It does not recognize most modern CPUs as Intel's.
Can you give an example? Or better explain the expected results?
An Intel-based host should list only Intel CPUs as supported - and list all of them. The former silly patch did not recognize Westmere as an Intel CPU.
pushed upstream and included in build vdsm-4.9.6-17.0.