On 11/9/23 03:55, Kai Huang wrote:
> #include <asm/page.h>
> @@ -1402,6 +1404,15 @@ static int __init tdx_init(void)
> return -ENODEV;
> }
>
> + /*
> + * At this point, hibernation_available() indicates whether or
> + * not hibernation support has been permanently disabled.
> + */
> + if (hibernation_available()) {
> + pr_err("initialization failed: Hibernation support is enabled\n");
> + return -ENODEV;
> + }
> +
> err = register_memory_notifier(&tdx_memory_nb);
> if (err) {
> pr_err("initialization failed: register_memory_notifier() failed (%d)\n",
> @@ -1417,6 +1428,11 @@ static int __init tdx_init(void)
> return -ENODEV;
> }
>
> +#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
> + pr_info("Disable ACPI S3. Turn off TDX in the BIOS to use ACPI S3.\n");
> + acpi_suspend_lowlevel = NULL;
> +#endif
Rafael, are you OK with how this patch ended up? An ack would be much
appreciated if so.