All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86,amd,microcode: fix hypercall return code
@ 2008-09-22 12:22 Christoph Egger
  2008-09-22 12:47 ` Tian, Kevin
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Egger @ 2008-09-22 12:22 UTC (permalink / raw)
  To: xen-devel

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


Hi,

Attached patch makes the hypercall return failure
if the microcode didn't apply.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: xen_microcode.diff --]
[-- Type: text/x-diff, Size: 434 bytes --]

diff -r 2e8ad0c35792 xen/arch/x86/microcode_amd.c
--- a/xen/arch/x86/microcode_amd.c	Thu Sep 18 10:43:08 2008 +0100
+++ b/xen/arch/x86/microcode_amd.c	Mon Sep 22 11:51:03 2008 +0200
@@ -338,8 +338,7 @@ static int cpu_request_microcode(int cpu
          */
         if ( error == 1 )
         {
-            apply_microcode(cpu);
-            error = 0;
+            error = apply_microcode(cpu);
         }
         xfree(mc);
     }

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] x86,amd,microcode: fix hypercall return code
  2008-09-22 12:22 [PATCH] x86,amd,microcode: fix hypercall return code Christoph Egger
@ 2008-09-22 12:47 ` Tian, Kevin
  2008-09-22 12:59   ` Christoph Egger
  0 siblings, 1 reply; 3+ messages in thread
From: Tian, Kevin @ 2008-09-22 12:47 UTC (permalink / raw)
  To: 'Christoph Egger', xen-devel@lists.xensource.com

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

>From: Christoph Egger
>Sent: 2008年9月22日 20:23
>
>
>Hi,
>
>Attached patch makes the hypercall return failure
>if the microcode didn't apply.
>
>Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
>

It's weird that you don't add a 'break' if apply_microcode failed,
unless you're sure next invocation to get_next_ucode_from_buffer
_amd return 0... But even that, this is a bad coding style.

Thanks,
Kevin

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86,amd,microcode: fix hypercall return code
  2008-09-22 12:47 ` Tian, Kevin
@ 2008-09-22 12:59   ` Christoph Egger
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Egger @ 2008-09-22 12:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Tian, Kevin

On Monday 22 September 2008 14:47:38 Tian, Kevin wrote:
> >From: Christoph Egger
> >Sent: 2008年9月22日 20:23
> >
> >
> >Hi,
> >
> >Attached patch makes the hypercall return failure
> >if the microcode didn't apply.
> >
> >Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
>
> It's weird that you don't add a 'break' if apply_microcode failed,
> unless you're sure next invocation to get_next_ucode_from_buffer
> _amd return 0... But even that, this is a bad coding style.

Yes, it is. Note, I ported that code from Linux. I don't know if
code from BSD would have been accepted due to license
incompatibilities.

Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-22 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 12:22 [PATCH] x86,amd,microcode: fix hypercall return code Christoph Egger
2008-09-22 12:47 ` Tian, Kevin
2008-09-22 12:59   ` Christoph Egger

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.