aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/lguest/lguest_user.c')
-rw-r--r--drivers/lguest/lguest_user.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index b184652e45d7..61b177e1e649 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -111,7 +111,7 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o)
111 return run_guest(lg, (unsigned long __user *)user); 111 return run_guest(lg, (unsigned long __user *)user);
112} 112}
113 113
114/*L:020 The initialization write supplies 5 pointer sized (32 or 64 bit) 114/*L:020 The initialization write supplies 4 pointer sized (32 or 64 bit)
115 * values (in addition to the LHREQ_INITIALIZE value). These are: 115 * values (in addition to the LHREQ_INITIALIZE value). These are:
116 * 116 *
117 * base: The start of the Guest-physical memory inside the Launcher memory. 117 * base: The start of the Guest-physical memory inside the Launcher memory.
@@ -124,12 +124,6 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o)
124 * pagetables (which are set up by the Launcher). 124 * pagetables (which are set up by the Launcher).
125 * 125 *
126 * start: The first instruction to execute ("eip" in x86-speak). 126 * start: The first instruction to execute ("eip" in x86-speak).
127 *
128 * page_offset: The PAGE_OFFSET constant in the Guest kernel. We should
129 * probably wean the code off this, but it's a very useful constant! Any
130 * address above this is within the Guest kernel, and any kernel address can
131 * quickly converted from physical to virtual by adding PAGE_OFFSET. It's
132 * 0xC0000000 (3G) by default, but it's configurable at kernel build time.
133 */ 127 */
134static int initialize(struct file *file, const unsigned long __user *input) 128static int initialize(struct file *file, const unsigned long __user *input)
135{ 129{
@@ -137,7 +131,7 @@ static int initialize(struct file *file, const unsigned long __user *input)
137 * Guest. */ 131 * Guest. */
138 struct lguest *lg; 132 struct lguest *lg;
139 int err; 133 int err;
140 unsigned long args[5]; 134 unsigned long args[4];
141 135
142 /* We grab the Big Lguest lock, which protects against multiple 136 /* We grab the Big Lguest lock, which protects against multiple
143 * simultaneous initializations. */ 137 * simultaneous initializations. */
@@ -162,7 +156,6 @@ static int initialize(struct file *file, const unsigned long __user *input)
162 /* Populate the easy fields of our "struct lguest" */ 156 /* Populate the easy fields of our "struct lguest" */
163 lg->mem_base = (void __user *)(long)args[0]; 157 lg->mem_base = (void __user *)(long)args[0];
164 lg->pfn_limit = args[1]; 158 lg->pfn_limit = args[1];
165 lg->page_offset = args[4];
166 159
167 /* We need a complete page for the Guest registers: they are accessible 160 /* We need a complete page for the Guest registers: they are accessible
168 * to the Guest and we can only grant it access to whole pages. */ 161 * to the Guest and we can only grant it access to whole pages. */