RE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation

2019-09-30 Thread Dexuan Cui
> From: Vitaly Kuznetsov > Sent: Friday, September 27, 2019 2:05 AM > To: Dexuan Cui > > Dexuan Cui writes: > ... > > So, I'm pretty sure no IPI can happen between hv_suspend() and > hv_resume(). > > self-IPI is not supposed to happen either, since interrupts are disabled. > > > > IMO TLB flush

RE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation

2019-09-27 Thread Vitaly Kuznetsov
Dexuan Cui writes: >> From: Vitaly Kuznetsov >> Sent: Thursday, September 26, 2019 3:44 AM >> > [...] >> > +static int hv_suspend(void) >> > +{ >> > + union hv_x64_msr_hypercall_contents hypercall_msr; >> > + >> > + /* Reset the hypercall page */ >> > + rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_

RE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation

2019-09-26 Thread Dexuan Cui
> From: Vitaly Kuznetsov > Sent: Thursday, September 26, 2019 3:44 AM > > [...] > > +static int hv_suspend(void) > > +{ > > + union hv_x64_msr_hypercall_contents hypercall_msr; > > + > > + /* Reset the hypercall page */ > > + rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); > > + hyp

Re: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation

2019-09-26 Thread Vitaly Kuznetsov
Dexuan Cui writes: > This is needed for hibernation, e.g. when we resume the old kernel, we need > to disable the "current" kernel's hypercall page and then resume the old > kernel's. > > Signed-off-by: Dexuan Cui > Reviewed-by: Michael Kelley > --- > arch/x86/hyperv/hv_init.c | 33 +++