Thread (4 messages) 4 messages, 3 authors, 2014-11-27

Re: [PATCH 3.17 100/141] x86, microcode: Fix accessing dis_ucode_ldr on 32-bit

From: Borislav Petkov <hidden>
Date: 2014-11-27 09:12:41
Also in: lkml

On Wed, Nov 26, 2014 at 07:13:02PM -0800, Boris Ostrovsky wrote:
I was confusing you: accessing dis_ucode_ldr by virtual address does
work on PV. But we then fail later, in load_ucode_intel_ap(), because
it also tries to use __pa_nodebug() which can't be used by PV.

So if accessing dis_ucode_ldr by virtual address is acceptable
(although I don't think it is?) then we can stick dis_ucode_ldr=1 into
xen_start_kernel() and then things look OK.

A better solution may be to replace cpuid in x86_guest() with 'return
pv_info.paravirt_enabled' (or paravirt_enabled(), I guess). I gave
it a quick spin (32-bit only) and it seems to work. I'll see how my
overnight tests behave.
Ok, but let's have a clean design: maybe have a weak default stub which
returns false when PARAVIRT is not enabled in the .config and then add
an override in, say, arch/x86/kernel/paravirt.c which returns true when
running as a guest. Something like that, at least.

I can imagine other stuff wanting to use the dynamic checking at runtime
too...

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help