Bug 1336517

Summary: Disable hv-vpindex, hv-runtime, hv-reset, hv-synic & hv-stimer enlightenment for Windows
Product: Red Hat Enterprise Linux 7 Reporter: Amnon Ilan <ailan>
Component: qemu-kvm-rhevAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED ERRATA QA Contact: huiqingding <huding>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: chayang, ehabkost, huding, jen, jinzhao, juzhang, pbonzini, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.6.0-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 21:09:20 UTC Type: Bug
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: 1624786    

Description Amnon Ilan 2016-05-16 17:13:42 UTC
Make sure the following new Windows enlightenments are disabled in RHEL:
"hv-vpindex", "hv-runtime", "hv-synic" & "hv-stimer".

The reasoning for that:

"hv-vpindex" Specifies the virtual processor’s index. Seems to be pretty
useless. Could not find any references to this MSR in Win8-64 hal and kernel modules.  

"hv-runtime" Specifies the virtual processor’s run time.
Just like with the previous MSR, could not find any Win8-64
hal or kernel function which uses this MSR.
 
"hv-synic" & "hv-stimer" (both should be used together) used for activating
synthetic timer. Win8 is using this feature in periodic mode, but these 
requires further performance benchmarking in order to decide whether it 
should be in RHEL or not. For now it should be disabled (may add another bz 
if we decide we want it in 7.4).

Comment 3 Amnon Ilan 2016-05-26 07:42:19 UTC
Based on the "hv-reset" evaluation, we decided to disable this 
enlightenment as well. Please add it to the list.

Comment 5 Jeff Nelson 2016-05-26 14:21:52 UTC
Because these statements exist in the code today:

    DEFINE_PROP_BOOL("hv-vpindex", X86CPU, hyperv_vpindex, false),
    DEFINE_PROP_BOOL("hv-runtime", X86CPU, hyperv_runtime, false),
    DEFINE_PROP_BOOL("hv-synic", X86CPU, hyperv_synic, false),
    DEFINE_PROP_BOOL("hv-stimer", X86CPU, hyperv_stimer, false),

    DEFINE_PROP_BOOL("hv-reset", X86CPU, hyperv_reset, false)

...the enlightenments are present but "disabled." They could be enabled if someone wanted to turn them on.

But in an email thread discussing this topic, Paolo has called for them to be deleted. To me, that means deleting the enlightenment field from the X86CPU structure. 

So what is the actual development action for this BZ? Is leaving it present but disabled good enough?

Comment 6 Paolo Bonzini 2016-05-27 13:36:18 UTC
I would just add an #if 0 around the property definitions, so that they cannot be enabled through libvirt.

Comment 7 Miroslav Rezanina 2016-05-27 17:21:35 UTC
(In reply to Paolo Bonzini from comment #6)
> I would just add an #if 0 around the property definitions, so that they
> cannot be enabled through libvirt.

Ok...this can be done.

Comment 8 Miroslav Rezanina 2016-06-21 07:03:45 UTC
Fix included in qemu-kvm-rhev-2.6.0-8.el7

Comment 10 huiqingding 2016-07-12 06:34:08 UTC
Verify this bug using the following version:
qemu-kvm-rhev-2.6.0-12.el7

Step1: Download qemu-kvm-rhev-2.6.0-12.el7.src.rpm from brewweb
Step2: Check hv-vpindex, hv-runtime, hv-reset, hv-synic & hv-stimer is disabled.
# rpm -ivh qemu-kvm-rhev-2.6.0-12.el7.src.rpm
# cd /root/rpmbuild/SPECS/
# rpmbuild -bp qemu-kvm.spec
# cd /root/rpmbuild/BUILD
# cd qemu-2.6.0/
# cat vim target-i386/cpu.c

Actual result:
hv-vpindex, hv-runtime, hv-reset, hv-synic & hv-stimer is disabled as following:

#if 0 /* Disabled for Red Hat Enterprise Linux */
    DEFINE_PROP_BOOL("hv-reset", X86CPU, hyperv_reset, false),
    DEFINE_PROP_BOOL("hv-vpindex", X86CPU, hyperv_vpindex, false),
    DEFINE_PROP_BOOL("hv-runtime", X86CPU, hyperv_runtime, false),
    DEFINE_PROP_BOOL("hv-synic", X86CPU, hyperv_synic, false),
    DEFINE_PROP_BOOL("hv-stimer", X86CPU, hyperv_stimer, false),
#endif

Comment 12 errata-xmlrpc 2016-11-07 21:09:20 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.

https://rhn.redhat.com/errata/RHBA-2016-2673.html