Page MenuHomeFreeBSD

linuxkpi: lkpi_vmf_insert_special_pte_locked()
Needs ReviewPublic

Authored by kib on Tue, Sep 22, 1:15 PM.
Tags
None
Referenced Files
F174437028: D59883.id187855.diff
Sat, Oct 3, 5:20 AM
Unknown Object (File)
Thu, Oct 1, 10:04 AM
Unknown Object (File)
Thu, Oct 1, 6:37 AM
Unknown Object (File)
Wed, Sep 30, 11:11 PM
Unknown Object (File)
Tue, Sep 29, 1:43 PM
Unknown Object (File)
Tue, Sep 29, 5:16 AM
Unknown Object (File)
Tue, Sep 29, 5:03 AM
Unknown Object (File)
Tue, Sep 29, 12:34 AM

Details

Reviewers
markj

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Tue, Sep 22, 1:15 PM

Then the following is needed for drm-kmod:

diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index d1867ddd73..20406fba3e 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -126,7 +126,7 @@ static int remap_pfn(pte_t *pte, unsigned long addr, void *data)
        set_pte_at(r->mm, addr, pte, pte_mkspecial(pfn_pte(r->pfn, r->prot)));
 #elif defined(__FreeBSD__)
        vm_fault_t ret;
-       ret = lkpi_vmf_insert_pfn_prot_locked(r->vma, addr, r->pfn, r->prot);
+       ret = lkpi_vmf_insert_special_pte_locked(r->vma, addr, r->pfn, r->prot);
        if ((ret & VM_FAULT_OOM) != 0)
                return -ENOMEM;
        if ((ret & VM_FAULT_ERROR) != 0)

This is just a prototype, I only compiled the linuxkpi bits

I will look at this soon, I just need to resurrect a laptop so that I can easily test i915 changes without taking down my main workstation.

So let me ask: is this related to the "fictitious pages" mentioned in D58320? If so, how is the LinuxKPI part to be written/work in the future world order with a real 'struct page'?

In D59883#1375406, @bz wrote:

So let me ask: is this related to the "fictitious pages" mentioned in D58320? If so, how is the LinuxKPI part to be written/work in the future world order with a real 'struct page'?

In some sense, yes, it is related. So far I do not know how that proposal about 'real struct page' would work at all. But I do not think that this change (in whatever form after debugging and reviewing it) would have any additional effect on the 'real struct page'.

Stop busying already busy page, returned by the grab, avoiding deadlock.