<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CPU cacheline size of 0 can be returned by CPUID leaf 0x80000006 in some virtual machines"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87913">87913</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CPU cacheline size of 0 can be returned by CPUID leaf 0x80000006 in some virtual machines
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>leonid.shatz@ravellosystems.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In some recent commercial virtual machine environments cache line of 0 was
actually spotted and that resulted in panics and failures of GDM to initialize
leading to the SAD SCREEN.

The code used to provide default nonzero cache line size should be also used in
case when CPU cache line size is extracted from CPUID leaf 0x80000006. 

The following correction is suggested:

src/gallium/auxiliary/util/u_cpu_detect.c:
...
void
util_cpu_detect(void)


    if (regs[0] >= 0x80000006) {
        cpuid(0x80000006, regs2);
+       if (cacheline > 0)
            util_cpu_caps.cacheline = regs2[2] & 0xFF;
    }</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>