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/trap/interrupt.c

    r4638401 r454f1da  
    4545#include <arch.h>
    4646#include <mm/tlb.h>
     47#include <arch/mm/cache.h>
    4748#include <config.h>
    4849#include <synch/spinlock.h>
     
    8485                /*
    8586                 * This is a cross-call.
    86                  * data0 contains address of kernel function.
     87                 * data0 contains address of the kernel function.
    8788                 * We call the function only after we verify
    88                  * it is on of the supported ones.
     89                 * it is one of the supported ones.
    8990                 */
    9091#ifdef CONFIG_SMP
    9192                if (data0 == (uintptr_t) tlb_shootdown_ipi_recv) {
    9293                        tlb_shootdown_ipi_recv();
     94#ifdef CONFIG_VIRT_IDX_DCACHE
     95                } else if (data0 == (uintptr_t) dcache_shootdown_ipi_recv) {
     96                        dcache_shootdown_ipi_recv();
     97#endif
    9398                }
    9499#endif
Note: See TracChangeset for help on using the changeset viewer.