Bug 722928

Summary: kernel does not build when CONFIG_XEN is not set
Product: Red Hat Enterprise Linux 6 Reporter: Xavier Bru <xavier.bru>
Component: kernelAssignee: Igor Mammedov <imammedo>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: drjones, kzhang, mrezanin, mzywusko, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-03 10:25:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 523117    
Attachments:
Description Flags
fix broken build if xen is disabled in config none

Description Xavier Bru 2011-07-18 14:00:05 UTC
Description of problem: 
compilation error with recent patch for BZ703055 

Version-Release number of selected component (if applicable):
2.6.32-131.6.1

How reproducible:
"CONFIG_XEN is not set" in configuration file

Steps to Reproduce:
1. rpmbuild -bb kernel.spec
2.
3.
  
Actual results:
arch/x86/kernel/cpu/common.c: In function 'filter_cpuid_features':
> arch/x86/kernel/cpu/common.c:306: error: implicit declaration of function
> 'xen_cpuid_base'

Expected results:
build OK

Additional info:

Compilation is OK with the following patch:
--- k/arch/x86/kernel/cpu/common.c~	2011-06-20 19:27:06.000000000 +0200
+++ k/arch/x86/kernel/cpu/common.c	2011-07-18 10:55:46.000000000 +0200
@@ -301,7 +301,7 @@ static void __cpuinit filter_cpuid_featu
 		       "CPU: CPU feature %s disabled, no CPUID level 0x%x\n",
 				x86_cap_flags[df->feature], df->level);
 	}
-
+#ifdef CONFIG_XEN
 	/* RHEL Xen HVM guests must filter additional features. BZ#703055 */
 	if (xen_cpuid_base() == 0)
 		return;
@@ -318,6 +318,7 @@ static void __cpuinit filter_cpuid_featu
 
 	clear_cpu_cap(c, X86_FEATURE_GBPAGES);
 	clear_cpu_cap(c, X86_FEATURE_RDTSCP);
+#endif /* CONFIG_XEN */
 }

Comment 3 Igor Mammedov 2011-08-17 12:47:30 UTC
Created attachment 518670 [details]
fix broken build if xen is disabled in config

Comment 9 Igor Mammedov 2011-11-03 10:25:29 UTC

*** This bug has been marked as a duplicate of bug 729488 ***