Changeset 454f1da in mainline for kernel/arch/sparc64/src/mm/tlb.c


Ignore:
Timestamp:
2007-03-26T19:35:28Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d7daff
Parents:
4638401
Message:

Reworked handling of illegal virtual aliases caused by frame reuse.
We moved the incomplete handling from backend's frame method to
backend's page_fault method. The page_fault method is the one that
can create an illegal alias if it writes the userspace frame using
kernel address with a different page color than the page to which is
this frame mapped in userspace. When we detect this, we do D-cache
shootdown on all processors (!!!).

If we add code that accesses userspace memory from kernel address
space, we will have to check for illegal virtual aliases at all such
places.

I tested this on a 4-way simulated E6500 and a real-world Ultra 5,
which has unfortunatelly only one processor.

This solves ticket #26.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/tlb.c

    r4638401 r454f1da  
    483483       
    484484        for (i = 0; i < cnt; i++) {
    485                 itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY, page + i *
    486                         PAGE_SIZE);
    487                 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY, page + i *
    488                         PAGE_SIZE);
     485                itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
     486                    page + i * PAGE_SIZE);
     487                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
     488                    page + i * PAGE_SIZE);
    489489        }
    490490       
Note: See TracChangeset for help on using the changeset viewer.