From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86, amd_ucode: Support multiple container files appended together
Date: Mon, 23 Jun 2014 15:24:49 -0500 [thread overview]
Message-ID: <53A88D11.4060601@amd.com> (raw)
In-Reply-To: <53A7E640020000780001C43A@mail.emea.novell.com>
On 6/23/2014 1:33 AM, Jan Beulich wrote:
>>>> On 20.06.14 at 18:06, <aravind.gopalakrishnan@amd.com> wrote:
>> On 6/20/2014 3:11 AM, Jan Beulich wrote:
>>>>>> On 19.06.14 at 17:14, <aravind.gopalakrishnan@amd.com> wrote:
>>>> @@ -379,8 +457,16 @@ static int cpu_request_microcode(int cpu, const void *buf, size_t bufsize)
>>>> save_error = get_ucode_from_buffer_amd(
>>>> mc_amd, buf, bufsize, &applied_offset);
>>>>
>>>> + /*
>>>> + * If there happens to be multiple container files and if patch
>>>> + * update succeeded on first container itself, a stale error val
>>>> + * is returned from get_ucode_from_buffer_amd. So, force
>>>> + * error = 0 here as we have already succeeded in the update.
>>>> + */
>>>> if ( save_error )
>>>> error = save_error;
>>>> + else
>>>> + error = 0;
>>> First of all I don't think this change is logically a part of $subject (as
>>> it also alters behavior for single container files). With that the
>>> question then is why the change is really correct. And if it was really
>>> correct, you could just drop the if() instead.
>>>
>>>
>> The change is needed (as stated in the comments) because we end up
>> returning err val (EINVAL) like so-
>> DEBUG: cpu_request_microcode : no save_err;error=-22
>>
>> even though update succeeded-
>> (XEN) microcode: CPU0 found a matching microcode update with version
>> 0x600063d (current=0x6000626)
>> (XEN) microcode: CPU0 updated from revision 0x6000626 to 0x600063d
>>
>> That said, I also understand your point that we can just drop the if().
>> So, I'll change this as per your suggestion.
>>
>> The fact that we have to make this change as a _consequence_ of adding
>> multiple container file support,
>> might explain why it was done later right?
>> I can make this a separate patch as well. Let me know what you think.
> I think I follow what you're saying, in which case this clearly shouldn't
> be a separate patch. But behavior for single-container files still should
> remain unaltered, so some change other than folding the if and else
> branches is going to be needed afaict.
>
>
I have addressed your concern in a V2.
Thanks,
-Aravind.
next prev parent reply other threads:[~2014-06-23 20:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 15:14 [PATCH] x86, amd_ucode: Support multiple container files appended together Aravind Gopalakrishnan
2014-06-20 8:11 ` Jan Beulich
2014-06-20 16:06 ` Aravind Gopalakrishnan
2014-06-23 6:33 ` Jan Beulich
2014-06-23 20:24 ` Aravind Gopalakrishnan [this message]
2014-06-20 15:57 ` Boris Ostrovsky
2014-06-20 17:18 ` Aravind Gopalakrishnan
2014-06-21 2:33 ` Boris Ostrovsky
2014-06-23 15:47 ` 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=53A88D11.4060601@amd.com \
--to=aravind.gopalakrishnan@amd.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 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.