public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Naman Jain <namjain@linux.microsoft.com>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1.y] x86/hyperv: Fix hv tsc page based sched_clock for hibernation
Date: Fri,  3 Jan 2025 09:55:22 -0500	[thread overview]
Message-ID: <20250102145407-b7cbcab3100755ca@stable.kernel.org> (raw)
In-Reply-To: <20250102144218.1848-1-namjain@linux.microsoft.com>

[ Sasha's backport helper bot ]

Hi,

Found matching upstream commit: bcc80dec91ee745b3d66f3e48f0ec2efdea97149


Status in newer kernel trees:
6.12.y | Present (different SHA1: bacd0498dea0)
6.6.y | Present (different SHA1: 4c8d45af23c2)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  bcc80dec91ee ! 1:  549d5b40b85d x86/hyperv: Fix hv tsc page based sched_clock for hibernation
    @@ Commit message
         Link: https://lore.kernel.org/r/20240917053917.76787-1-namjain@linux.microsoft.com
         Signed-off-by: Wei Liu <wei.liu@kernel.org>
         Message-ID: <20240917053917.76787-1-namjain@linux.microsoft.com>
    +    (cherry picked from commit bcc80dec91ee745b3d66f3e48f0ec2efdea97149)
    +    Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
     
      ## arch/x86/kernel/cpu/mshyperv.c ##
     @@ arch/x86/kernel/cpu/mshyperv.c: static void hv_machine_crash_shutdown(struct pt_regs *regs)
      	hyperv_cleanup();
      }
    - #endif /* CONFIG_CRASH_DUMP */
    + #endif /* CONFIG_KEXEC_CORE */
     +
     +static u64 hv_ref_counter_at_suspend;
     +static void (*old_save_sched_clock_state)(void);
    @@ arch/x86/kernel/cpu/mshyperv.c: static void __init ms_hyperv_init_platform(void)
      	/* Register Hyper-V specific clocksource */
      	hv_init_clocksource();
     +	x86_setup_ops_for_tsc_pg_clock();
    - 	hv_vtl_init_platform();
      #endif
      	/*
    + 	 * TSC should be marked as unstable only after Hyper-V
     
      ## drivers/clocksource/hyperv_timer.c ##
     @@
    @@ drivers/clocksource/hyperv_timer.c
      /*
       * If false, we're using the old mechanism for stimer0 interrupts
     @@ drivers/clocksource/hyperv_timer.c: static void resume_hv_clock_tsc(struct clocksource *arg)
    - 	hv_set_msr(HV_MSR_REFERENCE_TSC, tsc_msr.as_uint64);
    + 	hv_set_register(HV_REGISTER_REFERENCE_TSC, tsc_msr.as_uint64);
      }
      
     +/*
    @@ drivers/clocksource/hyperv_timer.c: static void resume_hv_clock_tsc(struct clock
      {
     
      ## include/clocksource/hyperv_timer.h ##
    -@@ include/clocksource/hyperv_timer.h: extern void hv_remap_tsc_clocksource(void);
    - extern unsigned long hv_get_tsc_pfn(void);
    +@@ include/clocksource/hyperv_timer.h: extern void hv_init_clocksource(void);
    + 
      extern struct ms_hyperv_tsc_page *hv_get_tsc_page(void);
      
     +extern void hv_adj_sched_clock_offset(u64 offset);
     +
    - static __always_inline bool
    - hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg,
    - 		     u64 *cur_tsc, u64 *time)
    + static inline notrace u64
    + hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg, u64 *cur_tsc)
    + {
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

      reply	other threads:[~2025-01-03 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-23 10:37 FAILED: patch "[PATCH] x86/hyperv: Fix hv tsc page based sched_clock for hibernation" failed to apply to 6.1-stable tree gregkh
2025-01-02 14:42 ` [PATCH 6.1.y] x86/hyperv: Fix hv tsc page based sched_clock for hibernation Naman Jain
2025-01-03 14:55   ` Sasha Levin [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=20250102145407-b7cbcab3100755ca@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=stable@vger.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