Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP2:Update
xen.12882
5b505fe5-VMX-fix-find-msr-build.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5b505fe5-VMX-fix-find-msr-build.patch of Package xen.12882
# Commit 97cb0516a322ecdf0032fa9d8aa1525c03d7772f # Date 2018-07-19 11:54:45 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> VMX: fix vmx_find_msr() build Older gcc at -O2 (and perhaps higher) does not recognize that apparently uninitialized variables aren't really uninitialized. Pull out the assignments used by two of the three case blocks and make them initializers of the variables, as I think I had suggested during review. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com> --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1362,7 +1362,8 @@ struct vmx_msr_entry *vmx_find_msr(const { const struct arch_vmx_struct *vmx = &v->arch.hvm_vmx; struct vmx_msr_entry *start = NULL, *ent, *end; - unsigned int substart, subend, total; + unsigned int substart = 0, subend = vmx->msr_save_count; + unsigned int total = vmx->msr_load_count; ASSERT(v == current || !vcpu_runnable(v)); @@ -1370,23 +1371,18 @@ struct vmx_msr_entry *vmx_find_msr(const { case VMX_MSR_HOST: start = vmx->host_msr_area; - substart = 0; subend = vmx->host_msr_count; total = subend; break; case VMX_MSR_GUEST: start = vmx->msr_area; - substart = 0; - subend = vmx->msr_save_count; - total = vmx->msr_load_count; break; case VMX_MSR_GUEST_LOADONLY: start = vmx->msr_area; - substart = vmx->msr_save_count; - subend = vmx->msr_load_count; - total = subend; + substart = subend; + subend = total; break; default:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor