Bug 838469 (cpu_host) - PRD32 - [RFE] Support cpu -host (passthrough) for virtual machines
Summary: PRD32 - [RFE] Support cpu -host (passthrough) for virtual machines
Keywords:
Status: CLOSED ERRATA
Alias: cpu_host
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: RFEs
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Laszlo Hornyak
QA Contact: Ido Begun
URL: http://wiki.ovirt.org/wiki/Features/C...
Whiteboard: sla
Depends On: 891729 908420
Blocks: 915537
TreeView+ depends on / blocked
 
Reported: 2012-07-09 08:11 UTC by Andrew Cathrow
Modified: 2016-02-10 20:19 UTC (History)
12 users (show)

Fixed In Version: sf7
Doc Type: Enhancement
Doc Text:
Support has been added for host CPU passthrough on virtual machines, which allows virtual machines to see and utilize the host's CPU flags. This enables better performance in virtual machines, but it prevents the virtual machine from being migrated to other hosts.
Clone Of:
: 891729 (view as bug list)
Environment:
Last Closed: 2013-06-10 21:05:44 UTC
oVirt Team: SLA
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0888 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Virtualization Manager 3.2 update 2013-06-11 00:55:41 UTC

Description Andrew Cathrow 2012-07-09 08:11:45 UTC
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.

Comment 1 Yaniv Kaul 2012-09-13 07:15:45 UTC
Really cool and makes sense for non-migratable VMs.

Comment 2 Itamar Heim 2012-09-16 14:06:37 UTC
andrew - can we get detailed requirement (mainly ui mockup)?

Comment 3 Doron Fediuck 2012-11-15 16:06:01 UTC
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>

Comment 4 Doron Fediuck 2012-11-19 08:37:12 UTC
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.

Comment 5 Doron Fediuck 2012-11-19 08:46:52 UTC
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

Comment 7 Yaniv Kaul 2012-12-04 14:58:10 UTC
(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?

Comment 8 Doron Fediuck 2012-12-04 17:52:12 UTC
(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

Comment 10 Doron Fediuck 2012-12-16 16:35:17 UTC
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.

Comment 12 ofri 2012-12-31 12:02:39 UTC
Merged fix for UI: http://gerrit.ovirt.org/#/c/10482/

Comment 13 Itamar Heim 2012-12-31 14:12:14 UTC
(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)?

Comment 14 Doron Fediuck 2012-12-31 14:17:20 UTC
(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.

Comment 15 Andrew Cathrow 2012-12-31 14:30:14 UTC
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.

Comment 16 Doron Fediuck 2013-01-01 09:46:44 UTC
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).

Comment 17 Stephen Gordon 2013-01-03 19:40:47 UTC
I'm assuming this will be exposed via the API/CLI/SDK as well (looking at documentation impact)?

Comment 18 Andrew Cathrow 2013-01-03 19:48:43 UTC
(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.

Comment 19 Ido Begun 2013-01-28 15:17:42 UTC
It seems like this PRD did not make it into SF3/4.

Comment 22 Doron Fediuck 2013-02-11 17:07:34 UTC
Moving to modified as engine part is in.
Waiting for bug 908420 to be merged.

Comment 23 Ido Begun 2013-03-21 06:30:15 UTC
OK - SF10.1

A VM with CPU mode of "host_passthrough" is running with '-cpu host'.

Comment 24 Cheryn Tan 2013-04-03 06:53:27 UTC
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.

Comment 27 errata-xmlrpc 2013-06-10 21:05:44 UTC
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


Note You need to log in before you can comment on or make changes to this bug.