Re: [PATCH v6 04/12] ARM: KVM: Hypervisor inititalization

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

 



On Sun, 11 Mar 2012 18:24:03 -0400, Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Feb 23, 2012 at 11:00 PM, Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
> > On Thu, 23 Feb 2012 02:32:39 -0500, Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> >> +     /*
> >> +      * Allocate stack pages for Hypervisor-mode
> >> +      */
> >> +     for_each_possible_cpu(cpu)
> >> +             per_cpu(kvm_arm_hyp_stack_page, cpu) = NULL;
> >
> > This is weird; we can't call this init function multiple times without
> > reloading the module.
> >
> 
> what you're saying is that static DEFINE_PER_CPU will still be
> initialized to zero? I don't actually have experience with this, but I
> assumed that the data..percpu section would not necessarily be zeroed
> out when loading a module... Now I tried to look, but I couldn't
> convince myself. Can you enlighten me?

Absolutely and definitely.  It's placed in a special section, and from
there copied into the per-cpu sections by the module loader but still
follows the C semantics of being zero-initialized.

Cheers,
Rusty.
-- 
  How could I marry someone with more hair than me?  http://baldalex.org
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux