From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
"Julien Grall" <julien@xen.org>
Subject: [PATCH 1/4] x86/ACPI: fix mapping of FACS
Date: Mon, 23 Nov 2020 13:39:55 +0100 [thread overview]
Message-ID: <81a8c2f0-ae9b-98e0-f5c5-d32b423db491@suse.com> (raw)
In-Reply-To: <7f895b0e-f46f-8fe2-b0ac-e0503ef06a1f@suse.com>
acpi_fadt_parse_sleep_info() runs when the system is already in
SYS_STATE_boot. Hence its direct call to __acpi_map_table() won't work
anymore. This call should probably have been replaced long ago already,
as the layering violation hasn't been necessary for quite some time.
Fixes: 1c4aa69ca1e1 ("xen/acpi: Rework acpi_os_map_memory() and acpi_os_unmap_memory()")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/acpi/boot.c
+++ b/xen/arch/x86/acpi/boot.c
@@ -422,8 +422,7 @@ acpi_fadt_parse_sleep_info(struct acpi_t
if (!facs_pa)
goto bad;
- facs = (struct acpi_table_facs *)
- __acpi_map_table(facs_pa, sizeof(struct acpi_table_facs));
+ facs = acpi_os_map_memory(facs_pa, sizeof(*facs));
if (!facs)
goto bad;
@@ -448,11 +447,16 @@ acpi_fadt_parse_sleep_info(struct acpi_t
offsetof(struct acpi_table_facs, firmware_waking_vector);
acpi_sinfo.vector_width = 32;
+ acpi_os_unmap_memory(facs, sizeof(*facs));
+
printk(KERN_INFO PREFIX
" wakeup_vec[%"PRIx64"], vec_size[%x]\n",
acpi_sinfo.wakeup_vector, acpi_sinfo.vector_width);
return;
-bad:
+
+ bad:
+ if (facs)
+ acpi_os_unmap_memory(facs, sizeof(*facs));
memset(&acpi_sinfo, 0,
offsetof(struct acpi_sleep_info, sleep_control));
memset(&acpi_sinfo.sleep_status + 1, 0,
next prev parent reply other threads:[~2020-11-23 12:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 12:38 [PATCH 0/4] x86: ACPI and DMI table mapping fixes Jan Beulich
2020-11-23 12:39 ` Jan Beulich [this message]
2020-11-23 14:30 ` [PATCH 1/4] x86/ACPI: fix mapping of FACS Roger Pau Monné
2020-12-29 10:56 ` Roger Pau Monné
2021-01-04 13:18 ` Jan Beulich
2020-11-23 12:40 ` [PATCH 2/4] x86/ACPI: fix S3 wakeup vector mapping Jan Beulich
2020-11-23 15:24 ` Roger Pau Monné
2020-11-23 15:30 ` Jan Beulich
2020-11-23 16:07 ` Roger Pau Monné
2020-11-23 16:14 ` Andrew Cooper
2020-11-24 11:04 ` Jan Beulich
2020-11-30 13:02 ` Jan Beulich
2020-12-23 15:09 ` Ping: " Jan Beulich
2020-12-29 10:54 ` Roger Pau Monné
2021-01-04 14:03 ` Jan Beulich
2021-01-04 15:13 ` Roger Pau Monné
2020-12-29 10:51 ` Roger Pau Monné
2021-01-04 14:10 ` Jan Beulich
2020-11-23 12:40 ` [PATCH 3/4] x86/DMI: fix table mapping when one lives above 1Mb Jan Beulich
2020-11-23 15:41 ` Roger Pau Monné
2020-11-23 12:41 ` [PATCH 4/4] x86/ACPI: don't invalidate S5 data when S3 wakeup vector cannot be determined Jan Beulich
2020-11-23 15:44 ` Roger Pau Monné
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=81a8c2f0-ae9b-98e0-f5c5-d32b423db491@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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).