Bug 799354

Summary: cpu 'host-model' should support features in force or disable mode
Product: [Community] Virtualization Tools Reporter: Cole Robinson <crobinso>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, dallan, pbonzini, pkrempa, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 870484 (view as bug list) Environment:
Last Closed: 2013-07-16 09:12:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 870484, 956468, 1059007    

Description Cole Robinson 2012-03-02 15:02:15 UTC
Would be handy to have <cpu mode='host-model'> support <feature policy='force'/> or policy=disable. That way tools have an option to turn on x2apic for kvm guests which provides a performance boost with no downsides, but doesn't require host CPU support.

Comment 1 Richard W.M. Jones 2012-10-25 18:05:16 UTC
Also <feature policy='disable'/>.  For one use case, see:
https://bugzilla.redhat.com/show_bug.cgi?id=870071#c2

Comment 4 Peter Krempa 2013-07-16 09:12:43 UTC
Fixed upstream with:

commit 3c8be55c04eb2647fd5c9d51efae78f7afdcec85
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 15 17:38:55 2013 +0200

    cpu: Allow fine tuning of "host-model" cpu
    
    https://bugzilla.redhat.com/show_bug.cgi?id=799354
    
    Until now, the "host-model" cpu mode couldn't be influenced. This patch
    allows to use the <feature> elements to either enable or disable
    specific CPU flags. This can be used to force flags that can be emulated
    even if the host CPU doesn't support them.

commit 13cdd389ed06e81277f208c269d825046cdbb4cb
Author: Peter Krempa <pkrempa>
Date:   Mon Jul 15 14:36:09 2013 +0200

    cpu: Add virCPUDefUpdateFeature()
    
    This new function updates or adds a feature to a existing cpu model
    definition. This function will be helpful to allow tuning of
    "host-model" features in later patches.

v1.1.0-193-g3c8be55