[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] smp_prepare_boot_cpu


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: maheen butt <maheen_butt26@xxxxxxxxx>
  • Date: Sun, 9 Dec 2012 22:27:39 -0800 (PST)
  • Delivery-date: Mon, 10 Dec 2012 06:28:55 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=phFmWXXgzwKFr6I9PThWFPK0yAqtF3P2NWpJ7axYDsQgXQeNT2mI929zSQyJbVd7iVDAQcPmn9QZlTgeHaZb9QYpue8kp1wL+y8a4hiUK3UV4bJgjISVMzFRCoGIVGh++f0B1CPkkOf/QoaPzyIBab6ikUo+vMfvRVbBWoW0knc=;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi,

In start_xen():xen/arch/x86/setup.c
has function smp_prepare_boot_cpu() which also exist in vanilla kernel
the kernel version is given that:
void __init native_smp_prepare_boot_cpu(void)
{
    int me = smp_processor_id();
    switch_to_new_gdt(me);
    /* already set me in cpu_online_mask in boot_cpu_init() */
    cpumask_set_cpu(me, cpu_callout_mask);
    per_cpu(cpu_state, me) = CPU_ONLINE;
}

Whera in case of Xen we have:
void __init smp_prepare_boot_cpu(void)
{
    cpumask_set_cpu(smp_processor_id(), &cpu_online_map);
    cpumask_set_cpu(smp_processor_id(), &cpu_present_map);
}
My question is that why there is no need to change gdt pointer to current cpu segment as it is
done in case of kernel code?

Thanks
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.