On Thu, Jul 12, 2012 at 7:35 AM, 김민규 <mingyu84.kim@xxxxxxxxxxx> wrote: > + /* > + * Make sure preemption is disabled while calling handle_exit > + * as exit handling touches CPU-specific resources, such as > + * caches, and we must stay on the same CPU. > + * > + * Code that might sleep must disable preemption and access > + * CPU-specific resources first. > + */ > > > What does this comment mean? I cannot understand especially the last sentence > because it's not possible to sleep while preemption is disabled. it's a mistake, it should read "Code that might sleep must enable preemption" > > And you said the reason of disabling preemption as CPU-specific data such as caches. > But as far as I know, the l1 caches are coherent. > (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0438e/BABFHDFE.html) > > Can you please explain why preemption disable is necessary in detail? > if a VM tries to do a cache maintenance operation specific to that CPU that traps we want to make sure that the emulation of such operations happen on the same physical CPU to ensure correct semantics. -Christoffer -- 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