>
aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/lguest/lg.h
blob: bc28745d05af9794f756a5a29e64bb0b51a230ff (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                 



                            


                                  
                          
                      
 
                       



                                                                     
              
                             
                     

  
                                                     
                     












                                                                         


                          

                                                                               
 


                 
                
 


                                                              

                                                                  
                                                                        


                                 

                                        
                                                                
 


                                                                         


                                  
 
                                            

                   

                                                  

                                

  

                           
                                  






                                
                                                            
               
                                               


                                    
                      




                                                                               
                              
                                     
 

                               
                                             



                                 

                                        

                         

  


                                

                                                              

                                                                       
 

                                                                      


                                                                               

                                                                  

                                                                         

                                                                             
                                                                 

                                                                 
                                                                 


                                             
                                                              
 

                                                                             
                                                                               

                 
                                                 
                                                  

                                                  

                             

                                                                            
                                                         
                                                        

                                                             

                                                                               

                                                             
                                                                  
                                          
                                                                   
                                                
                                       


                                             


                                                              
                                         

                                                             


                                                                     

                    
                                            
                                             
                                                                    
                                                                   


                                                                   
                                                   
                                                    
                                                            
                                                   
                                                                           
                                                                     

                                                                
                                                    
 


                                 
                                               


                                                                      
                                                                     



                                                                          



                                
                   
                                       
                                         
 



                                                                              
                                                                                


















                                                                               
                                                                 
                                                                 



                                                                 

                                                                 
                     
 

                          
#ifndef _LGUEST_H
#define _LGUEST_H

#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <linux/init.h>
#include <linux/stringify.h>
#include <linux/lguest.h>
#include <linux/lguest_launcher.h>
#include <linux/wait.h>
#include <linux/hrtimer.h>
#include <linux/err.h>

#include <asm/lguest.h>

void free_pagetables(void);
int init_pagetables(struct page **switcher_page, unsigned int pages);

struct pgdir {
	unsigned long gpgdir;
	pgd_t *pgdir;
};

/* We have two pages shared with guests, per cpu.  */
struct lguest_pages {
	/* This is the stack page mapped rw in guest */
	char spare[PAGE_SIZE - sizeof(struct lguest_regs)];
	struct lguest_regs regs;

	/* This is the host state & guest descriptor page, ro in guest */