From: Zhiquan Li <zhiquan1.li@intel.com>
To: Dave Hansen <dave.hansen@intel.com>,
Jun Miao <jun.miao@intel.com>, <kirill.shutemov@linux.intel.com>,
<dave.hansen@linux.intel.com>
Cc: <x86@kernel.org>, <linux-coco@lists.linux.dev>,
<linux-kernel@vger.kernel.org>, <tglx@linutronix.de>,
<mingo@redhat.com>, <bp@alien8.de>, "Du, Fan" <fan.du@intel.com>
Subject: Re: [V2 PATCH] x86/tdx: add VIRT_CPUID2 virtualization if REDUCE_VE was not successful
Date: Wed, 30 Apr 2025 23:09:38 +0800 [thread overview]
Message-ID: <0e298f80-5361-4376-a099-d3457c8cd349@intel.com> (raw)
In-Reply-To: <e8d3fe25-0f97-4edd-abad-dc6b96430965@intel.com>
On 2025/4/30 21:44, Dave Hansen wrote:
>> Currently the most customer's complaints come from the CPUID leaf 0x2
>> not virtualization, and most of access come from user space. Is it
>> appropriate for such behavior directly cause a guest kernel panic?
> If a VMM doesn't properly configure topology properly and allows
> REDUCE_VE, then panic. They obviously got something wrong because that
> configuration doesn't make any sense.
OK, I agree with you. Is it better to simplify the logic like this:
static void reduce_unnecessary_ve(void)
{
u64 configured;
/* Has the VMM provided a valid topology configuration? */
tdg_vm_rd(TDCS_TOPOLOGY_ENUM_CONFIGURED, &configured);
if (!configured)
panic("VMM did not configure X2APIC_IDs properly\n");
tdg_vm_wr(TDCS_TD_CTLS, TD_CTLS_REDUCE_VE, TD_CTLS_REDUCE_VE);
}
Since merely fall back to enable ENUM_TOPOLOGY isn't enough, the guest
still suffering the CPUID leaf 0x2 not virtualization regression, like
the glibc bug. Full REDUCE_VE is really expected.
Best Regards,
Zhiquan
next prev parent reply other threads:[~2025-04-30 14:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 14:31 [V2 PATCH 0/1][Bug Report] and Fix TDX cpuid0x2 #VE causing segment Jun Miao
2025-04-29 14:31 ` [V2 PATCH] x86/tdx: add VIRT_CPUID2 virtualization if REDUCE_VE was not successful Jun Miao
2025-04-29 14:50 ` Dave Hansen
2025-04-30 2:15 ` Zhiquan Li
2025-04-30 9:33 ` Kirill A. Shutemov
2025-04-30 11:10 ` Miao, Jun
2025-04-30 13:54 ` Kirill A. Shutemov
2025-04-30 14:39 ` Miao, Jun
2025-04-30 13:44 ` Dave Hansen
2025-04-30 15:09 ` Zhiquan Li [this message]
2025-04-30 15:02 ` Dave Hansen
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=0e298f80-5361-4376-a099-d3457c8cd349@intel.com \
--to=zhiquan1.li@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=fan.du@intel.com \
--cc=jun.miao@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®