From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] x86: clear RDRAND CPUID bit on AMD family 15h/16h
Date: Thu, 29 Aug 2019 14:01:54 +0200 [thread overview]
Message-ID: <8191ed37-760d-748a-c7c7-762dd331fa7c@suse.com> (raw)
In-Reply-To: <e163fa38-6a06-c422-4c23-7d5385590025@citrix.com>
On 29.08.19 13:42, Andrew Cooper wrote:
> On 29/08/2019 10:28, Jan Beulich wrote:
>> Inspired by Linux commit c49a0a80137c7ca7d6ced4c812c9e07a949f6f24:
>>
>> There have been reports of RDRAND issues after resuming from suspend on
>> some AMD family 15h and family 16h systems. This issue stems from a BIOS
>> not performing the proper steps during resume to ensure RDRAND continues
>> to function properly.
>>
>> Update the CPU initialization to clear the RDRAND CPUID bit for any family
>> 15h and 16h processor that supports RDRAND. If it is known that the family
>> 15h or family 16h system does not have an RDRAND resume issue or that the
>> system will not be placed in suspend, the "cpuid=rdrand" kernel parameter
>> can be used to stop the clearing of the RDRAND CPUID bit.
>>
>> Note, that clearing the RDRAND CPUID bit does not prevent a processor
>> that normally supports the RDRAND instruction from executing it. So any
>> code that determined the support based on family and model won't #UD.
Yeah, but it will no longer see random numbers after resume.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> Slightly RFC, in particular because of the change to parse_xen_cpuid():
>> Alternative approach suggestions are welcome.
>
> This issue was on my radar, but I hadn't got around to starting a patch yet.
>
> I was wondering if we could perhaps default it to whether S3 was
> available, but looking at the code which prints "ACPI sleep modes: S3",
> it doesn't appear to be related to any real ACPI information.
Wouldn't it make more sense to inhibit suspend/resume instead?
I'm quite sure a machine running Xen is very rarely put to S3.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-29 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 9:28 [Xen-devel] [PATCH] x86: clear RDRAND CPUID bit on AMD family 15h/16h Jan Beulich
2019-08-29 11:42 ` Andrew Cooper
2019-08-29 12:01 ` Juergen Gross [this message]
2019-08-29 12:27 ` Jan Beulich
2019-08-29 12:39 ` Juergen Gross
2019-08-29 12:49 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8191ed37-760d-748a-c7c7-762dd331fa7c@suse.com \
--to=jgross@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.