Re: x86/microcode/intel: Division by zero panic in 4.9.79 and 4.4.114

From: Rolf Neugebauer
Date: Wed Feb 07 2018 - 11:32:33 EST


On Wed, Feb 7, 2018 at 2:34 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Feb 06, 2018 at 03:24:44PM +0100, Borislav Petkov wrote:
>> On Tue, Feb 06, 2018 at 02:09:35PM +0000, Rolf Neugebauer wrote:
>> > The backport of 7e702d17ed1 ("x86/microcode/intel: Extend BDW
>> > late-loading further with LLC size check") to 4.9.79 and 4.4.14 causes
>> > a division by zero panic on some single vCPU machine types on Google
>> > Cloud (e.g. g1-small and n1-standard-1):
>>
>> The microcode loader is not supposed to load in a guest.
>>
>> Greg, I guess you need something like this:
>>
>> a15a753539ec ("x86/microcode/AMD: Do not load when running on a hypervisor")
>>
>> I haven't tried whether it applies cleanly though...
>
> It applied cleanly to 4.9 (with some fuzz, but looks clean enough...)
>
> But for 4.4, not at all. Rolf, any chance you could backport the patch
> there for this issue? If not, I can add it to my queue, but it might
> take a few days...

The backport was straight forward. I've added it below. If my mailer
(gmail) screws this up let me where I should send it with 'git
send-email'

Rolf