aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.16-sparse/arch/xeno/mm/hypervisor.c
blob: 8454c9b36a17aa90fbed0be06b525b387492bb22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/******************************************************************************
 * xeno/mm/hypervisor.c
 * 
 * Update page tables via the hypervisor.
 * 
 * Copyright (c) 2002, K A Fraser
 */

#include <linux/config.h>
#include <asm/hypervisor.h>
#include <asm/page.h>
#include <asm/pgtable.h>

#define QUEUE_SIZE 1
static page_update_request_t update_queue[QUEUE_SIZE];

void queue_l1_entry_update(unsigned long ptr, unsigned long val)
{
    update_queue[0].ptr = ptr + start_info.phys_base;
    update_queue[0].val = val;
    flush_page_update_queue();
}

void queue_l2_entry_update(unsigned long ptr, unsigned long val)
{
    update_queue[0].ptr = ptr + start_info.phys_base;
    update_queue[0].val = val;
    flush_page_update_queue();
}

void queue_baseptr_create(unsigned long ptr)
{
    update_queue[0].ptr = PGREQ_ADD_BASEPTR;
    update_queue[0].val = ptr + start_info.phys_base;
    flush_page_update_queue();
}

void queue_baseptr_remove(unsigned long ptr)
{
    update_queue[0].ptr = PGREQ_REMOVE_BASEPTR;
    update_queue[0].val = ptr + start_info.phys_base;
    flush_page_update_queue();
}

void queue_tlb_flush(void)
{
    /* nothing */
}

void queue_tlb_flush_one(unsigned long ptr)
{
    /* nothing */
}

void flush_page_update_queue(void)
{
    HYPERVISOR_pt_update(update_queue, 1);
}