<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - [HSW bisected]igt/module_reload causes [drm:hsw_unclaimed_reg_check] *ERROR* Unclaimed write to 44004 and system hang with headless, with power well disabled"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=67813#c39">Comment # 39</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - [HSW bisected]igt/module_reload causes [drm:hsw_unclaimed_reg_check] *ERROR* Unclaimed write to 44004 and system hang with headless, with power well disabled"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=67813">bug 67813</a>
              from <span class="vcard"><a class="email" href="mailto:przanoni@gmail.com" title="Paulo Zanoni <przanoni@gmail.com>"> <span class="fn">Paulo Zanoni</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=67813#c38">comment #38</a>)
<span class="quote">> I did some more investigation, and it seems the Kernel gets stuck on an
> infinite loop that keeps calling VGA. I added some printks, and I at the
> moment we do the "echo 0" to the bind file</span >

(accidentally hit the "Save Changes" button)

I did some more investigation, and it seems the Kernel gets stuck on an
infinite loop that keeps calling VGA functions. I added some printks, and at
the moment we do the "echo 0" to the bind file, we keep printing this forever:

[  431.878277] === write_vga
[  431.878278] === vgacon_set_cursor_size
[  431.878297] [drm:intel_uncore_check_errors] *ERROR* Unclaimed register
before interrupt
[  431.878331] === vgacon_cursor  
[  431.878332] === vgacon_restore_screen
[  431.878332] === write_vga  
[  431.878333] === vgacon_set_cursor_size  
[  431.878373] === vgacon_dummy
[  431.878373] === vgacon_scroll  
[  431.878374] === vgacon_restore_screen  
[  431.878374] === vgacon_scrollback_update  
[  431.878435] === vga_set_mem_top  
[  431.878435] === write_vga  
[  431.878439] === vgacon_dummy  
[  431.878440] === vgacon_scroll
[  431.878440] === vgacon_restore_screen  
[  431.878440] === vgacon_scrollback_update  
[  431.878501] === vga_set_mem_top  
[  431.878502] === write_vga  
[  431.878503] === vgacon_cursor  
[  431.878503] === vgacon_restore_screen  
[  431.878504] === write_vga  
[  431.878505] === vgacon_set_cursor_size  
[  431.878524] [drm:intel_uncore_check_errors] *ERROR* Unclaimed register
before interrupt
[  431.878559] === vgacon_cursor  
[  431.878559] === vgacon_restore_screen  
[  431.878559] === write_vga  
[  431.878560] === vgacon_set_cursor_size
[  431.878601] === vgacon_dummy  
[  431.878601] === vgacon_scroll 

Also, the function that triggers the unclaimed register is clearly
vgacon_set_cursor_size.

It looks like we're stuck in an infinite loop inside console_unlock.

The code that seems to fix the problem is just:
vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO);
val = inb(VGA_MSR_READ);
outb(val & ~VGA_MSR_MEM_EN, VGA_MSR_WRITE);
vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO | VGA_RSRC_NORMAL_IO
|VGA_RSRC_NORMAL_MEM);
vga_put(dev->pdev, VGA_RSRC_LEGACY_IO);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>