|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-devel
RE: [Xen-devel] GET_CURRENT macro in entry.S 
| Bottom of stack is cpu_info 
structure:   struct cpu_info {struct 
cpu_user_regs guest_cpu_user_regs;
 unsigned 
int         
processor_id;
 struct 
vcpu         
*current_vcpu;
 };
   Below code locates cpu_info on current stack (esp), and 
then fetch current_vcpu pointer into ebx.   Thanks, Kevin 
 
  
  I am unable to understand what this macro in  entry.S does. 
  Can someone please explain its working?
 #define 
  GET_CURRENT(reg)         
  \
 movl $STACK_SIZE-4, reg; 
  \
 orl  %esp, 
  reg;          
  \
 andl 
  $~3,reg;            
  \
 movl (reg),reg;
 
 Also, 
  how does the address of "struct vcpu" come in %ebx ? How do I obtain 
  it?
 
 Please help.
 
 -Pallavi
 
 _______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 | 
 |  | 
  
    |  |  |