x86,amd,microcode: fix hypercall return code
PATCH 1/1 x86,amd,microcode: fix hypercall return code
Hi,
Attached patch makes the hypercall return failure
if the microcode didn't apply.
Signature · 12 lines
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
xen/arch/x86/microcode_amd.c +1 -2
@@ -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); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 11 lines
From: Christoph Egger
Sent: 2008年9月22日 20:23Hi,
Attached patch makes the hypercall return failure
if the microcode didn't apply.Signed-off-by Christoph Egger <[email protected]>
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
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Kevin
Quoted 6 lines
From: Christoph Egger
Sent: 2008年9月22日 20:23Hi,
Quoted 8 lines
Quoted 4 lines
Attached patch makes the hypercall return failure
if the microcode didn't apply.Signed-off-by Christoph Egger <[email protected]>It's weird that you don't add a 'break' if
apply_microcodefailed, unless you're sure next invocation toget_next_ucode_from_buffer_amdreturn 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
Signature · 12 lines
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