Re: [PATCH v4 02/23] x86/cpu: report SMX, TXT and SKINIT capabilities

Andrew Cooper <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 20/08/2026 1:59 pm, Teddy Astie wrote:
> Le 02/08/2026 à 15:14, Sergii Dmytruk a écrit :
>> From: Michał Żygowski <[email protected]>
>>
>> Report TXT capabilities so that dom0 can query the Intel TXT or AMD
>> SKINIT support information using xl dmesg.
>>
>> Signed-off-by: Michał Żygowski <[email protected]>
>> Signed-off-by: Sergii Dmytruk <[email protected]>
>> ---
>>
>> Notes:
>>      v4: fixed conditions for not reporting capabilities (match
>> correct comments)
>>      v4: define GETSEC_* macros used only by xen/arch/x86/cpu/intel.c
>> in the file itself (to not depend on Slaunch)
>>      v4: don't postpone restoring state of X86_CR4_SMXE, do it before
>> printing test results
>>
>>   xen/arch/x86/cpu/amd.c   | 16 +++++++++++++
>>   xen/arch/x86/cpu/cpu.h   |  1 +
>>   xen/arch/x86/cpu/hygon.c |  1 +
>>   xen/arch/x86/cpu/intel.c | 50 ++++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 68 insertions(+)
>>
>> diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
>> index 70783c9a0a..5ea16ad8a8 100644
>> --- a/xen/arch/x86/cpu/amd.c
>> +++ b/xen/arch/x86/cpu/amd.c
>> @@ -617,6 +617,21 @@ void amd_process_freq(const struct cpuinfo_x86 *c,
>>           *low_mhz = amd_parse_freq(c->family, lo);
>>   }
>>   +void amd_log_skinit(const struct cpuinfo_x86 *c)
>> +{
>> +    /*
>> +     * Run only on BSP and not during resume to report the
>> capability only once.
>> +     */
>> +    if ( system_state == SYS_STATE_resume || smp_processor_id() )
>> +        return;
>> +
>> +    printk("CPU: SKINIT capability ");
>> +    if ( !test_bit(X86_FEATURE_SKINIT, &boot_cpu_data.x86_capability) )
>> +        printk("not supported\n");
>> +    else
>> +        printk("supported\n");
>> +}
>> +
>>   void cf_check early_init_amd(struct cpuinfo_x86 *c)
>>   {
>>       if (c == &boot_cpu_data)
>> @@ -1325,6 +1340,7 @@ static void cf_check init_amd(struct
>> cpuinfo_x86 *c)
>>           setup_force_cpu_cap(X86_FEATURE_XEN_REP_MOVSB);
>>         amd_log_freq(c);
>> +    amd_log_skinit(c);
>>   }
>
> On which Xen branch this patch is based ?
>
> early_init_amd() doesn't seem to have amd_log_freq (which is in
> init_amd instead).

See the cover letter:

base-commit: 7c77acd452fb6a3079661e75ebb5cf23ed985cc7

$ git describe 7c77acd452fb6a3079661e75ebb5cf23ed985cc7
4.23-dev-119-g7c77acd452fb

so it's something recent.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.