aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.16-sparse/arch
diff options
context:
space:
mode:
authorkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>2003-02-04 22:08:19 +0000
committerkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>2003-02-04 22:08:19 +0000
commitf38d179aea9a8383b02719a2fbc14b089a9be6a1 (patch)
treef3ad04f4aa8e1429f087b4b1a49f857adf2c0055 /xenolinux-2.4.16-sparse/arch
parentcdb8a52e51af6cdfa81c7c11df9eda66035809b2 (diff)
downloadxen-f38d179aea9a8383b02719a2fbc14b089a9be6a1.tar.gz
xen-f38d179aea9a8383b02719a2fbc14b089a9be6a1.tar.bz2
xen-f38d179aea9a8383b02719a2fbc14b089a9be6a1.zip
bitkeeper revision 1.22.1.7 (3e4039d3HqYce1Oml41mAtYFTKkhkA)
dom0_ops.h, dom0_memory.c, dom0_core.c, hypervisor-if.h, memory.c, domain.c: Cleaned up domain building some more. .del-hypervisor_defs.h~7d77395edca9f612: Delete: xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/hypervisor_defs.h
Diffstat (limited to 'xenolinux-2.4.16-sparse/arch')
-rw-r--r--xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c34
-rw-r--r--xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c12
-rw-r--r--xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h16
-rw-r--r--xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/hypervisor_defs.h21
4 files changed, 42 insertions, 41 deletions
diff --git a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c
index 1321f3eb52..f8a6ea93ea 100644
--- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c
+++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c
@@ -1,4 +1,3 @@
-
/******************************************************************************
* dom0_core.c
*
@@ -31,9 +30,19 @@
#include <asm/tlb.h>
#include "dom0_ops.h"
-#include "hypervisor_defs.h"
-#define XENO_BASE "xeno" // proc file name defs should be in separate .h
+/* Private proc-file data structures. */
+typedef struct proc_data {
+ unsigned int domain;
+ unsigned long map_size;
+} dom_procdata_t;
+
+typedef struct proc_mem_data {
+ unsigned long pfn;
+ int tot_pages;
+} proc_memdata_t;
+
+#define XENO_BASE "xeno"
#define DOM0_CMD_INTF "dom0_cmd"
#define DOM0_NEWDOM "new_dom_data"
@@ -195,9 +204,18 @@ static int cmd_write_proc(struct file *file, const char *buffer,
goto out;
}
- /* is the request intended for hypervisor? */
- if(op.cmd != MAP_DOM_MEM){
-
+ if ( op.cmd == MAP_DOM_MEM )
+ {
+ ret = dom_map_mem(op.u.dommem.domain, op.u.dommem.start_pfn,
+ op.u.dommem.tot_pages);
+ }
+ else if ( op.cmd == DO_PGUPDATES )
+ {
+ ret = HYPERVISOR_pt_update((void *)op.u.pgupdate.pgt_update_arr,
+ op.u.pgupdate.num_pgt_updates);
+ }
+ else
+ {
ret = HYPERVISOR_dom0_op(&op);
/* if new domain created, create proc entries */
@@ -223,10 +241,6 @@ static int cmd_write_proc(struct file *file, const char *buffer,
}
- } else {
-
- ret = dom_map_mem(op.u.dommem.domain, op.u.dommem.start_pfn,
- op.u.dommem.tot_pages);
}
out:
diff --git a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c
index 55e0495ab0..9d14070a1e 100644
--- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c
+++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c
@@ -14,7 +14,6 @@
#include <asm/tlb.h>
#include <asm/mmu.h>
-#include "hypervisor_defs.h"
#include "dom0_ops.h"
#define MAP_CONT 0
@@ -22,14 +21,15 @@
extern struct list_head * find_direct(struct list_head *, unsigned long);
-/* bd240: functions below perform direct mapping to the real physical pages needed for
- * mapping various hypervisor specific structures needed in dom0 userspace by various
- * management applications such as domain builder etc.
+/*
+ * bd240: functions below perform direct mapping to the real physical pages
+ * needed for mapping various hypervisor specific structures needed in dom0
+ * userspace by various management applications such as domain builder etc.
*/
-#define direct_set_pte(pteptr, pteval) queue_l1_entry_update(__pa(pteptr), (pteval).pte_low)
+#define direct_set_pte(pteptr, pteval) queue_l1_entry_update(__pa(pteptr)|PGREQ_UNCHECKED_UPDATE, (pteval).pte_low)
-#define direct_pte_clear(pteptr) queue_l1_entry_update(__pa(pteptr), 0)
+#define direct_pte_clear(pteptr) queue_l1_entry_update(__pa(pteptr)|PGREQ_UNCHECKED_UPDATE, 0)
#define __direct_pte(x) ((pte_t) { (x) } )
#define __direct_mk_pte(page_nr,pgprot) __direct_pte(((page_nr) << PAGE_SHIFT) | pgprot_val(pgprot))
diff --git a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h
index 502c97e768..d98ce1b1eb 100644
--- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h
+++ b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h
@@ -9,9 +9,10 @@
#define DOM0_NEWDOMAIN 0
#define DOM0_KILLDOMAIN 1
#define DOM0_GETMEMLIST 2
-#define MAP_DOM_MEM 3
#define DOM0_STARTDOM 4
-#define MAX_CMD 4
+#define MAP_DOM_MEM 6 /* Not passed down to Xen */
+#define DO_PGUPDATES 7 /* Not passed down to Xen */
+#define MAX_CMD 8
#define MAX_CMD_LEN 256
@@ -35,6 +36,7 @@ typedef struct dom0_getmemlist_st
void *buffer;
} dom0_getmemlist_t;
+/* This is entirely processed by XenoLinux */
typedef struct dom_mem
{
unsigned int domain;
@@ -43,6 +45,13 @@ typedef struct dom_mem
int tot_pages;
} dom_mem_t;
+/* This is entirely processed by XenoLinux */
+typedef struct dom_pgupdate
+{
+ unsigned long pgt_update_arr;
+ unsigned long num_pgt_updates;
+} dom_pgupdate_t;
+
typedef struct domain_launch
{
unsigned int domain;
@@ -50,8 +59,6 @@ typedef struct domain_launch
unsigned long virt_load_addr;
unsigned long virt_shinfo_addr;
unsigned long virt_startinfo_addr;
- unsigned long pgt_update_arr;
- unsigned long num_pgt_updates;
unsigned int num_vifs;
char cmd_line[MAX_CMD_LEN];
} dom_meminfo_t;
@@ -65,6 +72,7 @@ typedef struct dom0_op_st
dom0_killdomain_t killdomain;
dom0_getmemlist_t getmemlist;
dom_mem_t dommem;
+ dom_pgupdate_t pgupdate;
dom_meminfo_t meminfo;
}
u;
diff --git a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/hypervisor_defs.h b/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/hypervisor_defs.h
deleted file mode 100644
index e2965ff6a4..0000000000
--- a/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/hypervisor_defs.h
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/******************************************************************************
- * dom0_ops.h
- *
- * Data structures defined in hypervisor code but needed in DOM0 as well.
- * Contents of this file should be kept in sync with the hypervisor ones
- * unless you do not want something terrible :) to happen.
- *
- * Copyright (c) 2002, Keir Fraser & Boris Dragovic
- */
-
-
-typedef struct proc_data {
- unsigned int domain;
- unsigned long map_size;
-} dom_procdata_t;
-
-typedef struct proc_mem_data {
- unsigned long pfn;
- int tot_pages;
-} proc_memdata_t;