From: Dave Hansen <dave.hansen@intel.com>
To: Vishal Annapurve <vannapurve@google.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
pbonzini@redhat.com, seanjc@google.com, erdemaktas@google.com,
ackerleytng@google.com, jxgao@google.com, sagis@google.com,
oupton@google.com, pgonda@google.com,
dave.hansen@linux.intel.com, linux-coco@lists.linux.dev,
chao.p.peng@linux.intel.com, isaku.yamahata@gmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH V2 1/1] x86/tdx: Route safe halt execution via tdx_safe_halt()
Date: Mon, 3 Feb 2025 10:06:28 -0800 [thread overview]
Message-ID: <40418980-6e5b-48eb-bc35-7ffaf3221fd9@intel.com> (raw)
In-Reply-To: <CAGtprH-n=cfH_BJAmiNMoRbqq0XdGCf3RE67TYW8z7RARnsCiQ@mail.gmail.com>
On 1/31/25 18:32, Vishal Annapurve wrote:
...
> Are you hinting towards a model where TDX guest prohibits such call
> sites from being configured? I am not sure if it's a sustainable model
> if we just rely on the host not advertising these features as the
> guest kernel can still add new paths that are not controlled by the
> host that lead to *_safe_halt().
Let's say we required PARAVIRT_XXL for TDX guests and had TDX setup do:
static const typeof(pv_ops) tdx_irq_ops __initconst = {
.irq = {
.safe_halt = tdx_safe_halt,
},
};
We could get rid of a _bit_ of what TDX is doing now, like:
} 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);
and it would also fix this issue. Right?
This commit:
bfe6ed0c6727 ("x86/tdx: Add HLT support for TDX guests")
Makes it seem totally possible:
> Alternative choices like PV ops have been considered for adding
> safe_halt() support. But it was rejected because HLT paravirt calls
> only exist under PARAVIRT_XXL, and enabling it in TDX guest just for
> safe_halt() use case is not worth the cost.
and honestly it's seeming more "worth the cost" now since that partial
approach has a bug and might have more bugs in the future.
next prev parent reply other threads:[~2025-02-03 18:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 23:25 [PATCH V2 1/1] x86/tdx: Route safe halt execution via tdx_safe_halt() Vishal Annapurve
2025-01-30 9:27 ` Kirill A. Shutemov
2025-01-30 17:24 ` Vishal Annapurve
2025-01-30 18:48 ` Kirill A. Shutemov
2025-01-30 19:45 ` Vishal Annapurve
2025-01-31 8:13 ` Kirill A. Shutemov
2025-02-01 2:32 ` Vishal Annapurve
2025-02-03 15:59 ` Kirill A. Shutemov
2025-02-03 17:01 ` Vishal Annapurve
2025-02-03 20:06 ` Kirill A. Shutemov
2025-02-03 18:06 ` Dave Hansen [this message]
2025-02-03 20:09 ` Kirill A. Shutemov
2025-02-03 21:19 ` Dave Hansen
2025-02-03 22:08 ` Vishal Annapurve
2025-02-04 17:32 ` Dave Hansen
2025-02-04 18:52 ` Vishal Annapurve
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=40418980-6e5b-48eb-bc35-7ffaf3221fd9@intel.com \
--to=dave.hansen@intel.com \
--cc=ackerleytng@google.com \
--cc=chao.p.peng@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=erdemaktas@google.com \
--cc=isaku.yamahata@gmail.com \
--cc=jxgao@google.com \
--cc=kirill@shutemov.name \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=pgonda@google.com \
--cc=sagis@google.com \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
--cc=vannapurve@google.com \
--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