set_current in Xen booting sequence
Hi all,
I'm investigating Xen bootup sequence and I'm stuck with the function set_current((struct vcpu *)0xfffff000); the high level idea is that it is assigning VCPU to physical CPU but I can't understand the following
1) what is the need of this hard coded address? it is seemed that vcpu
exist on this address (but no idea who put vcpu on that particular
address)?
(the same address is passed both in case of ARM and X86)
2) no idea about what exactly get_cpu_info() (called by set_current) is doing.. (logically doing & and or with sp register)?
Thanks
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line · maheen butt
Hi all,
I'm investigating Xen bootup sequence and I'm stuck with the function
set_current((struct vcpu *)0xfffff000);
the high level idea is that it is assigning VCPU to physical CPU but I can't understand the following
Quoted 4 lines
1) what is the need of this hard coded address? it is seemed that vcpu exist on this address (but no idea who put vcpu on that particular address)?
(the same address is passed both in case of ARM and X86)
This is merely a debugging safeguard, making sure accesses through "current" crash rather than going unnoticed.
Quoted 2 lines
2) no idea about what exactly
get_cpu_info()(called byset_current) is doing.. (logically doing & and or with sp register)?
It does what its name says - getting the cpu_info structure's address for the current CPU. As that lives at the end of the stack, arithmetic on the stack pointer it the appropriate thing to do here.
Jan
It¹s a dummy or poison value to catch invalid use of current before it is properly set up.
-- Keir
Quoted 20 lines · maheen butt
Hi all,
I'm investigating Xen bootup sequence and I'm stuck with the function
set_current((struct vcpu *)0xfffff000);
the high level idea is that it is assigning VCPU to physical CPU but I can't understand the following1) what is the need of this hard coded address? it is seemed that vcpu exist on this address (but no idea who put vcpu on that particular address)? (the same address is passed both in case of ARM and X86)
2) no idea about what exactlyget_cpu_info()(called byset_current) is doing.. (logically doing & and or with sp register)?Thanks
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel