On 07/01/2020 16:52, Jan Beulich wrote: > On 06.01.2020 16:54, Andrew Cooper wrote: >> Now that NULL will fault at boot, there is no need for a special constant to >> signify "current not set up yet". > Mind making this "... no strong need ..."? The benefit of an easily > recognizable value goes away, but I guess we'll be fine without. > IOW I'm not meaning to object.
Fine. > >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -705,7 +705,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> /* Critical region without IDT or TSS. Any fault is deadly! */ >> >> set_processor_id(0); >> - set_current(INVALID_VCPU); /* debug sanity. */ >> + set_current(NULL); /* debug sanity. */ >> idle_vcpu[0] = current; > Is any of this actually changing any value in memory? Yes. Observe: /* Set up stack. */ lea STACK_SIZE + sym_esi(cpu0_stack), %esp twice in head.S, meaning that the top-of-stack block is junk at this point. Explicitly setting it to NULL here seems like a safer option than trusting that noone has actually used the stack yet. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel