From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: pv_ops dom0 kernel failure with ata_piix / irq problems Date: Sun, 25 Jan 2009 02:51:01 +0200 Message-ID: <20090125005101.GU15052@edu.joroinen.fi> References: <20090102064444.GN15052@edu.joroinen.fi> <20090109174006.GR15052@edu.joroinen.fi> <20090122194645.GJ15052@edu.joroinen.fi> <4978D5BE.8090601@goop.org> <20090124140930.GP15052@edu.joroinen.fi> <20090124145844.GQ15052@edu.joroinen.fi> <497B64B8.5040709@goop.org> <20090124201702.GR15052@edu.joroinen.fi> <20090124234920.GS15052@edu.joroinen.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20090124234920.GS15052@edu.joroinen.fi> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Todd Deshane , Andrew Lyon , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Sun, Jan 25, 2009 at 01:49:20AM +0200, Pasi K=E4rkk=E4inen wrote: > On Sat, Jan 24, 2009 at 10:17:02PM +0200, Pasi K=E4rkk=E4inen wrote: > > On Sat, Jan 24, 2009 at 10:58:00AM -0800, Jeremy Fitzhardinge wrote: > > > Pasi K=E4rkk=E4inen wrote: > > > >On Sat, Jan 24, 2009 at 04:09:30PM +0200, Pasi K=E4rkk=E4inen wrot= e: > > > > =20 > > > >>On Thu, Jan 22, 2009 at 12:23:26PM -0800, Jeremy Fitzhardinge wro= te: > > > >> =20 > > > >>>Pasi K=E4rkk=E4inen wrote: > > > >>> =20 > > > >>>>On Fri, Jan 09, 2009 at 09:01:59PM +0000, Andrew Lyon wrote: > > > >>>>=20 > > > >>>> =20 > > > >>>>>>I just upgraded to newly released Xen 3.3.1 hypervisor but=20 > > > >>>>>>unfortunately it > > > >>>>>>didn't seem to help with my problem.. I still get the exact s= ame=20 > > > >>>>>>errors with > > > >>>>>>ata_piix module: > > > >>>>>> > > > >>>>>>http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-bo= otlog-4-xen331.txt > > > >>>>>> > > > >>>>>>xen_allocate_pirq: returning irq 30 for gsi 18 > > > >>>>>>xen_set_ioapic_routing: irq 30 gsi 18 vector 160 ioapic 0 pin= 18=20 > > > >>>>>>triggering 0 polarity 1 > > > >>>>>>ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IR= Q 30 > > > >>>>>>xen: PCI device 0000:00:1f.1 pin 1 -> irq 30 > > > >>>>>>xen: disable pci device 0000:00:1f.1 > > > >>>>>>ata_piix: probe of 0000:00:1f.1 failed with error -38 > > > >>>>>> =20 > > > >>>>>> =20 > > > >>>>>I don't think the problem is ata_piix, I've tried the pv_ops d= om0 > > > >>>>>kernel on a Dell Optiplex 755 and unbranded system with gigaby= te > > > >>>>>motherboard, on both systems none of the storage devices worke= d, > > > >>>>>including ahci, ata_piix, I even tried putting the root filesy= stem on > > > >>>>>a usb storage device but that too is broken, I think interrupt= routing > > > >>>>>is not working at all perhaps? > > > >>>>> > > > >>>>>I'm going to do more testing this weekend... > > > >>>>> > > > >>>>> =20 > > > >>>>> =20 > > > >>>>Hello. > > > >>>> > > > >>>>I just did some more testing too.. > > > >>>> > > > >>>>I upgraded to the latest patches for Linux 2.6.29-rc1-tip > > > >>>> > > > >>>>log of xen+kernel from serial console: > > > >>>>http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-boot= log-5-xen331-linux-2.6.29-rc1.txt > > > >>>> > > > >>>>(XEN) Command line: dom0_mem=3D1024M loglvl=3Dall guest_loglvl=3D= all=20 > > > >>>>com1=3D19200,8n1 console=3Dcom1 > > > >>>>Kernel command line: ro root=3D/dev/vg00/lv01 console=3Dhvc0=20 > > > >>>>earlyprintk=3Dxen pci=3Dnomsi > > > >>>> > > > >>>>And the failing part of the log is here: > > > >>>> > > > >>>>xen_allocate_pirq: returning irq 30 for gsi 18 > > > >>>>xen_set_ioapic_routing: irq 30 gsi 18 vector 160 ioapic 0 pin 1= 8=20 > > > >>>>triggering 0 polarity 1 > > > >>>>ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ = 30 > > > >>>>xen: PCI device 0000:00:1f.1 pin 1 -> irq 30 > > > >>>>xen: disable pci device 0000:00:1f.1 > > > >>>>Pid: 1, comm: swapper Not tainted 2.6.29-rc1-tip #3 > > > >>>>=20 > > > >>>> =20 > > > >>>That means that the ata-piix driver decided it was unhappy for s= ome=20 > > > >>>reason, and decided to fali with ENODEV. It would be very inter= esting=20 > > > >>>to know what part of the device probe failed. From the Xen pers= pective,=20 > > > >>>it looks like everything went OK. > > > >>> > > > >>> =20 > > > >>I just did > > > >> > > > >>#define ATA_DEBUG > > > >>#define ATA_VERBOSE_DEBUG > > > >>#define ATA_IRQ_TRAP > > > >> > > > >>in include/linux/libata.h > > > >> > > > >>and recompiling now.. let's see if that helps. > > > >> > > > >> =20 > > > > > > > >Here we go: > > > >http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-bootlog= -6-xen331-linux-2.6.29-rc1-atadebug.txt > > > > > > > >piix_init: pci_register_driver > > > >xen_allocate_pirq: returning irq 30 for gsi 18 > > > >xen_set_ioapic_routing: irq 30 gsi 18 vector 160 ioapic 0 pin 18=20 > > > >triggering 0 polarity 1 > > > >ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 30 > > > >xen: PCI device 0000:00:1f.1 pin 1 -> irq 30 > > > >ata_host_alloc: ENTER > > > >ata_port_alloc: ENTER > > > >ata_port_alloc: ENTER > > > >__ata_port_freeze: ata4294967295 port frozen > > > >__ata_port_freeze: ata4294967295 port frozen > > > > =20 > > >=20 > > > I don't know whether being "frozen" is good, bad or indifferent, bu= t=20 > > > that's a might strange ata interface number. I don't suppose you h= ave 4=20 > > > billion ata interfaces on your machine? > > >=20 > >=20 > > Heh. Yeah, that's weird.. I wonder what's going on.=20 > >=20 > > I'll try to debug that. > >=20 >=20 > Ok, it seems ports are supposed to be frozen during initialization in > ata_host_start() function. Correct port names are only assigned after t= hat.=20 > So those "port frozen" messages with -1 as the name are OK at that poin= t. >=20 > Port names ("print_id") are given in ata_host_register() function, whic= h > never gets called for ata_piix.. >=20 > ata_host_register() is supposed to be called from > ata_pci_sff_activate_host(), but in that function some error happens in= =20 >=20 > rc =3D devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev), irq_handler, IRQF_S= HARED, drv_name, host); > if (rc) > goto out; >=20 > and ports names never get assigned because that "goto out;" is executed= . >=20 > So.. Any ideas why devm_request_irq() fails?=20 >=20 Log with a lot of debugging information: http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-bootlog-7-xen3= 31-linux-2.6.29-rc1-atadebug2.txt I added prints everywhere.. If you search for "piix_init: pci_register_driver" in that log, that's wh= ere ata_piix module loading starts.. and it ends at "piix_init: done". OK.. so first this: piix_init: pci_register_driver piix_init_one: ENTER piix_init_one: DEBUG1 piix_init_one: pcim_enable_device(pdev); xen_allocate_pirq: returning irq 30 for gsi 18 xen_set_ioapic_routing: irq 30 gsi 18 vector 160 ioapic 0 pin 18 triggeri= ng 0 polarity 1 ata_piix 0000:00:1f.1: PCI INT A -> GSI 18 (level, low) -> IRQ 30 xen: PCI device 0000:00:1f.1 pin 1 -> irq 30 And then later: ata_pci_sff_activate_host: legacy_mode ata_pci_sff_activate_host: port 0 not dummy: devm_request_irq() ata_pci_sff_activate_host: non-legacy-mode irq: 30 ata_pci_sff_activate_host: requesting ATA_PRIMARY_IRQ(pdev) irq: 14 ata_pci_sff_activate_host: devm_request_irq() returned !=3D 0, goto out ata_pci_sff_activate_host: out ata_pci_sff_activate_host: devres_release_group() ata_pci_sff_activate_host: end, returning xen: disable pci device 0000:00:1f.1 Is that ATA_PRIMARY_IRQ() problematic somehow? the driver is requesting I= RQ 14 instead of 30 allocated earlier..=20 I'm not very familiar with this stuff.. hopefully someone else has ideas about this.=20 -- Pasi