lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9bcd2857-e688-49e7-b3c9-7fa4bbf0b3e7@linux.intel.com>
Date: Fri, 14 Nov 2025 17:14:03 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Yan Zhao <yan.y.zhao@...el.com>, "Huang, Kai" <kai.huang@...el.com>
Cc: "quic_eberman@...cinc.com" <quic_eberman@...cinc.com>,
 "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "Li, Xiaoyao" <xiaoyao.li@...el.com>, "Du, Fan" <fan.du@...el.com>,
 "Hansen, Dave" <dave.hansen@...el.com>, "david@...hat.com"
 <david@...hat.com>, "thomas.lendacky@....com" <thomas.lendacky@....com>,
 "vbabka@...e.cz" <vbabka@...e.cz>, "tabba@...gle.com" <tabba@...gle.com>,
 "michael.roth@....com" <michael.roth@....com>,
 "seanjc@...gle.com" <seanjc@...gle.com>, "Weiny, Ira" <ira.weiny@...el.com>,
 "pbonzini@...hat.com" <pbonzini@...hat.com>,
 "Peng, Chao P" <chao.p.peng@...el.com>,
 "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
 "kas@...nel.org" <kas@...nel.org>, "Yamahata, Isaku"
 <isaku.yamahata@...el.com>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "Annapurve, Vishal" <vannapurve@...gle.com>,
 "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
 "Miao, Jun" <jun.miao@...el.com>,
 "zhiquan1.li@...el.com" <zhiquan1.li@...el.com>,
 "x86@...nel.org" <x86@...nel.org>, "pgonda@...gle.com" <pgonda@...gle.com>
Subject: Re: [RFC PATCH v2 02/23] x86/virt/tdx: Add SEAMCALL wrapper
 tdh_mem_page_demote()



On 11/12/2025 4:06 PM, Yan Zhao wrote:
> On Tue, Nov 11, 2025 at 05:15:22PM +0800, Huang, Kai wrote:
>> On Mon, 2025-09-01 at 17:08 +0800, Yan Zhao wrote:
>>>>> Do not handle TDX_INTERRUPTED_RESTARTABLE because SEAMCALL
>>>>> TDH_MEM_PAGE_DEMOTE does not check interrupts (including NMIs) for basic
>>>>> TDX (with or without Dynamic PAMT).
>>>> The cover letter mentions that there is a new TDX module in planning, which
>>>> disables the interrupt checking. I guess TDX module would need to have a
>>>> interface to report the change, KVM then decides to enable huge page support or
>>>> not for TDs?
>>> Yes. But I guess detecting TDX module version or if it supports certain feature
>>> is a generic problem. e.g., certain versions of TDX module have bugs in
>>> zero-step mitigation and may block vCPU entering.
>>>
>>> So, maybe it deserves a separate series?
>> Looking at the spec (TDX module ABI spec 348551-007US), is it enumerated via
>> TDX_FEATURES0.ENHANCED_DEMOTE_INTERRUPTIBILITY?
> Yes. I checked the unreleased TDX module code that enumerates this bit (starting
> from version TDX_1.5.28.00.972). TDH.MEM.PAGE.DEMOTE will not return
> TDX_INTERRUPTED_RESTARTABLE for L1 VMs.

According to the content pasted by Kai below, it just says there will be no
TDX_INTERRUPTED_RESTARTABLE for TDH.MEM.PAGE.DEMOTE if no L2 VMs.

KVM doesn't support TD partition yet, just for clarification,  what if the
demotion is for L1 VM, but there are L2 VMs configured?


>
>>    5.4.25.3.9.
>>
>>    Interruptibility
>>
>>    If the TD is not partitioned (i.e., it has been configured with no L2
>>    VMs), and the TDX Module enumerates
>>    TDX_FEATURES0.ENHANCED_DEMOTE_INTERRUPTIBILITY as 1, TDH.MEM.PAGE.DEMOTE
>>    is not interruptible.
>>
>> So if the decision is to not use 2M page when TDH_MEM_PAGE_DEMOTE can return
>> TDX_INTERRUPTED_RESTARTABLE, maybe we can just check this enumeration in
>> fault handler and always make mapping level as 4K?
> Thanks for this info! I think this is a very good idea and the right direction.
> If no objection, I'll update the code in this way.
>
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ