Bug 1055002 - RFE: default to cpu host-model (when it's ready)
Summary: RFE: default to cpu host-model (when it's ready)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 1468016 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-17 22:51 UTC by Cole Robinson
Modified: 2018-10-04 18:46 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-04 18:46:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Cole Robinson 2014-01-17 22:51:10 UTC
Eventually I think we should default to cpu mode=host-model for new VMs, or at least provide the option. Upstream now has a 'default CPU' section in the preferences dialog, but it's only doing 'copy host cpu' and not host-model at the moment. Reason being, host-model implementation has known issues:

host-model doesn't match reality, can cause guest panics: https://bugzilla.redhat.com/show_bug.cgi?id=870071
host-model persistence: https://bugzilla.redhat.com/show_bug.cgi?id=1054935

RHEL bugs about the steps needed to get to a proper working order:

libvirt: host-model avx crash: https://bugzilla.redhat.com/show_bug.cgi?id=1014682
libvirt: query qemu: https://bugzilla.redhat.com/show_bug.cgi?id=824989
qemu: CPU probe interface: https://bugzilla.redhat.com/show_bug.cgi?id=824987
libvirt: use -cpu enforce: https://bugzilla.redhat.com/show_bug.cgi?id=822148

And some misc libvirt bugs that come into play for virt-manager:

cpu map API support: https://bugzilla.redhat.com/show_bug.cgi?id=916786
cpu model checking busted for tcg: https://bugzilla.redhat.com/show_bug.cgi?id=1002066


So basically, we need to wait for a lot of that to be solved before we can safely change the default.

Comment 1 Frank Ch. Eigler 2015-05-06 17:01:41 UTC
Would this be a good place to ask that virt-manager's preferences permit "host-passthrough" as a valid option for cpu-model?

Comment 2 Cole Robinson 2015-05-06 17:08:40 UTC
You can type 'host-passthrough' into the UI box and virt-manager will do the right thing. However host-passthrough has certain supportability issues with libvirt, so we don't expose it as a proper option in the UI

Comment 3 Pavel Valena 2016-11-22 17:48:31 UTC
Hello, what is the status on this?

Also, is 'host-passthrough' safe with libvirt now?

Comment 4 Cole Robinson 2017-07-10 23:47:47 UTC
*** Bug 1468016 has been marked as a duplicate of this bug. ***

Comment 5 Eduardo Habkost 2017-07-10 23:58:52 UTC
(In reply to Pavel Valena from comment #3)
> Hello, what is the status on this?
> 
> Also, is 'host-passthrough' safe with libvirt now?

(Replying 8 months later)

I consider host-passthrough/"-cpu host" safe today, but it will prevent live-migration.  If live-migration is not required, it is the best way to make of use all features supported by the host CPU + hypervisor.

"host-model" is now supposed to be safe (at least the bugs mentioned in comment #0 are all fixed now).

Comment 6 Pavel Valena 2017-07-11 22:09:22 UTC
Thanks for information!

Comment 7 Cole Robinson 2018-10-04 18:46:36 UTC
If libvirt/qemu combo is new enough, we use host-model as the default now:

commit 469fed08a04777d72cbb73e1dc948cffe31f7858
Author: Cole Robinson <crobinso>
Date:   Thu Oct 4 12:23:32 2018 -0400

    guest: Default to cpu mode=host-model if libvirt is new enough


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