All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, vannapurve@google.com
Cc: Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.6.y] x86/tdx: Fix arch_safe_halt() execution for TDX VMs
Date: Thu, 10 Apr 2025 11:55:04 -0400	[thread overview]
Message-ID: <20250409225828-b7a54078f1a739bb@stable.kernel.org> (raw)
In-Reply-To: <20250408134717.304476-1-vannapurve@google.com>

[ Sasha's backport helper bot ]

Hi,

Summary of potential issues:
⚠️ Found matching upstream commit but patch is missing proper reference to it

Found matching upstream commit: 9f98a4f4e7216dbe366010b4cdcab6b220f229c4

Status in newer kernel trees:
6.14.y | Present (different SHA1: 8defd0d8678b)
6.13.y | Present (different SHA1: f88759f8f742)
6.12.y | Present (different SHA1: 7aff5ffe2c87)

Note: The patch differs from the upstream commit:
---
1:  9f98a4f4e7216 ! 1:  882c95e29bbba x86/tdx: Fix arch_safe_halt() execution for TDX VMs
    @@ Commit message
         Cc: Josh Poimboeuf <jpoimboe@redhat.com>
         Cc: stable@vger.kernel.org
         Link: https://lore.kernel.org/r/20250228014416.3925664-3-vannapurve@google.com
    +    (cherry picked from commit 9f98a4f4e7216dbe366010b4cdcab6b220f229c4)
     
      ## arch/x86/Kconfig ##
     @@ arch/x86/Kconfig: config INTEL_TDX_GUEST
    @@ arch/x86/coco/tdx/tdx.c
      #include <asm/insn-eval.h>
     +#include <asm/paravirt_types.h>
      #include <asm/pgtable.h>
    - #include <asm/set_memory.h>
      #include <asm/traps.h>
    + 
     @@ arch/x86/coco/tdx/tdx.c: static int handle_halt(struct ve_info *ve)
      	return ve_instr_len(ve);
      }
    @@ arch/x86/coco/tdx/tdx.c: void __cpuidle tdx_safe_halt(void)
     +
      static int read_msr(struct pt_regs *regs, struct ve_info *ve)
      {
    - 	struct tdx_module_args args = {
    + 	struct tdx_hypercall_args args = {
     @@ arch/x86/coco/tdx/tdx.c: void __init tdx_early_init(void)
    - 	x86_platform.guest.enc_kexec_begin	     = tdx_kexec_begin;
    - 	x86_platform.guest.enc_kexec_finish	     = tdx_kexec_finish;
    + 	x86_platform.guest.enc_cache_flush_required  = tdx_cache_flush_required;
    + 	x86_platform.guest.enc_tlb_flush_required    = tdx_tlb_flush_required;
      
     +	/*
     +	 * Avoid "sti;hlt" execution in TDX guests as HLT induces a #VE that
    @@ arch/x86/include/asm/tdx.h: void tdx_get_ve_info(struct ve_info *ve);
      
      bool tdx_early_handle_ve(struct pt_regs *regs);
      
    -@@ arch/x86/include/asm/tdx.h: void __init tdx_dump_td_ctls(u64 td_ctls);
    +@@ arch/x86/include/asm/tdx.h: int tdx_mcall_get_report0(u8 *reportdata, u8 *tdreport);
      #else
      
      static inline void tdx_early_init(void) { };
    @@ arch/x86/include/asm/tdx.h: void __init tdx_dump_td_ctls(u64 td_ctls);
      
     
      ## arch/x86/kernel/process.c ##
    -@@ arch/x86/kernel/process.c: void __init select_idle_routine(void)
    +@@ arch/x86/kernel/process.c: void select_idle_routine(const struct cpuinfo_x86 *c)
      		static_call_update(x86_idle, mwait_idle);
      	} else if (cpu_feature_enabled(X86_FEATURE_TDX_GUEST)) {
      		pr_info("using TDX aware idle routine\n");
     -		static_call_update(x86_idle, tdx_safe_halt);
     +		static_call_update(x86_idle, tdx_halt);
    - 	} else {
    + 	} else
      		static_call_update(x86_idle, default_idle);
    - 	}
    + }
---

Results of testing on various branches:

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

      reply	other threads:[~2025-04-10 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08  7:00 FAILED: patch "[PATCH] x86/tdx: Fix arch_safe_halt() execution for TDX VMs" failed to apply to 6.6-stable tree gregkh
2025-04-08 13:47 ` [PATCH 6.6.y] x86/tdx: Fix arch_safe_halt() execution for TDX VMs Vishal Annapurve
2025-04-10 15: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=20250409225828-b7a54078f1a739bb@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vannapurve@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.