From: ddugger@redhat.com <ddugger@redhat.com> Date: Tue, 21 Apr 2009 13:01:40 -0600 Subject: [xen] clear X86_FEATURE_APIC in cpuid when apic disabled Message-id: 200904211901.n3LJ1euO028414@sobek.n0ano.com O-Subject: [RHEL5.4 PATCH 6/6 V2] BZ496873: xen: clear X86_FEATURE_APIC in dom0 cpuid when apic disabled Bugzilla: 496873 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com> RH-Acked-by: Justin M. Forbes <jforbes@redhat.com> Backport that part of the Xen changeset that clears the feature bit when the APIC is disabled. Upstream Status: accepted (CS 19039) Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Gerd Hoffman <kraxel@redhat.com> Signed-off-by: Don Dugger <donald.d.dugger@intel.com> Yet Another Resend - resolve the conflicting BZs between the Subject line (correct) and the message body (incorrect). diff --git a/arch/x86/traps.c b/arch/x86/traps.c index 5de70ee..bc67f70 100644 --- a/arch/x86/traps.c +++ b/arch/x86/traps.c @@ -608,6 +608,8 @@ static int emulate_forced_invalid_op(struct cpu_user_regs *regs) { /* Modify Feature Information. */ clear_bit(X86_FEATURE_VME, &d); + if ( !cpu_has_apic ) + clear_bit(X86_FEATURE_APIC, &d); clear_bit(X86_FEATURE_DE, &d); clear_bit(X86_FEATURE_PSE, &d); clear_bit(X86_FEATURE_PGE, &d);