* [PATCH] fhandler_proc.cc(format_proc_cpuinfo): add tsxldtrk, sev_es flags
@ 2020-09-17 18:51 Brian Inglis
2020-09-17 22:34 ` Ken Brown
0 siblings, 1 reply; 2+ messages in thread
From: Brian Inglis @ 2020-09-17 18:51 UTC (permalink / raw)
To: cygwin-patches
Add linux-next cpuinfo flags for Intel TSX suspend load address tracking
instructions and AMD Secure Encrypted Virtualization with Encrypted State
---
winsup/cygwin/fhandler_proc.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 196bafd18993..6f6e8291a0ca 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1376,6 +1376,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
cpuid (&features2, &unused, &unused, &unused, 0x8000001f);
ftcprint (features2, 1, "sev"); /* secure encrypted virt */
+ /*ftcprint (features2, 3, "sev_es"); - print below */
}
/* cpuid 0x80000008 ebx */
if (maxe >= 0x80000008)
@@ -1400,6 +1401,12 @@ format_proc_cpuinfo (void *, char *&destbuf)
/* ftcprint (features1, 26, "ssb_no"); *//* ssb fixed in hardware */
}
+ /* cpuid 0x8000001f eax - set above */
+ if (maxe >= 0x8000001f)
+ {
+ ftcprint (features2, 3, "sev_es"); /* AMD SEV encrypted state */
+ }
+
/* cpuid 0x00000007 ebx */
if (maxf >= 0x00000007)
{
@@ -1579,6 +1586,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */
ftcprint (features1, 10, "md_clear"); /* verw clear buf */
ftcprint (features1, 14, "serialize"); /* SERIALIZE instruction */
+ ftcprint (features1, 16, "tsxldtrk"); /* TSX Susp Ld Addr Track */
ftcprint (features1, 18, "pconfig"); /* platform config */
ftcprint (features1, 19, "arch_lbr"); /* last branch records */
ftcprint (features1, 28, "flush_l1d"); /* flush l1d cache */
--
2.28.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fhandler_proc.cc(format_proc_cpuinfo): add tsxldtrk, sev_es flags
2020-09-17 18:51 [PATCH] fhandler_proc.cc(format_proc_cpuinfo): add tsxldtrk, sev_es flags Brian Inglis
@ 2020-09-17 22:34 ` Ken Brown
0 siblings, 0 replies; 2+ messages in thread
From: Ken Brown @ 2020-09-17 22:34 UTC (permalink / raw)
To: cygwin-patches
On 9/17/2020 2:51 PM, Brian Inglis wrote:
> Add linux-next cpuinfo flags for Intel TSX suspend load address tracking
> instructions and AMD Secure Encrypted Virtualization with Encrypted State
> ---
> winsup/cygwin/fhandler_proc.cc | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
> index 196bafd18993..6f6e8291a0ca 100644
> --- a/winsup/cygwin/fhandler_proc.cc
> +++ b/winsup/cygwin/fhandler_proc.cc
> @@ -1376,6 +1376,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
> cpuid (&features2, &unused, &unused, &unused, 0x8000001f);
>
> ftcprint (features2, 1, "sev"); /* secure encrypted virt */
> + /*ftcprint (features2, 3, "sev_es"); - print below */
> }
> /* cpuid 0x80000008 ebx */
> if (maxe >= 0x80000008)
> @@ -1400,6 +1401,12 @@ format_proc_cpuinfo (void *, char *&destbuf)
> /* ftcprint (features1, 26, "ssb_no"); *//* ssb fixed in hardware */
> }
>
> + /* cpuid 0x8000001f eax - set above */
> + if (maxe >= 0x8000001f)
> + {
> + ftcprint (features2, 3, "sev_es"); /* AMD SEV encrypted state */
> + }
> +
> /* cpuid 0x00000007 ebx */
> if (maxf >= 0x00000007)
> {
> @@ -1579,6 +1586,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
> ftcprint (features1, 8, "avx512_vp2intersect"); /* vec intcpt d/q */
> ftcprint (features1, 10, "md_clear"); /* verw clear buf */
> ftcprint (features1, 14, "serialize"); /* SERIALIZE instruction */
> + ftcprint (features1, 16, "tsxldtrk"); /* TSX Susp Ld Addr Track */
> ftcprint (features1, 18, "pconfig"); /* platform config */
> ftcprint (features1, 19, "arch_lbr"); /* last branch records */
> ftcprint (features1, 28, "flush_l1d"); /* flush l1d cache */
Pushed with a trivial change (added a period at the end of the commit message).
Thanks.
Ken
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-17 22:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 18:51 [PATCH] fhandler_proc.cc(format_proc_cpuinfo): add tsxldtrk, sev_es flags Brian Inglis
2020-09-17 22:34 ` Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).