diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-08-24 12:25:44 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-08-24 12:25:54 +0200 | 
| commit | 5f9ece02401116b29eb04396b99ea092acb75dd8 (patch) | |
| tree | e10386e2dc63c275646b4eb0bed857da7bf86c6a /drivers/lguest/lg.h | |
| parent | 9f51e24ee8b5a1595b6a5ac0c2be278a16488e75 (diff) | |
| parent | 422bef879e84104fee6dc68ded0e371dbeb5f88e (diff) | |
| download | olio-linux-3.10-5f9ece02401116b29eb04396b99ea092acb75dd8.tar.xz olio-linux-3.10-5f9ece02401116b29eb04396b99ea092acb75dd8.zip  | |
Merge commit 'v2.6.31-rc7' into x86/cleanups
Merge reason: we were on -rc1 before - go up to -rc7
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/lguest/lg.h')
| -rw-r--r-- | drivers/lguest/lg.h | 34 | 
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 9c3138265f8..bc28745d05a 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -16,15 +16,13 @@  void free_pagetables(void);  int init_pagetables(struct page **switcher_page, unsigned int pages); -struct pgdir -{ +struct pgdir {  	unsigned long gpgdir;  	pgd_t *pgdir;  };  /* We have two pages shared with guests, per cpu.  */ -struct lguest_pages -{ +struct lguest_pages {  	/* This is the stack page mapped rw in guest */  	char spare[PAGE_SIZE - sizeof(struct lguest_regs)];  	struct lguest_regs regs; @@ -38,8 +36,6 @@ struct lguest_pages  #define CHANGED_GDT_TLS		4 /* Actually a subset of CHANGED_GDT */  #define CHANGED_ALL	        3 -struct lguest; -  struct lg_cpu {  	unsigned int id;  	struct lguest *lg; @@ -56,13 +52,13 @@ struct lg_cpu {  	unsigned long pending_notify; /* pfn from LHCALL_NOTIFY */ -	/* At end of a page shared mapped over lguest_pages in guest.  */ +	/* At end of a page shared mapped over lguest_pages in guest. */  	unsigned long regs_page;  	struct lguest_regs *regs;  	struct lguest_pages *last_pages; -	int cpu_pgd; /* which pgd this cpu is currently using */ +	int cpu_pgd; /* Which pgd this cpu is currently using */  	/* If a hypercall was asked for, this points to the arguments. */  	struct hcall_args *hcall; @@ -91,15 +87,17 @@ struct lg_eventfd_map {  };  /* The private info the thread maintains about the guest. */ -struct lguest -{ +struct lguest {  	struct lguest_data __user *lguest_data;  	struct lg_cpu cpus[NR_CPUS];  	unsigned int nr_cpus;  	u32 pfn_limit; -	/* This provides the offset to the base of guest-physical -	 * memory in the Launcher. */ + +	/* +	 * This provides the offset to the base of guest-physical memory in the +	 * Launcher. +	 */  	void __user *mem_base;  	unsigned long kernel_address; @@ -124,11 +122,13 @@ bool lguest_address_ok(const struct lguest *lg,  void __lgread(struct lg_cpu *, void *, unsigned long, unsigned);  void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned); -/*H:035 Using memory-copy operations like that is usually inconvient, so we +/*H:035 + * Using memory-copy operations like that is usually inconvient, so we   * have the following helper macros which read and write a specific type (often   * an unsigned long).   * - * This reads into a variable of the given type then returns that. */ + * This reads into a variable of the given type then returns that. + */  #define lgread(cpu, addr, type)						\  	({ type _v; __lgread((cpu), &_v, (addr), sizeof(_v)); _v; }) @@ -142,9 +142,11 @@ void __lgwrite(struct lg_cpu *, unsigned long, const void *, unsigned);  int run_guest(struct lg_cpu *cpu, unsigned long __user *user); -/* Helper macros to obtain the first 12 or the last 20 bits, this is only the +/* + * Helper macros to obtain the first 12 or the last 20 bits, this is only the   * first step in the migration to the kernel types.  pte_pfn is already defined - * in the kernel. */ + * in the kernel. + */  #define pgd_flags(x)	(pgd_val(x) & ~PAGE_MASK)  #define pgd_pfn(x)	(pgd_val(x) >> PAGE_SHIFT)  #define pmd_flags(x)    (pmd_val(x) & ~PAGE_MASK)  |