All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH] x86: clear RDRAND CPUID bit on AMD family 15h/16h
Date: Thu, 29 Aug 2019 14:39:23 +0200	[thread overview]
Message-ID: <07043e62-01bd-be2a-05a6-db8aacdea7d4@suse.com> (raw)
In-Reply-To: <8182fd34-c41a-46d5-d0db-51799c2d5052@suse.com>

On 29.08.19 14:27, Jan Beulich wrote:
> On 29.08.2019 14:01, Juergen Gross wrote:
>> 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.
> 
> That's the implication; note that I've taken the text from the
> Linux commit.
> 
>>>> 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?
> 
> That's an alternative option. But if anything I'd see us providing
> both, not the one you suggest instead of what the patch here does.
> 
>> I'm quite sure a machine running Xen is very rarely put to S3.
> 
> I'm not at all sure about this.

Suspend/resume in Xen was broken for more than 3 months in the late 4.12
development phase and nobody noticed it. Only when I started my core
scheduling series I came across the issue.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-08-29 12:39 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
2019-08-29 12:27     ` Jan Beulich
2019-08-29 12:39       ` Juergen Gross [this message]
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=07043e62-01bd-be2a-05a6-db8aacdea7d4@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.