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 Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
>>> On 03.12.12 at 08:36, maheen butt <maheen_butt26@yahoo.com> wrote: > 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)This is merely a debugging safeguard, making sure accesses through "current" crash rather than going unnoticed.> 2) no idea about what exactly get_cpu_info() (called by set_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 On 03/12/2012 07:36, "maheen butt" <maheen_butt26@yahoo.com> wrote:> 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 > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel