[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e298f80-5361-4376-a099-d3457c8cd349@intel.com>
Date: Wed, 30 Apr 2025 23:09:38 +0800
From: Zhiquan Li <zhiquan1.li@...el.com>
To: Dave Hansen <dave.hansen@...el.com>, Jun Miao <jun.miao@...el.com>,
<kirill.shutemov@...ux.intel.com>, <dave.hansen@...ux.intel.com>
CC: <x86@...nel.org>, <linux-coco@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <tglx@...utronix.de>, <mingo@...hat.com>,
<bp@...en8.de>, "Du, Fan" <fan.du@...el.com>
Subject: Re: [V2 PATCH] x86/tdx: add VIRT_CPUID2 virtualization if REDUCE_VE
was not successful
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
Powered by blists - more mailing lists