From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: [PATCH 0 of 1] Intel VT-d fix. Date: Tue, 09 Mar 2010 12:04:00 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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, keir.fraser@eu.citrix.com Cc: konrad.wilk@oracle.com List-Id: xen-devel@lists.xenproject.org On a SuperMicro X8DTN+ I found Linux baremetal booting fine, while Xen would hang while enabling PCI-X devices, such as: (XEN) CPU 10 initiali[ 5.118255] scsi0 : 3ware Storage Controller [ 5.118898] 3w-xxxx: scsi0: Found a 3ware Storage Controller at 0xc100, IRQ: 52. (XEN) do_IRQ: 1.40 No irq handler for vector (irq -1) [ 25.711139] scsi 0:0:0:0: WARNING: Command (0x12) timed out, resetting card. [ 47.191274] scsi 0:0:0:0: WARNING: Command (0x0) timed out, resetting card. [ 58.671124] scsi 0:0:0:0: Device offlined - not ready after error recovery [ 79.711194] scsi 0:0:1:0: WARNING: Command (0x12) timed out, resetting card. [ 101.191071] scsi 0:0:1:0: WARNING: Command (0x0) timed out, resetting card. [ 112.671065] scsi 0:0:1:0: Device offlined - not ready after error recovery [ 133.710995] scsi 0:0:2:0: WARNING: Command (0x12) timed out, resetting card. [ 155.190891] scsi 0:0:2:0: WARNING: Command (0x0) timed out, resetting card. Traced it down the fact that I've three IOAPICs, but only one DRHD. The DRHD covers the first IOAPIC, but not the other two. Well, the PCI-X device was on the last IOAPIC, which was not under the DRHD control. Linux upstream has a check where it looks for all the IOAPICs covered by the DRHDs and compares them with the IOAPICs it found via MADT. If the count is off it disables x2APIC. This patch follows that logic.