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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Feb 2023 21:26:33 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Grzegorz Jaszczyk <jaz@...ihalf.com>
Cc:     linux-kernel@...r.kernel.org, rafael@...nel.org, dmy@...ihalf.com,
        tn@...ihalf.com, dbehr@...gle.com,
        zide.chen@...el.corp-partner.google.com, upstream@...ihalf.com,
        hdegoede@...hat.com, markgross@...nel.org, dtor@...gle.com,
        mario.limonciello@....com, linux-pm@...r.kernel.org,
        x86@...nel.org, platform-driver-x86@...r.kernel.org
Subject: Re: [RESEND RFCv2 1/1] platform/x86: Add virtual PMC driver used for
 S2Idle

On Thu, Feb 09, 2023, Grzegorz Jaszczyk wrote:
> Virtual PMC driver is meant for the guest VMs for the S2Idle
> notification. Its purpose is to register S2Idle dev ops check handler,
> which will evaluate ACPI _DSM just before the guest enters S2Idle power
> state.
> 
> This allows to trap on MMIO access done as a consequence of _DSM
> evaluation and therefore notify the VMM about the guest entering S2Idle
> state.
> 
> Signed-off-by: Grzegorz Jaszczyk <jaz@...ihalf.com>
> ---
> Changelog v1..v2:
> - Take advantage of acpi_s2idle_dev_ops's check() instead of notify()
> ---
>  drivers/platform/x86/Kconfig    |  7 ++++
>  drivers/platform/x86/Makefile   |  3 ++
>  drivers/platform/x86/virt_pmc.c | 73 +++++++++++++++++++++++++++++++++
>  3 files changed, 83 insertions(+)
>  create mode 100644 drivers/platform/x86/virt_pmc.c
> 
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 5692385e2d26..b7c3f98031d7 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1099,6 +1099,13 @@ config WINMATE_FM07_KEYS
>  	  buttons below the display. This module adds an input device
>  	  that delivers key events when these buttons are pressed.
>  
> +config VIRT_PMC
> +	tristate "Virt PMC"

Maybe spell out "Virtual Power Management Controller"?  See below.

> +	depends on ACPI && SUSPEND

I think it makes sense to take a dependency on HYPERVISOR_GUEST.  It's not strictly
required, but taking that dependency helps clarify that this is a guest-side thing,
e.g. "virtual PMC" in KVM-land means "virtual performance monitoring counter".

And IMO, disabling HYPERVISOR_GUEST should disable these type of guest-specific
features.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ