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] [day] [month] [year] [list]
Message-ID: <aNboE3FqdjgqlEuy@AUSJOHALLEN.amd.com>
Date: Fri, 26 Sep 2025 14:22:59 -0500
From: John Allen <john.allen@....com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
	seanjc@...gle.com, pbonzini@...hat.com, rick.p.edgecombe@...el.com,
	mlevitsk@...hat.com, weijiang.yang@...el.com, chao.gao@...el.com,
	bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
	mingo@...hat.com, tglx@...utronix.de, thomas.lendacky@....com
Subject: Re: [PATCH v3 2/2] x86/sev-es: Include XSS value in GHCB CPUID
 request

On Wed, Sep 24, 2025 at 04:02:11PM -0700, Dave Hansen wrote:
> On 9/24/25 13:08, John Allen wrote:
> > +	if (has_cpuflag(X86_FEATURE_SHSTK) && regs->ax == 0xd && regs->cx == 1) {
> > +		struct msr m;
> > +
> > +		raw_rdmsr(MSR_IA32_XSS, &m);
> > +		ghcb_set_xss(ghcb, m.q);
> > +	}
> 
> Is there a reason this is open-coding CPUID_LEAF_XSTATE?

That's a good question. This patch was adapted from an old SNP patch
from years ago so if I had to guess, maybe there was some issue bringing
in the old pre-split cpuid header into the early boot/shared
environment. It looks like including asm/cpuid/types.h and using
CPUID_LEAF_XSTATE works here and now so I'll include it in the next
version.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ