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: <08b373ac-01b2-4afe-81bd-85e3fe13615d@intel.com>
Date: Mon, 2 Dec 2024 08:36:03 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Chao Gao <chao.gao@...el.com>
Cc: pbonzini@...hat.com, seanjc@...gle.com, kvm@...r.kernel.org,
 dave.hansen@...ux.intel.com, rick.p.edgecombe@...el.com,
 kai.huang@...el.com, reinette.chatre@...el.com, xiaoyao.li@...el.com,
 tony.lindgren@...ux.intel.com, binbin.wu@...ux.intel.com,
 dmatlack@...gle.com, isaku.yamahata@...el.com, nik.borisov@...e.com,
 linux-kernel@...r.kernel.org, x86@...nel.org, yan.y.zhao@...el.com,
 weijiang.yang@...el.com
Subject: Re: [PATCH 4/7] KVM: TDX: restore host xsave state when exit from the
 guest TD

On 2/12/24 04:52, Chao Gao wrote:
>>>> /* 
>>>> * Before returning from TDH.VP.ENTER, the TDX Module assigns:
>>>> *   XCR0 to the TD’s user-mode feature bits of XFAM (bits 7:0, 9)
>>>> *   IA32_XSS to the TD's supervisor-mode feature bits of XFAM (bits 8, 16:10)
> 
> TILECFG state (bit 17) and TILEDATA state (bit 18) are also user state. Are they
> cleared unconditionally?

Bit 17 and 18 should also be in TDX_XFAM_XCR0_MASK
TDX Module does define them, from TDX Module sources:

	#define XCR0_USER_BIT_MASK                  0x000602FF

Thanks for spotting that!

> 
>>>> */
>>>> #define TDX_XFAM_XCR0_MASK	(GENMASK(7, 0) | BIT(9))
>>>> #define TDX_XFAM_XSS_MASK	(GENMASK(16, 10) | BIT(8))
>>>> #define TDX_XFAM_MASK		(TDX_XFAM_XCR0_MASK | TDX_XFAM_XSS_MASK)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ