On Thu, Oct 20, 2016 at 04:55:22PM +0800, Peter Xu wrote: > On Thu, Oct 20, 2016 at 10:41:37AM +0200, Andrew Jones wrote: > > [...] > > > Let's do these patches separate from the series and maybe change setup_idt > > too? It'd be interesting to see if the assert in setup_idt would fire, > > i.e. if any users are relying on it being tolerant to multiple calls, and > > then find out why. > > The problem should be: smp_init() is calling setup_idt(). So if we > change the init stuff in setup_idt() into an assertion, any test > program that calls both smp_init() and setup_idt() would possibly fail > the assertion. Actually I see most test cases are using: > > setup_vm(); > smp_init(); > setup_idt(); > > to setup a basic environment, so I guess all of these use cases would > fail. In that sense, I'd slightly prefer keep setup_idt() as it is. Well I guess the fix is just to remove the unnecessary setup_idt calls from all unit tests that do smp_init(). Anyway, I won't fight too hard for this cleanup, but I certainly prefer not to propagate the sloppiness further into the other setups. Thanks, drew -- 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