Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Vitaly Kuznetsov
Peter Zijlstra writes: > > I know you probably can't change the HV interface, but I'm thinking its > rather daft you have to specify a CPU at all for this. The HV can just > pick one and send the notification there, who cares. Generally speaking, hypervisor can't know if the CPU is offline (or e

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Vitaly Kuznetsov
Dmitry Safonov writes: > On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote: >> Peter Zijlstra writes: >> >>> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void)) >>> struct hv_reenlightenment_control re_ctrl = { >>> .vector = HYPERV_REENLIGHTENMENT_VECTOR, >>> .e

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Dmitry Safonov
On 6/14/19 1:27 PM, Peter Zijlstra wrote: > On Fri, Jun 14, 2019 at 12:50:51PM +0100, Dmitry Safonov wrote: >> On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote: >>> Peter Zijlstra writes: >>> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void)) struct hv_reenlightenment_contro

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Peter Zijlstra
On Fri, Jun 14, 2019 at 12:50:51PM +0100, Dmitry Safonov wrote: > On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote: > > Peter Zijlstra writes: > > > >> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void)) > >>struct hv_reenlightenment_control re_ctrl = { > >>.vector = HYPERV_

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Dmitry Safonov
On 6/14/19 11:08 AM, Vitaly Kuznetsov wrote: > Peter Zijlstra writes: > >> @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void)) >> struct hv_reenlightenment_control re_ctrl = { >> .vector = HYPERV_REENLIGHTENMENT_VECTOR, >> .enabled = 1, >> -.t

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Vitaly Kuznetsov
Peter Zijlstra writes: > @@ -182,7 +182,7 @@ void set_hv_tscchange_cb(void (*cb)(void)) > struct hv_reenlightenment_control re_ctrl = { > .vector = HYPERV_REENLIGHTENMENT_VECTOR, > .enabled = 1, > - .target_vp = hv_vp_index[smp_processor_id()] > +

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Peter Zijlstra
On Wed, Jun 12, 2019 at 12:17:24PM +0200, Vitaly Kuznetsov wrote: > Dmitry Safonov writes: > > > KVM support may be compiled as dynamic module, which triggers the > > following splat on modprobe: > > > > KVM: vmx: using Hyper-V Enlightened VMCS > > BUG: using smp_processor_id() in preemptible [

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-14 Thread Vitaly Kuznetsov
Thomas Gleixner writes: > On Wed, 12 Jun 2019, Vitaly Kuznetsov wrote: >> Dmitry Safonov writes: >> > diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c >> > index 1608050e9df9..0bdd79ecbff8 100644 >> > --- a/arch/x86/hyperv/hv_init.c >> > +++ b/arch/x86/hyperv/hv_init.c >> > @@

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-13 Thread Thomas Gleixner
On Wed, 12 Jun 2019, Vitaly Kuznetsov wrote: > Dmitry Safonov writes: > > diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c > > index 1608050e9df9..0bdd79ecbff8 100644 > > --- a/arch/x86/hyperv/hv_init.c > > +++ b/arch/x86/hyperv/hv_init.c > > @@ -91,7 +91,7 @@ EXPORT_SYMBOL_GPL(h

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-12 Thread Peter Zijlstra
On Tue, Jun 11, 2019 at 10:20:03PM +0100, Dmitry Safonov wrote: > KVM support may be compiled as dynamic module, which triggers the > following splat on modprobe: > > KVM: vmx: using Hyper-V Enlightened VMCS > BUG: using smp_processor_id() in preemptible [] code: modprobe/466 > caller i

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-12 Thread Vitaly Kuznetsov
Peter Zijlstra writes: > On Tue, Jun 11, 2019 at 10:20:03PM +0100, Dmitry Safonov wrote: >> KVM support may be compiled as dynamic module, which triggers the >> following splat on modprobe: >> >> KVM: vmx: using Hyper-V Enlightened VMCS >> BUG: using smp_processor_id() in preemptible [

Re: [PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-12 Thread Vitaly Kuznetsov
Dmitry Safonov writes: > KVM support may be compiled as dynamic module, which triggers the > following splat on modprobe: > > KVM: vmx: using Hyper-V Enlightened VMCS > BUG: using smp_processor_id() in preemptible [] code: modprobe/466 > caller is debug_smp_processor_id+0x17/0x19 > CP

[PATCH] x86/hyperv: Disable preemption while setting reenlightenment vector

2019-06-11 Thread Dmitry Safonov
KVM support may be compiled as dynamic module, which triggers the following splat on modprobe: KVM: vmx: using Hyper-V Enlightened VMCS BUG: using smp_processor_id() in preemptible [] code: modprobe/466 caller is debug_smp_processor_id+0x17/0x19 CPU: 0 PID: 466 Comm: modprobe Kdump: lo