From: "Jan Beulich" Subject: [PATCH] x86: remove BUG_ON() from QUIRK_IOAPIC_*_REGSEL handler Date: Tue, 07 Dec 2010 14:18:14 +0000 Message-ID: <4CFE50360200007800026696@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartAE831136.0__=" Return-path: 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 is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartAE831136.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Since (non-pvops, 32-bit only up to 2.6.27) Linux would report "BAD" unconditionally on all SiS chipset versions (it only looks for a PCI device at 0000:00:00.0 with SiS as the vendor), we must not crash if the report on a 64-bit hypervisor doesn't match the #define (which is zero). While we could honor the quirk indication even on 64-bit, it doesn't seem worthwhile, as there's no evidence that newer SiS chipsets (supporting 64-bit CPUs) are actually affected. This should also address bug 1687 (mis-reported, however, afaict). Signed-off-by: Jan Beulich --- 2010-11-09.orig/xen/arch/x86/platform_hypercall.c +++ 2010-11-09/xen/arch/x86/platform_hypercall.c @@ -199,7 +199,10 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe dprintk(XENLOG_INFO, "Domain 0 says that IO-APIC REGSEL is = %s\n", sis_apic_bug ? "bad" : "good"); #else - BUG_ON(sis_apic_bug !=3D (quirk_id =3D=3D QUIRK_IOAPIC_BAD_REG= SEL)); + if ( sis_apic_bug !=3D (quirk_id =3D=3D QUIRK_IOAPIC_BAD_REGSE= L) ) + dprintk(XENLOG_WARNING, + "Domain 0 thinks that IO-APIC REGSEL is %s\n", + sis_apic_bug ? "good" : "bad"); #endif break; default: --=__PartAE831136.0__= Content-Type: text/plain; name="x86-sis-apic-bug.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-sis-apic-bug.patch" Since (non-pvops, 32-bit only up to 2.6.27) Linux would report "BAD"=0Aunco= nditionally on all SiS chipset versions (it only looks for a PCI=0Adevice = at 0000:00:00.0 with SiS as the vendor), we must not crash if=0Athe report = on a 64-bit hypervisor doesn't match the #define (which is=0Azero).=0A=0AWh= ile we could honor the quirk indication even on 64-bit, it doesn't=0Aseem = worthwhile, as there's no evidence that newer SiS chipsets=0A(supporting = 64-bit CPUs) are actually affected.=0A=0AThis should also address bug 1687 = (mis-reported, however, afaict).=0A=0ASigned-off-by: Jan Beulich =0A=0A--- 2010-11-09.orig/xen/arch/x86/platform_hypercall.c=0A++= + 2010-11-09/xen/arch/x86/platform_hypercall.c=0A@@ -199,7 +199,10 @@ = ret_t do_platform_op(XEN_GUEST_HANDLE(xe=0A dprintk(XENLOG_INFO= , "Domain 0 says that IO-APIC REGSEL is %s\n",=0A = sis_apic_bug ? "bad" : "good");=0A #else=0A- BUG_ON(sis_apic_bug= !=3D (quirk_id =3D=3D QUIRK_IOAPIC_BAD_REGSEL));=0A+ if ( = sis_apic_bug !=3D (quirk_id =3D=3D QUIRK_IOAPIC_BAD_REGSEL) )=0A+ = dprintk(XENLOG_WARNING,=0A+ "Domain 0 thinks = that IO-APIC REGSEL is %s\n",=0A+ sis_apic_bug ? = "good" : "bad");=0A #endif=0A break;=0A default:=0A --=__PartAE831136.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartAE831136.0__=--