RE: [EXTERNAL] Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-06 Thread Sunil Muthuswamy
> > +// Bit mask of the extended capability to query: see HV_EXT_CAPABILITY_xxx > > Please don't use '//' comments in Linux (here and below) Will fix in v3. > > + /* > > +* Repurpose the input page arg to accept output from Hyper-V for > > +* now because this is the only call that needs

Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-06 Thread Wei Liu
On Wed, Jan 06, 2021 at 05:12:54PM +0100, Vitaly Kuznetsov wrote: > Wei Liu writes: > > > On Wed, Jan 06, 2021 at 02:28:20PM +0100, Vitaly Kuznetsov wrote: > > [...] > >> > >> > +bool hv_query_ext_cap(u64 cap_query) > >> > +{ > >> > +u64 *cap; > >> > +unsigned long flags; > >> >

Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-06 Thread Vitaly Kuznetsov
Wei Liu writes: > On Wed, Jan 06, 2021 at 02:28:20PM +0100, Vitaly Kuznetsov wrote: > [...] >> >> > +bool hv_query_ext_cap(u64 cap_query) >> > +{ >> > + u64 *cap; >> > + unsigned long flags; >> > + u64 ext_cap = 0; >> > + >> > + /* >> > + * Querying extended capabilities is an extended hyp

Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-06 Thread Wei Liu
On Wed, Jan 06, 2021 at 02:28:20PM +0100, Vitaly Kuznetsov wrote: [...] > > > +bool hv_query_ext_cap(u64 cap_query) > > +{ > > + u64 *cap; > > + unsigned long flags; > > + u64 ext_cap = 0; > > + > > + /* > > +* Querying extended capabilities is an extended hypercall. Check if the > > +

Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-06 Thread Vitaly Kuznetsov
Sunil Muthuswamy writes: > Linux has support for free page reporting now (36e66c554b5c) for > virtualized environment. On Hyper-V when virtually backed VMs are > configured, Hyper-V will advertise cold memory discard capability, > when supported. This patch adds the support to hook into the free

[PATCH v2] x86/Hyper-V: Support for free page reporting

2021-01-05 Thread Sunil Muthuswamy
Linux has support for free page reporting now (36e66c554b5c) for virtualized environment. On Hyper-V when virtually backed VMs are configured, Hyper-V will advertise cold memory discard capability, when supported. This patch adds the support to hook into the free page reporting infrastructure and l