Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-28 Thread Radim Krčmář
2018-03-24 21:17-0700, Wanpeng Li: > From: Wanpeng Li > > static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' > used before call to jump_label_init() > WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 > static_key_disable_cpuslocked+0x61/0x80 > RIP: 0010:static_key_dis

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-27 Thread Wanpeng Li
2018-03-28 0:29 GMT+08:00 Davidlohr Bueso : > On Tue, 27 Mar 2018, Wanpeng Li wrote: > >> The host admin can control it by qemu command-line, -cpu >> ...+kvm-hint-dedicated > > > So this requires qemu code modification, no? Yeah, https://git.qemu.org/?p=qemu.git;a=commitdiff;h=be7773268d981764894

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-27 Thread Davidlohr Bueso
On Tue, 27 Mar 2018, Wanpeng Li wrote: The host admin can control it by qemu command-line, -cpu ...+kvm-hint-dedicated So this requires qemu code modification, no?

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-26 Thread Wanpeng Li
2018-03-27 6:32 GMT+08:00 Davidlohr Bueso : > On Mon, 26 Mar 2018, Wanpeng Li wrote: > >> I didn't see any issue when testing this patch, could you elaborate >> what's the bulky mechanism and how it conflicts with early smp bootup >> stages? In addition, do you mean the xen fix is also not suitable

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-26 Thread Davidlohr Bueso
On Mon, 26 Mar 2018, Wanpeng Li wrote: I didn't see any issue when testing this patch, could you elaborate what's the bulky mechanism and how it conflicts with early smp bootup stages? In addition, do you mean the xen fix is also not suitable? I have nothing against your patch (or the xen one

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-26 Thread Wanpeng Li
2018-03-26 8:27 GMT+08:00 Davidlohr Bueso : > On Sat, 24 Mar 2018, Wanpeng Li wrote: > >> Note: Peterz pointed out in the IRC we have to audit all the architectures >> that >> implement smp_prepare_boot_cpu() to see what they depend on if we want to >> move >> jump_label_init() before smp_prepare_b

Re: [PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-25 Thread Davidlohr Bueso
On Sat, 24 Mar 2018, Wanpeng Li wrote: Note: Peterz pointed out in the IRC we have to audit all the architectures that implement smp_prepare_boot_cpu() to see what they depend on if we want to move jump_label_init() before smp_prepare_boot_cpu(). So what this patch does is similar to the issue w

[PATCH 1/2] KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized

2018-03-24 Thread Wanpeng Li
From: Wanpeng Li static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init() WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 static_key_disable_cpuslocked+0x61/0x80 RIP: 0010:static_key_disable_cpuslocked+0x61/0x80 Call Trace: static_k