[Bug 110774] Xorg segfault on cpu which does not support PAT

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 28 07:36:23 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110774

--- Comment #2 from Chris Wilson <chris at chris-wilson.co.uk> ---
If you want the full detection method,

static bool test_has_wc_mmap(struct kgem *kgem)
{
        struct local_i915_gem_mmap2 wc;
        bool ret;

        if (DBG_NO_WC_MMAP)
                return false;

        /* XXX See https://bugs.freedesktop.org/show_bug.cgi?id=90841 */
        if (kgem->gen < 033)
                return false;

        if (gem_param(kgem, LOCAL_I915_PARAM_MMAP_VERSION) < 1)
                return false;

        VG_CLEAR(wc);
        wc.handle = gem_create(kgem->fd, 1);
        wc.offset = 0;
        wc.size = 4096;
        wc.flags = I915_MMAP_WC;
        ret = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP_v2, &wc) == 0;
        gem_close(kgem->fd, wc.handle);

        return ret;
}

The parameter just said which version of the struct was supported; you were
then meant to query which flags were supported by trial-and-error.

At this point, I would just refuse to run unless WC mmaps were available.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20190528/10bef20e/attachment-0001.html>


More information about the intel-3d-bugs mailing list