xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	jbeulich@suse.com, keir@xen.org, xen-devel@lists.xen.org
Cc: boris.ostrovsky@oracle.com
Subject: Re: [PATCH] x86, amd_ucode: Safeguard against #GP
Date: Thu, 22 May 2014 10:53:41 -0500	[thread overview]
Message-ID: <537E1D85.1030807@amd.com> (raw)
In-Reply-To: <537D23F3.3030607@citrix.com>

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

On 5/21/2014 5:08 PM, Andrew Cooper wrote:
> On 21/05/2014 22:28, Aravind Gopalakrishnan wrote:
>> When HW tries to load a corrupted patch, it generates #GP
>> and hangs the system. Use wrmsr_safe instead so that we
>> fail to load microcode gracefully.
>>
>> Example on a Fam15h system-
>> (XEN) microcode: CPU0 collect_cpu_info: patch_id=0x6000626
>> (XEN) microcode: CPU0 size 7870, block size 2586 offset 76 equivID
>> 0x6012 rev 0x6000637
>> (XEN) microcode: CPU0 found a matching microcode update with version
>> 0x6000637 (current=0x6000626)
>> (XEN) traps.c:3073: GPF (0000): ffff82d08016f682 -> ffff82d08022d9f8
>> (XEN) microcode: CPU0 update from revision 0x6000637 to 0x6000626 failed
>>
>> Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
> I suspect that you will find with a *very* up-to-date master tree, an
> early #GP should result in panic() instead of a hang, following
> 279840d5ea646  (If it doesn't I would be interested to know)

The console log states 'Panic on CPU0'. But system is basically hung 
after that.
(attached snapshot)
> As for the patch itself, is it worth using the failure to purge this
> patch from the cache? Nothing good can come of attempting to load the
> same patch on a different cpu.
>
>

I don't think we do..
We only save the patch for apply on resume if 'applied_offset' has a 
value right?

-Aravind.

[-- Attachment #2: xen-hang-latest-tree.jpg --]
[-- Type: image/jpeg, Size: 1660671 bytes --]

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-22 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 21:28 [PATCH] x86, amd_ucode: Safeguard against #GP Aravind Gopalakrishnan
2014-05-21 21:51 ` Boris Ostrovsky
2014-05-21 22:08 ` Andrew Cooper
2014-05-22 15:53   ` Aravind Gopalakrishnan [this message]
2014-05-22 15:56     ` Andrew Cooper
2014-05-22 15:59       ` Aravind Gopalakrishnan
2014-05-22  8:44 ` Jan Beulich
2014-05-22 15:59   ` Aravind Gopalakrishnan
2014-05-23  6:05     ` Jan Beulich
2014-05-27 18:26       ` Aravind Gopalakrishnan

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=537E1D85.1030807@amd.com \
    --to=aravind.gopalakrishnan@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.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 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 NNTP newsgroup(s).