From: "Jan Beulich" Subject: [PATCH] x86: propagate disabled APIC state to Dom0 Date: Wed, 14 Jan 2009 10:19:16 +0000 Message-ID: <496DCA34.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This in particular eliminates the need to specify "noapic" to Dom0 when "noapic" is passed to Xen, provided the kernel side gets slightly modified to make use of this information (Linux side patch cannot easily be provided for the 2.6.18 tree, but this is being used by our 2.6.27-based one). Signed-off-by: Jan Beulich --- 2009-01-08.orig/xen/arch/x86/traps.c 2009-01-08 10:56:55.0000000= 00 +0100 +++ 2009-01-08/xen/arch/x86/traps.c 2009-01-09 09:42:42.000000000 = +0100 @@ -723,6 +723,8 @@ static void pv_cpuid(struct cpu_user_reg { /* Modify Feature Information. */ __clear_bit(X86_FEATURE_VME, &d); + if ( !cpu_has_apic ) + __clear_bit(X86_FEATURE_APIC, &d); if ( !opt_allow_hugepage ) __clear_bit(X86_FEATURE_PSE, &d); __clear_bit(X86_FEATURE_PGE, &d); @@ -755,6 +757,8 @@ static void pv_cpuid(struct cpu_user_reg __clear_bit(X86_FEATURE_XTPR % 32, &c); __clear_bit(X86_FEATURE_PDCM % 32, &c); __clear_bit(X86_FEATURE_DCA % 32, &c); + if ( !cpu_has_apic ) + __clear_bit(X86_FEATURE_X2APIC % 32, &c); __set_bit(X86_FEATURE_HYPERVISOR % 32, &c); break; case 0x80000001: @@ -773,6 +777,8 @@ static void pv_cpuid(struct cpu_user_reg __clear_bit(X86_FEATURE_RDTSCP % 32, &d); =20 __clear_bit(X86_FEATURE_SVME % 32, &c); + if ( !cpu_has_apic ) + __clear_bit(X86_FEATURE_EXTAPICSPACE % 32, &c); __clear_bit(X86_FEATURE_OSVW % 32, &c); __clear_bit(X86_FEATURE_IBS % 32, &c); __clear_bit(X86_FEATURE_SKINIT % 32, &c);