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
________________________________
From: xen-devel-bounces@lists.xensource.com
[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of pallavi jk
Sent: Tuesday, December 30, 2008 12:45 AM
To: xen-devel@lists.xensource.com; Keir Fraser; Jeremy Fitzhardinge
Subject: [Xen-devel] GET_CURRENT macro in entry.S
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@lists.xensource.com
http://lists.xensource.com/xen-devel