We should support passing -cpu host to a virtual machine. Use case : User wants maximum performance from a virtual machine and does not care about migration. This should be presented as an advanced CPU option and should block migration.
Really cool and makes sense for non-migratable VMs.
andrew - can we get detailed requirement (mainly ui mockup)?
Just filling-in some context, this is needed for cases where kvm will not expose all flags the the guest. So qemu allows exposing all host cpu flags to the guest by manually specifying 'host'. An example would be: qemu-kvm -cpu host <the rest of your options>
Andy, so far no response for the UI request. For now we assume a simple checkbox near the host cpu-pinning, to enable it. Please comment if this is not the case.
In order to check if / how / version where it works, take a look in the libvirt RFE: https://bugzilla.redhat.com/show_bug.cgi?id=700272#c18
(In reply to comment #5) > In order to check if / how / version where it works, take a look in the > libvirt RFE: > https://bugzilla.redhat.com/show_bug.cgi?id=700272#c18 Added https://bugzilla.redhat.com/show_bug.cgi?id=700272#c23 : Why isn't it adding +x2apic?
(In reply to comment #7) > (In reply to comment #5) > > In order to check if / how / version where it works, take a look in the > > libvirt RFE: > > https://bugzilla.redhat.com/show_bug.cgi?id=700272#c18 > > Added https://bugzilla.redhat.com/show_bug.cgi?id=700272#c23 : > Why isn't it adding +x2apic? Added https://bugzilla.redhat.com/show_bug.cgi?id=700272#c25: (In reply to comment #23 in bug ) > Why isn't it adding +x2apic? Yaniv, IIUC x2apic is a specific flag of the cpu, which may / may not be exposed by the host processor. So this will work even with host-passthrough if all hosts have the same processor capabilities. See also: http://www.linux-kvm.org/page/Tuning_KVM
I'd like to add one thing about the migration policy; there are cases where we do not care where the VM will start, as long as it will not migrate from that host. Currently in the UI there's no way to set this up (pin to any host), so in this case we'll also accept an option of checking the existing "Allow VM migration only upon Administrator specific request", and produce a warning if the cpu-host option is checked.
Merged: http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=5bd39f47dba4d1ac5187fb67538460d09dd21267
Merged fix for UI: http://gerrit.ovirt.org/#/c/10482/
(In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #5) > > > In order to check if / how / version where it works, take a look in the > > > libvirt RFE: > > > https://bugzilla.redhat.com/show_bug.cgi?id=700272#c18 > > > > Added https://bugzilla.redhat.com/show_bug.cgi?id=700272#c23 : > > Why isn't it adding +x2apic? > > Added https://bugzilla.redhat.com/show_bug.cgi?id=700272#c25: > > (In reply to comment #23 in bug ) > > Why isn't it adding +x2apic? > > Yaniv, IIUC x2apic is a specific flag of the cpu, which may / may not be > exposed by the host processor. So this will work even with host-passthrough > if all hosts have the same processor capabilities. > > See also: http://www.linux-kvm.org/page/Tuning_KVM doron - are you sure about this? iirc, x2apic is unrealted to host cpu, rather a feature of kvm (i.e., kvm virtualizes this flag to the guest)?
(In reply to comment #13) > > doron - are you sure about this? iirc, x2apic is unrealted to host cpu, > rather a feature of kvm (i.e., kvm virtualizes this flag to the guest)? Itamar, it was a misunderstanding coming from bad documentation. Indeed x2apic is kvm related and libvirt should decide if they wish to add it.
Combining -cpu host and x2apic will give the best CPU performance I'm just not sure how to specify x2apic with libvirt. You can do -cpu host,+x2apic but I'm not sure how to do that in libvirt.
Once libvirt supports x2apic with -cpu host, we'll re-evaluate to see if additional changes needed in vdsm (hopefully this will be libvirt internally only).
I'm assuming this will be exposed via the API/CLI/SDK as well (looking at documentation impact)?
(In reply to comment #17) > I'm assuming this will be exposed via the API/CLI/SDK as well (looking at > documentation impact)? Yes UI,cli and api.
It seems like this PRD did not make it into SF3/4.
Moving to modified as engine part is in. Waiting for bug 908420 to be merged.
OK - SF10.1 A VM with CPU mode of "host_passthrough" is running with '-cpu host'.
This bug is currently attached to errata RHEA-2013:14491. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag. Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information: * Cause: What actions or circumstances cause this bug to present. * Consequence: What happens when the bug presents. * Fix: What was done to fix the bug. * Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore') Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug. For further details on the Cause, Consequence, Fix, Result format please refer to: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks in advance.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0888.html