linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] x86: Preserve ACPI memory area during hibernation
Date: Tue, 15 Feb 2022 15:10:43 +0100	[thread overview]
Message-ID: <CAJZ5v0jV5H9a66utA5Ch--X2iiV-MOSmX6CVL6s+veYpzOaezg@mail.gmail.com> (raw)
In-Reply-To: <f6e5f716-f191-c126-cc81-cf872ad4e750@linux.intel.com>

On Tue, Feb 15, 2022 at 1:22 PM Amadeusz Sławiński
<amadeuszx.slawinski@linux.intel.com> wrote:
>
> On 2/14/2022 8:34 PM, Rafael J. Wysocki wrote:
> > On 1/21/2022 11:39 AM, Amadeusz Sławiński wrote:
> >> When overriding NHLT ACPI-table tests show that on some platforms
> >> there is problem that NHLT contains garbage after hibernation/resume
> >> cycle.
> >>
> >> Problem stems from the fact that ACPI override performs early memory
> >> allocation using memblock_phys_alloc_range() in
> >> memblock_phys_alloc_range(). This memory block is later being marked as
> >> ACPI memory block in arch_reserve_mem_area(). Later when memory areas
> >> are considered for hibernation it is being marked as nosave in
> >> e820__register_nosave_regions().
> >>
> >> Fix this by skipping ACPI memory area altogether when considering areas
> >> to mark as nosave.
> >
> > This patch looks correct to me and I'm going to apply it as 5.18
> > material unless there are any objections or concerns (in which case
> > please let me know).
> >
> >
>
> Well, what do you know? I've checked with validation team to make sure
> that it works as expected and while it causes no problem on almost all
> platforms and fixes problem with NHLT ACPI-table override, there is this
> one platform where it causes oops on hibernation which of course is gone
> after reverting the patch.
>
>   ? set_direct_map_default_noflush+0x130/0x130
>   ? memory_bm_test_bit+0x29/0x60
>   saveable_page+0xce/0xf2
>   count_data_pages+0x50/0x76
>   hibernate_preallocate_memory+0x9c/0x377
>   ? __mutex_lock_slowpath+0x20/0x20
>   hibernation_snapshot+0x1cf/0x610
>   snapshot_ioctl+0x3d2/0x690
>   ? snapshot_release+0xd0/0xd0
>   ? new_sync_write+0x36b/0x390
>   __x64_sys_ioctl+0x6dc/0xe20
>   ? vfs_fileattr_set+0x520/0x520
>   ? _raw_read_unlock+0x2a/0x50
>   ? __kasan_check_read+0x11/0x20
>   ? vfs_write+0x131/0x3d0
>   ? ksys_write+0x13b/0x170
>   ? debug_smp_processor_id+0x17/0x20
>   ? fpregs_assert_state_consistent+0x5f/0x70
>   ? exit_to_user_mode_prepare+0x3e/0x170
>   do_syscall_64+0x43/0x90
>   entry_SYSCALL_64_after_hwframe+0x44/0xae
>
> Above trace points at functions using pfn, so I suspect there may be
> need for some additional checks, but I will need to investigate.
> I guess you can skip this patch for now, until I figure what exactly is
> going on.

I'll do that, thanks!

      reply	other threads:[~2022-02-15 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 10:39 [PATCH] x86: Preserve ACPI memory area during hibernation Amadeusz Sławiński
2022-02-14 19:34 ` Rafael J. Wysocki
2022-02-15 12:22   ` Amadeusz Sławiński
2022-02-15 14:10     ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZ5v0jV5H9a66utA5Ch--X2iiV-MOSmX6CVL6s+veYpzOaezg@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=cezary.rojewski@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).