From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: pv_ops dom0 kernel vga text console line offset problem Date: Sun, 24 Jan 2010 18:12:19 +0200 Message-ID: <20100124161219.GF2861@reaktio.net> References: <20091213163135.GZ16033@reaktio.net> <4B27DEA0.6050605@goop.org> 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: <4B27DEA0.6050605@goop.org> 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: xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Tue, Dec 15, 2009 at 11:08:16AM -0800, Jeremy Fitzhardinge wrote: > On 12/13/2009 08:31 AM, Pasi K=E4rkk=E4inen wrote: >> My newer x86_64 testbox shows a problem with vga text console, basicly >> when drm is initialized (without modesetting, kernel has "nomodeset" p= arameter), >> all the text gets some offset, ie. the text doesn't start from the >> beginning of the line, but from the middle of the screen. >> >> This happens with pv_ops dom0 kernel, using Xen 3.4.x hypervisor. The >> same kernel binary works OK without problems on baremetal (without Xen= ). >> >> I recorded a video of this behaviour, it's easiest to check it out: >> http://pasik.reaktio.net/xen/pv_ops-dom0-debug/xen_pvops_dom0_vga_cons= ole_line_offset_problem-xvid.avi >> >> Any ideas? >> >> Hardware is Supermicro Intel motherboard with ATI ES1000 graphics. >> =20 > > Yes, that's very odd. Are you using any ATI-specific drivers, or is =20 > this being used as plain generic VGA hardware? You have radeon drm; =20 > what happens if you disable that? > I just hacked the initrd image to not load radeon/drm/ttm modules,=20 and also blacklisted them in modprobe.d so that udev can't load them. And the offset-problem still happens.. It looks like it happens when USB modules are loaded.. ? (I verified after the system started that no radeon/drm/ttm modules were = loaded). > I guess there's some register state which isn't being either set up =20 > properly, or read back properly, so the kernel driver is out of sync =20 > with the actual hardware state. But I'm not sure where I'd start =20 > looking for the problem. > Hmm.. I wonder if it's actually related to the other USB problem I have: http://pasik.reaktio.net/xen/pv_ops-dom0-debug/dmesg-2.6.31.6-vga-text-co= nsole-line-offset-problem2.txt usb 1-5: new high speed USB device using ehci_hcd and address 2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] 2.6.31.6 #8 ------------------------------------------------------ khubd/42 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: (&retval->lock){......}, at: [] dma_pool_alloc+0x45/0x= 321 and this task is already holding: (&ehci->lock){-.....}, at: [] ehci_urb_enqueue+0xb4/0x= d7a which would create a new lock dependency: (&ehci->lock){-.....} -> (&retval->lock){......} but this new dependency connects a HARDIRQ-irq-safe lock: (&ehci->lock){-.....} ... which became HARDIRQ-irq-safe at: [] __lock_acquire+0x254/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] ehci_irq+0x41/0x441 [] usb_hcd_irq+0x59/0xcc [] handle_IRQ_event+0x62/0x148 [] handle_level_irq+0x90/0xf9 [] handle_irq+0x9a/0xba [] xen_evtchn_do_upcall+0x10c/0x1bd [] xen_do_hypervisor_callback+0x1e/0x30 [] 0xffffffffffffffff to a HARDIRQ-irq-unsafe lock: (purge_lock){+.+...} ... which became HARDIRQ-irq-unsafe at: ... [] __lock_acquire+0x2c8/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] __purge_vmap_area_lazy+0x63/0x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_alloc_ptpage+0x47/0x75 [] xen_alloc_pte+0x13/0x15 [] __pte_alloc_kernel+0x6f/0xdd [] vmap_page_range_noflush+0x1c5/0x315 [] map_vm_area+0x41/0x6b [] __vmalloc_area_node+0x12f/0x167 [] __vmalloc_node+0x90/0xb5 [] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x12c/0x1f8 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+0xbb/0xd6 [] xen_start_kernel+0x5dc/0x5e3 [] 0xffffffffffffffff other info that might help us debug this: 2 locks held by khubd/42: #0: (usb_address0_mutex){+.+...}, at: [] hub_port_ini= t+0x8c/0x7ec #1: (&ehci->lock){-.....}, at: [] ehci_urb_enqueue+0x= b4/0xd7a the HARDIRQ-irq-safe lock's dependencies: -> (&ehci->lock){-.....} ops: 0 { IN-HARDIRQ-W at: [] __lock_acquire+0x254/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] ehci_irq+0x41/0x441 [] usb_hcd_irq+0x59/0xcc [] handle_IRQ_event+0x62/0x148 [] handle_level_irq+0x90/0xf9 [] handle_irq+0x9a/0xba [] xen_evtchn_do_upcall+0x10c/0= x1bd [] xen_do_hypervisor_callback+0= x1e/0x30 [] 0xffffffffffffffff INITIAL USE at: [] __lock_acquire+0x33f/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock_irqsave+0x5d/0xab [] ehci_endpoint_reset+0x5a/0x12= b [] usb_hcd_reset_endpoint+0x35/0= x84 [] usb_enable_endpoint+0x52/0xa6 [] usb_enable_interface+0x4b/0x7= 4 [] usb_set_configuration+0x479/0= x6af [] generic_probe+0x6c/0xcb [] usb_probe_device+0x6c/0xb4 [] driver_probe_device+0xed/0x22= a [] __device_attach+0x4d/0x68 [] bus_for_each_drv+0x68/0xb3 [] device_attach+0x75/0xa0 [] bus_probe_device+0x3a/0x65 [] device_add+0x3db/0x586 [] usb_new_device+0x169/0x232 [] usb_add_hcd+0x4be/0x6a8 [] usb_hcd_pci_probe+0x263/0x3bd [] local_pci_probe+0x2a/0x42 [] do_work_for_cpu+0x27/0x50 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff } ... key at: [] __key.35644+0x0/0x8 -> (hcd_urb_list_lock){......} ops: 0 { INITIAL USE at: [] __lock_acquire+0x33f/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] usb_hcd_link_urb_to_ep+0x37= /0xc8 [] usb_hcd_submit_urb+0x308/0x= a03 [] usb_submit_urb+0x258/0x2eb [] usb_start_wait_urb+0x71/0x1= d4 [] usb_control_msg+0x10c/0x144 [] usb_get_descriptor+0x83/0xc= 9 [] usb_get_device_descriptor+0= x85/0xc8 [] usb_add_hcd+0x472/0x6a8 [] usb_hcd_pci_probe+0x263/0x3= bd [] local_pci_probe+0x2a/0x42 [] do_work_for_cpu+0x27/0x50 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff } ... key at: [] hcd_urb_list_lock+0x18/0x40 ... acquired at: [] __lock_acquire+0xa79/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] usb_hcd_link_urb_to_ep+0x37/0xc8 [] ehci_urb_enqueue+0xcd/0xd7a [] usb_hcd_submit_urb+0x86d/0xa03 [] usb_submit_urb+0x258/0x2eb [] usb_start_wait_urb+0x71/0x1d4 [] usb_control_msg+0x10c/0x144 [] hub_port_init+0x319/0x7ec [] hub_events+0x94d/0x11e6 [] hub_thread+0x46/0x1d2 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff the HARDIRQ-irq-unsafe lock's dependencies: -> (purge_lock){+.+...} ops: 0 { HARDIRQ-ON-W at: [] __lock_acquire+0x2c8/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] __purge_vmap_area_lazy+0x63/= 0x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_alloc_ptpage+0x47/0x75 [] xen_alloc_pte+0x13/0x15 [] __pte_alloc_kernel+0x6f/0xdd [] vmap_page_range_noflush+0x1c= 5/0x315 [] map_vm_area+0x41/0x6b [] __vmalloc_area_node+0x12f/0x= 167 [] __vmalloc_node+0x90/0xb5 [] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x12= c/0x1f8 [] vfs_caches_init+0xb8/0x140 ] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x12= c/0x1f8 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+0x= bb/0xd6 [] xen_start_kernel+0x5dc/0x5e3 [] 0xffffffffffffffff INITIAL USE at: [] __lock_acquire+0x33f/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] __purge_vmap_area_lazy+0x63/0= x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_alloc_ptpage+0x47/0x75 [] xen_alloc_pte+0x13/0x15 [] __pte_alloc_kernel+0x6f/0xdd [] vmap_page_range_noflush+0x1c5= /0x315 [] map_vm_area+0x41/0x6b [] __vmalloc_area_node+0x12f/0x1= 67 [] __vmalloc_node+0x90/0xb5 [] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x12c= /0x1f8 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+0xb= b/0xd6 [] xen_start_kernel+0x5dc/0x5e3 [] 0xffffffffffffffff } ... key at: [] purge_lock.26578+0x18/0x40 -> (vmap_area_lock){+.+...} ops: 0 { HARDIRQ-ON-W at: [] __lock_acquire+0x2c8/0xc0e x14a/0x20a [] __vmalloc_node+0x77/0xb5 [] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x= 12c/0x1f8 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+= 0xbb/0xd6 [] xen_start_kernel+0x5dc/0x5= e3 [] 0xffffffffffffffff SOFTIRQ-ON-W at: [] __lock_acquire+0x2e9/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] alloc_vmap_area+0x116/0x28= a [] __get_vm_area_node+0x14a/0= x20a [] __vmalloc_node+0x77/0xb5 [] __vmalloc+0x28/0x3e [] alloc_large_system_hash+0x= 12c/0x1f8 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+= 0xbb/0xd6 [] xen_start_kernel+0x5dc/0x5= e3 [] 0xffffffffffffffff INITIAL USE at: [] __lock_acquire+0x33f/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] alloc_vmap_area+0x116/0x28a [] __get_vm_area_node+0x14a/0x= 20a [] __vmalloc_node+0x77/0xb5 [] vfs_caches_init+0xb8/0x140 [] start_kernel+0x3ef/0x44c [] x86_64_start_reservations+0= xbb/0xd6 [] xen_start_kernel+0x5dc/0x5e= 3 [] 0xffffffffffffffff } ... key at: [] vmap_area_lock+0x18/0x40 -> (&rnp->lock){..-...} ops: 0 { IN-SOFTIRQ-W at: [] __lock_acquire+0x275/0xc= 0e [] lock_acquire+0xee/0x12e [] _spin_lock_irqsave+0x5d/= 0xab [] cpu_quiet+0x38/0xb0 [] __rcu_process_callbacks+= 0x83/0x259 [] rcu_process_callbacks+0x= 5d/0x76 [] __do_softirq+0xf6/0x1f0 [] call_softirq+0x1c/0x30 [] do_softirq+0x5f/0xd7 [] irq_exit+0x66/0xbc [] xen_evtchn_do_upcall+0x1= 8d/0x1bd [] xen_do_hypervisor_callba= ck+0x1e/0x30 [] 0xffffffffffffffff INITIAL USE at: [] __lock_acquire+0x33f/0xc0= e [] lock_acquire+0xee/0x12e [] _spin_lock_irqsave+0x5d/0= xab [] rcu_init_percpu_data+0x3d= /0x18b [] rcu_cpu_notify+0x4a/0xa7 [] __rcu_init+0x168/0x1b3 [] rcu_init+0x1c/0x3e [] start_kernel+0x268/0x44c [0x5e3 [] 0xffffffffffffffff } ... key at: [] __key.20517+0x0/0x8 ... acquired at: [] __lock_acquire+0xa79/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock_irqsave+0x5d/0xab [] __call_rcu+0x9d/0x13c [] call_rcu+0x28/0x3e [] __free_vmap_area+0x7b/0x98 [] __purge_vmap_area_lazy+0x149/0x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_create_contiguous_region+0x4a/0xf3 [] xen_swiotlb_alloc_coherent+0x84/0xef [] dma_alloc_coherent+0xaf/0xec [] dmam_alloc_coherent+0x67/0xc0 [] ahci_port_start+0x63/0xf6 [] ata_host_start+0xf4/0x1a9 [] ata_host_activate+0x39/0x102 [] ahci_init_one+0xca3/0xcd7 [] local_pci_probe+0x2a/0x42 [] do_work_for_cpu+0x27/0x50 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff -> (&rcu_state.onofflock){..-...} ops: 0 { IN-SOFTIRQ-W at: [] __lock_acquire+0x275/0xc= 0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] rcu_start_gp+0xc5/0x154 [] cpu_quiet_msk+0xae/0xcd [] rcu_process_dyntick+0xe0= /0x11d [] force_quiescent_state+0x= 121/0x1a2 [] __rcu_process_callbacks+= 0x48/0x259 [] rcu_process_callbacks+0x= 3e/0x76 [] __do_softirq+0xf6/0x1f0 do_softirq+0x5f/0xd7 [] irq_exit+0x66/0xbc [] xen_evtchn_do_upcall+0x1= 8d/0x1bd [] xen_do_hypervisor_callba= ck+0x1e/0x30 [] 0xffffffffffffffff INITIAL USE at: [] __lock_acquire+0x33f/0xc0= e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] rcu_init_percpu_data+0xe6= /0x18b [] rcu_cpu_notify+0x4a/0xa7 [] __rcu_init+0x168/0x1b3 [] rcu_init+0x1c/0x3e [] start_kernel+0x268/0x44c [] x86_64_start_reservations= +0xbb/0xd6 [] xen_start_kernel+0x5dc/0x= 5e3 [] 0xffffffffffffffff } ... key at: [] rcu_state+0x14f0/0x1580 ... acquired at: [] __lock_acquire+0xa79/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] rcu_init_percpu_data+0xfa/0x18b [] rcu_cpu_notify+0x4a/0xa7 [] __rcu_init+0x168/0x1b3 [] rcu_init+0x1c/0x3e [] start_kernel+0x268/0x44c [] x86_64_start_reservations+0xbb/0xd6 [] xen_start_kernel+0x5dc/0x5e3 [] 0xffffffffffffffff ... acquired at: [] __lock_acquire+0xa79/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] rcu_start_gp+0xc5/0x154 [] __call_rcu+0xa8/0x13c [] call_rcu+p_area_lazy+0x149/0x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_create_contiguous_region+0x4a/0xf3 [] xen_swiotlb_alloc_coherent+0x84/0xef [] dma_alloc_coherent+0xaf/0xec [] dmam_alloc_coherent+0x67/0xc0 [] ahci_port_start+0x63/0xf6 [] ata_host_start+0xf4/0x1a9 [] ata_host_activate+0x39/0x102 [] ahci_init_one+0xca3/0xcd7 [] local_pci_probe+0x2a/0x42 [] do_work_for_cpu+0x27/0x50 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff ... acquired at: [] __lock_acquire+0xa79/0xc0e [] lock_acquire+0xee/0x12e [] _spin_lock+0x45/0x8e [] __purge_vmap_area_lazy+0x132/0x198 [] vm_unmap_aliases+0x18f/0x1b2 [] xen_create_contiguous_region+0x4a/0xf3 [] xen_swiotlb_alloc_coherent+0x84/0xef [] dma_alloc_coherent+0xaf/0xec [] dmam_alloc_coherent+0x67/0xc0 [] ahci_port_start+0x63/0xf6 [] ata_host_start+0xf4/0x1a9 [] ata_host_activate+0x39/0x102 [] ahci_init_one+0xca3/0xcd7 [] local_pci_probe+0x2a/0x42 [] do_work_for_cpu+0x27/0x50 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] 0xffffffffffffffff stack backtrace: Pid: 42, comm: khubd Not tainted 2.6.31.6 #8 Call Trace: [] check_usage+0x29a/0x2bf [] ? check_noncircular+0xa1/0xe8 [] check_irq_usage+0x70/0xe9 [] __lock_acquire+0x973/0xc0e [] lock_acquire+0xee/0x12e [] ? dma_pool_alloc+0x45/0x321 [] ? dma_pool_alloc+0x45/0x321 [] _spin_lock_irqsave+0x5d/0xab [] ? dma_pool_alloc+0x45/0x321 [] ? add_lock_to_list+0x8a/0xe5 [] dforce_evtchn_callback+0x20/0x36 [] ? check_events+0x12/0x20 [] ehci_qh_alloc+0x37/0xfe [] ? xen_restore_fl_direct_end+0x0/0x1 [] qh_append_tds+0x4c/0x478 [] ? _spin_unlock+0x3a/0x55 [] ehci_urb_enqueue+0xf2/0xd7a [] ? check_events+0x12/0x20 [] ? usb_create_hcd+0x1a4/0x1ba [] usb_hcd_submit_urb+0x86d/0xa03 [] ? xen_restore_fl_direct_end+0x0/0x1 [] ? xen_force_evtchn_callback+0x20/0x36 [] ? debug_check_no_locks_freed+0x13d/0x16a [] ? check_events+0x12/0x20 [] ? xen_restore_fl_direct_end+0x0/0x1 [] ? lockdep_init_map+0xad/0x138 [] usb_submit_urb+0x258/0x2eb [] ? __init_waitqueue_head+0x4d/0x76 [] usb_start_wait_urb+0x71/0x1d4 [] usb_control_msg+0x10c/0x144 [] hub_port_init+0x319/0x7ec [] hub_events+0x94d/0x11e6 [] ? check_events+0x12/0x20 [] ? xen_force_evtchn_callback+0x20/0x36 [] hub_thread+0x46/0x1d2 [] ? autoremove_wake_function+0x0/0x5f [] ? hub_thread+0x0/0x1d2 [] kthread+0xac/0xb4 [] child_rip+0xa/0x20 [] ? restore_args+0x0/0x30 [] ? child_rip+0x0/0x20 usb 1-5: New USB device found, idVendor=3D14dd, idProduct=3D0002 usb 1-5: New USB device strings: Mfr=3D1, Product=3D2, SerialNumber=3D3 usb 1-5: Product: Multidevice usb 1-5: Manufacturer: Peppercon AG usb 1-5: SerialNumber: 0962b201b34649022DFD5493FE193F22 usb 1-5: configuration #1 chosen from 1 choice input: Peppercon AG Multidevice as /devices/pci0000:00/0000:00:1a.7/usb1/= 1-5/1-5:1.2/input/input3 generic-usb 0003:14DD:0002.0001: input,hidraw0: USB HID v1.01 Mouse [Pepp= ercon AG Multidevice] on usb-0000:00:1a.7-5/input2 input: Peppercon AG Multidevice as /devices/pci0000:00/0000:00:1a.7/usb1/= 1-5/1-5:1.3/input/input4 generic-usb 0003:14DD:0002.0002: input,hidraw1: e] on usb-0000:00:1a.7-5/= input3 -- Pasi