lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Feb 2021 14:56:36 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     Sunil Muthuswamy <sunilmut@...rosoft.com>,
        Matheus Castello <matheus@...tello.eng.br>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <liuwe@...rosoft.com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, vkuznets <vkuznets@...hat.com>
CC:     KY Srinivasan <kys@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3] x86/Hyper-V: Support for free page reporting

From: Michael Kelley <mikelley@...rosoft.com> Sent: Thursday, February 4, 2021 3:36 PM
> 
> From: Sunil Muthuswamy <sunilmut@...rosoft.com> Sent: Wednesday, January 6, 2021
> 3:21 PM
> >
> > 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 leverage the Hyper-V cold memory
> > discard hint hypercall to report/free these pages back to the host.
> >
> > Signed-off-by: Sunil Muthuswamy <sunilmut@...rosoft.com>
> > Tested-by: Matheus Castello <matheus@...tello.eng.br>
> > ---
> > In V2:
> > - Addressed feedback comments
> > - Added page reporting config option tied to hyper-v balloon config
> >
> > In V3:
> > - Addressed feedback from Vitaly
> > ---
> >  arch/x86/hyperv/hv_init.c         | 31 +++++++++++
> >  arch/x86/kernel/cpu/mshyperv.c    |  6 +-
> >  drivers/hv/Kconfig                |  1 +
> >  drivers/hv/hv_balloon.c           | 93 +++++++++++++++++++++++++++++++
> >  include/asm-generic/hyperv-tlfs.h | 32 ++++++++++-
> >  include/asm-generic/mshyperv.h    |  2 +
> >  6 files changed, 162 insertions(+), 3 deletions(-)
> >

[snip]

> > +
> > +	BUILD_BUG_ON(PAGE_REPORTING_CAPACITY > HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES);
> > +	dm_device.pr_dev_info.report = hv_free_page_report;
> > +	ret = page_reporting_register(&dm_device.pr_dev_info);
> > +	if (ret < 0) {
> > +		dm_device.pr_dev_info.report = NULL;
> > +		pr_err("Failed to enable cold memory discard: %d\n", ret);
> > +	} else {
> > +		pr_info("Cold memory discard hint enabled\n");
> > +	}
> 
> Should the above two messages be prefixed with "Hyper-V: "?

Ignore the above comment.  The lines will get prefixed with
"hv_balloon:", which is fine.

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ