Skip to content

Fix broken suspend on some machines

Grzegorz Uriasz xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 6 repliesIn review
  2. v21 patch 3 repliesSuperseded
  3. v11 patch 11 repliesSuperseded

Changes in v3 from the cover letter

- Check pm timer bit offset
- Warn about acpi firmware bugs
- Drop int cast in init_pmtimer
- Merge if's in init_pmtimer

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1x86/acpi: Use FADT flags to determine the PMTMR widthxen/arch/x86/acpi/boot.c xen/arch/x86/time.c xen/include/acpi/acmacros.h+27 -126 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchJan BeulichPaul Durrant
1/1R-b Release-acked-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/1] Fix broken suspend on some machines

Hi,

The included patch is a small subset of a bigger patch set spanning few projects aiming to isolate the GPU in Qubes OS to a dedicated security domain. I'm doing this together with 3 colleagues as part of our Bachelors thesis. While working on the project we came across 2 machines - newer gaming laptops on which the suspend functionality on unmodified xen is completely broken.

The affected machines were able to suspend but not always resume. Even if the resume succeeded then the kernel time was trashed in the dmesg log and the machine never managed to suspend another time. After changing the xen clock to hpet, suspend started working again both on stock xen and Qubes OS - this indicates a bug in the ACPI PM Timer. After disassembling the FADT ACPI table on the ASUS FX504GM I understood that the reported bit width is 32 bits but the flags indicate a 24 bit PM timer.

The included patch fixes the suspend feature on ASUS FX504GM and hopefully other laptops - Probably next week I will test this patch on my friend's laptop where this issue also occurs(suspend is broken, trashed kernel time after resume).

Changes in v2:
- Check pm timer access width
- Proper timer width is set when xpm block is not present
- Cleanup timer initialization

Changes in v3:
- Check pm timer bit offset
- Warn about acpi firmware bugs
- Drop int cast in init_pmtimer
- Merge if's in init_pmtimer

Grzegorz Uriasz (1):
x86/acpi: Use FADT flags to determine the PMTMR width

 xen/arch/x86/acpi/boot.c    | 19 +++++++++++++++----
 xen/arch/x86/time.c         | 12 ++++--------
 xen/include/acpi/acmacros.h |  8 ++++++++
 3 files changed, 27 insertions(+), 12 deletions(-)
Signature · 1 line
2.27.0