All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Simon Gaiser <simon@invisiblethingslab.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/2] x86: correct ordering of operations during S3 resume
Date: Thu, 12 Apr 2018 01:12:16 -0600	[thread overview]
Message-ID: <5ACF22F002000078001BA939@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <5ACE6EA10200005203786DDD@prv1-mh.provo.novell.com>

>>> On 11.04.18 at 22:21, <simon@invisiblethingslab.com> wrote:
> @@ -243,17 +244,21 @@ static int enter_state(u32 state)
>      if ( (state == ACPI_STATE_S3) && error )
>          tboot_s3_error(error);
>  
> +    console_end_sync();
> +
> +    error = microcode_resume_cpu(0);
> +    if (error && error != -ENOENT)

Missing blanks.

> +        panic("Could not restore microcode on boot cpu (%d)", error);

Andrew, you've suggested the panic() here, but I'm not convinced
this is strictly necessary. For most ucode updates we're fine without,
and could accept them being re-applied post-resume. That'll make
a lot of false positive panics. Furthermore, in case there are really
mixed steppings, receiving -ENOENT here still means we're going to
die soon after. I.e. (rare) false negatives are possible as well.

Instead what I think we want is a feature comparison after resume:
Any feature we (or any alive guests) have in active use needs to be
available. That is, host_cpuid_policy must not have changed (the
two {hvm,pv}_max_cpuid_policy are only derived, and hence won't
need separate checking afaict; without that checking
host_cpuid_policy might be too strict, but then again compiling a
list of features we actually use would be prone to go stale very
quickly once use of new features is introduced, unless we tied this
into cpu_has_* checks, implying that any such check means the
feature is used if available, yet that would in turn have issues in
particular with the uses in the insn emulator).

Jan


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

  parent reply	other threads:[~2018-04-12  7:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 11:48 Resume from suspend to RAM broken when using early microcode updates Simon Gaiser
2018-04-11 11:51 ` Andrew Cooper
2018-04-11 12:01   ` Simon Gaiser
2018-04-11 12:11     ` Jan Beulich
2018-04-11 12:17       ` Jan Beulich
2018-04-11 12:46         ` Simon Gaiser
2018-04-11 13:45           ` Jan Beulich
2018-04-11 20:14             ` [PATCH 1/2] x86/microcode: Indicate "not found" in rc of microcode_resume_cpu() Simon Gaiser
2018-04-11 20:14               ` [PATCH 2/2] x86: correct ordering of operations during S3 resume Simon Gaiser
2018-04-11 20:21                 ` [PATCH v2 " Simon Gaiser
     [not found]                   ` <5ACE6EA10200005203786DDD@prv1-mh.provo.novell.com>
2018-04-12  7:12                     ` Jan Beulich [this message]
2018-04-12  6:56               ` [PATCH 1/2] x86/microcode: Indicate "not found" in rc of microcode_resume_cpu() Jan Beulich
2018-04-11 12:12     ` Resume from suspend to RAM broken when using early microcode updates Andrew Cooper
2018-04-11 14:49       ` Konrad Rzeszutek Wilk
2018-04-11 15:05         ` Andrew Cooper
2018-04-11 15:32           ` Jan Beulich
2018-04-11 12:04   ` Jan Beulich

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=5ACF22F002000078001BA939@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=simon@invisiblethingslab.com \
    --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.