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:   Fri, 15 Jul 2022 15:27:30 +0200
From:   Grzegorz Jaszczyk <jaz@...ihalf.com>
To:     "Limonciello, Mario" <Mario.Limonciello@....com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Hans de Goede <hdegoede@...hat.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dmy@...ihalf.com" <dmy@...ihalf.com>,
        "dbehr@...gle.com" <dbehr@...gle.com>,
        "upstream@...ihalf.com" <upstream@...ihalf.com>,
        "zide.chen@...el.corp-partner.google.com" 
        <zide.chen@...el.corp-partner.google.com>,
        Len Brown <lenb@...nel.org>, Mark Gross <markgross@...nel.org>,
        Pavel Machek <pavel@....cz>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Sachi King <nakato@...ato.io>,
        "open list:ACPI" <linux-acpi@...r.kernel.org>,
        "open list:X86 PLATFORM DRIVERS" 
        <platform-driver-x86@...r.kernel.org>,
        "open list:HIBERNATION (aka Software Suspend, aka swsusp)" 
        <linux-pm@...r.kernel.org>
Subject: Re: [RFC PATCH 0/2] x86: allow to notify host about guest entering s2idle

czw., 7 lip 2022 o 17:27 Limonciello, Mario
<Mario.Limonciello@....com> napisaƂ(a):
>
> [Public]
>
>
>
> > -----Original Message-----
> > From: Grzegorz Jaszczyk <jaz@...ihalf.com>
> > Sent: Thursday, July 7, 2022 07:53
> > To: linux-kernel@...r.kernel.org
> > Cc: jaz@...ihalf.com; dmy@...ihalf.com; Limonciello, Mario
> > <Mario.Limonciello@....com>; seanjc@...gle.com; dbehr@...gle.com;
> > upstream@...ihalf.com; zide.chen@...el.corp-partner.google.com; Rafael J.
> > Wysocki <rafael@...nel.org>; Len Brown <lenb@...nel.org>; Hans de Goede
> > <hdegoede@...hat.com>; Mark Gross <markgross@...nel.org>; Pavel Machek
> > <pavel@....cz>; Mika Westerberg <mika.westerberg@...ux.intel.com>; Sachi
> > King <nakato@...ato.io>; open list:ACPI <linux-acpi@...r.kernel.org>; open
> > list:X86 PLATFORM DRIVERS <platform-driver-x86@...r.kernel.org>; open
> > list:HIBERNATION (aka Software Suspend, aka swsusp) <linux-
> > pm@...r.kernel.org>
> > Subject: [RFC PATCH 0/2] x86: allow to notify host about guest entering s2idle
> >
> > According to the mailing list discussion [1] about the preferred approach
> > for notifying hypervisor/VMM about guest entering s2idle state this RFC was
> > implemented.
> >
> > Instead of original hypercall based approach, which involves KVM change [2]
> > and makes it hypervisor specific, implement different mechanism, which
> > takes advantage of MMIO/PIO trapping and makes it hypervisor independent.
> >
> > Patch #1 extends S2Idle ops by new notify handler which will be invoked as
> > a very last command before system actually enters S2Idle states. It also
> > allows to register and use driver specific notification hook which is used
> > in patch #2.
> >
> > Patch #2 introduces new driver for virtual PMC, which registers
> > acpi_s2idle_dev_ops's notify handler. Its implementation is based on an
> > ACPI _DSM evaluation, which in turn can perform MMIO access and allow to
> > trap and therefore notify the VMM about guest entering S2Idle state.
> >
> > Please see individual patches and commit logs for more verbose description.
> >
> > This patchset is marked as RFC since patch #2 implements driver for non
> > existing device "HYPE0001", which ACPI ID was not registered yet.
> > Furthermore the required registration process [3] will not be started
> > before getting positive feedback about this patchset.
> >
> > [1]
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> > ork.kernel.org%2Fproject%2Flinux-pm%2Fpatch%2F20220609110337.1238762-
> > 2-
> > jaz%40semihalf.com%2F&amp;data=05%7C01%7Cmario.limonciello%40amd.co
> > m%7C514a545cf9aa4a7b6d9508da6018138b%7C3dd8961fe4884e608e11a82d9
> > 94e183d%7C0%7C0%7C637927953769026163%7CUnknown%7CTWFpbGZsb3d8
> > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > 7C3000%7C%7C%7C&amp;sdata=RIDiHUNpHUsBYyK3pwGND%2BWJoioXZNCKt
> > mML2%2F1LAxs%3D&amp;reserved=0
> > [2]
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> > ork.kernel.org%2Fproject%2Flinux-pm%2Fpatch%2F20220609110337.1238762-
> > 3-
> > jaz%40semihalf.com%2F&amp;data=05%7C01%7Cmario.limonciello%40amd.co
> > m%7C514a545cf9aa4a7b6d9508da6018138b%7C3dd8961fe4884e608e11a82d9
> > 94e183d%7C0%7C0%7C637927953769026163%7CUnknown%7CTWFpbGZsb3d8
> > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > 7C3000%7C%7C%7C&amp;sdata=BqykAwWzO%2BfeGPSsAqTmX13O8F0Vvm3G
> > PL56EpmdSJ8%3D&amp;reserved=0
> > [3]
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuefi.org
> > %2FPNP_ACPI_Registry&amp;data=05%7C01%7Cmario.limonciello%40amd.co
> > m%7C514a545cf9aa4a7b6d9508da6018138b%7C3dd8961fe4884e608e11a82d9
> > 94e183d%7C0%7C0%7C637927953769026163%7CUnknown%7CTWFpbGZsb3d8
> > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> > 7C3000%7C%7C%7C&amp;sdata=QXK52zFXJGEBm6xIv6IFeF7Xxgz4Yp5UmgLSQ
> > diXtlI%3D&amp;reserved=0
> >
> > Grzegorz Jaszczyk (2):
> >   suspend: extend S2Idle ops by new notify handler
> >   platform/x86: Add virtual PMC driver used for S2Idle
> >
> >  drivers/acpi/x86/s2idle.c       | 11 +++++
> >  drivers/platform/x86/Kconfig    |  7 ++++
> >  drivers/platform/x86/Makefile   |  1 +
> >  drivers/platform/x86/virt_pmc.c | 73 +++++++++++++++++++++++++++++++++
> >  include/linux/acpi.h            |  1 +
> >  include/linux/suspend.h         |  1 +
> >  kernel/power/suspend.c          |  4 ++
> >  7 files changed, 98 insertions(+)
> >  create mode 100644 drivers/platform/x86/virt_pmc.c
> >
> > --
> > 2.37.0.rc0.161.g10f37bed90-goog
>
> Thanks, you matched the implementation I was expecting.
> This looks fine by me.

Thank you Mario.

Rafael, Sean, Hans - could you please kindly tell if this approach is
ok by you? If so I will want to start the registration process of ACPI
ID required for this series.

Previously Mario suggested that maybe Linux Foundation could own the
namespace and ID for this Virtual PMC device - could you please advise
in this matter?

Thank you in advance,
Grzegorz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ