* [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
@ 2016-02-11 15:13 Boris Ostrovsky
2016-02-11 18:17 ` Borislav Petkov
2016-02-19 10:06 ` Andy Shevchenko
0 siblings, 2 replies; 11+ messages in thread
From: Boris Ostrovsky @ 2016-02-11 15:13 UTC (permalink / raw)
To: bp, tglx, mingo, hpa
Cc: x86, linux-kernel, david.vrabel, konrad.wilk, xen-devel,
Boris Ostrovsky
Commit a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on
paravirt") added a paravirt test in microcode_init(), primarily to avoid
making mc_bp_resume()->load_ucode_ap()->check_loader_disabled_ap() calls
On 32-bit kernels this callchain ends up using __pa_nodebug() macro
which is invalid for Xen PV guests.
A subsequent commit, fbae4ba8c4a3 ("x86, microcode: Reload microcode on
resume"), eliminated this callchain thus making a18a0f6850d4
unnecessary.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
arch/x86/kernel/cpu/microcode/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index cea8552..ac360bf 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -623,7 +623,7 @@ int __init microcode_init(void)
struct cpuinfo_x86 *c = &boot_cpu_data;
int error;
- if (paravirt_enabled() || dis_ucode_ldr)
+ if (dis_ucode_ldr)
return -EINVAL;
if (c->x86_vendor == X86_VENDOR_INTEL)
--
2.1.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-11 15:13 [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check Boris Ostrovsky
@ 2016-02-11 18:17 ` Borislav Petkov
2016-02-19 10:06 ` Andy Shevchenko
1 sibling, 0 replies; 11+ messages in thread
From: Borislav Petkov @ 2016-02-11 18:17 UTC (permalink / raw)
To: Boris Ostrovsky
Cc: tglx, mingo, hpa, x86, linux-kernel, david.vrabel, konrad.wilk,
xen-devel
On Thu, Feb 11, 2016 at 10:13:18AM -0500, Boris Ostrovsky wrote:
> Commit a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on
> paravirt") added a paravirt test in microcode_init(), primarily to avoid
> making mc_bp_resume()->load_ucode_ap()->check_loader_disabled_ap() calls
> On 32-bit kernels this callchain ends up using __pa_nodebug() macro
> which is invalid for Xen PV guests.
>
> A subsequent commit, fbae4ba8c4a3 ("x86, microcode: Reload microcode on
> resume"), eliminated this callchain thus making a18a0f6850d4
> unnecessary.
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> arch/x86/kernel/cpu/microcode/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-11 15:13 [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check Boris Ostrovsky
2016-02-11 18:17 ` Borislav Petkov
@ 2016-02-19 10:06 ` Andy Shevchenko
2016-02-19 10:18 ` Borislav Petkov
1 sibling, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2016-02-19 10:06 UTC (permalink / raw)
To: Boris Ostrovsky
Cc: Borislav Petkov, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Thu, Feb 11, 2016 at 5:13 PM, Boris Ostrovsky
<boris.ostrovsky@oracle.com> wrote:
> Commit a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on
> paravirt") added a paravirt test in microcode_init(), primarily to avoid
> making mc_bp_resume()->load_ucode_ap()->check_loader_disabled_ap() calls
> On 32-bit kernels this callchain ends up using __pa_nodebug() macro
> which is invalid for Xen PV guests.
>
> A subsequent commit, fbae4ba8c4a3 ("x86, microcode: Reload microcode on
> resume"), eliminated this callchain thus making a18a0f6850d4
> unnecessary.
Sorry for being too late, but this commit breaks 32-bit kernel on
Intel Medfield.
Reverting the only commit from today's linux-next helps.
Put me in Cc list to pursue testing whatever you come with.
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> arch/x86/kernel/cpu/microcode/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
> index cea8552..ac360bf 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -623,7 +623,7 @@ int __init microcode_init(void)
> struct cpuinfo_x86 *c = &boot_cpu_data;
> int error;
>
> - if (paravirt_enabled() || dis_ucode_ldr)
> + if (dis_ucode_ldr)
> return -EINVAL;
>
> if (c->x86_vendor == X86_VENDOR_INTEL)
> --
> 2.1.0
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 10:06 ` Andy Shevchenko
@ 2016-02-19 10:18 ` Borislav Petkov
2016-02-19 10:33 ` Andy Shevchenko
0 siblings, 1 reply; 11+ messages in thread
From: Borislav Petkov @ 2016-02-19 10:18 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 12:06:33PM +0200, Andy Shevchenko wrote:
> Sorry for being too late, but this commit breaks 32-bit kernel on
> Intel Medfield. Reverting the only commit from today's linux-next
> helps.
You mean this commit?!
fbae4ba8c4a3 ("x86, microcode: Reload microcode on resume")
This has been in since 3.19.
Please explain.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 10:18 ` Borislav Petkov
@ 2016-02-19 10:33 ` Andy Shevchenko
2016-02-19 10:46 ` Borislav Petkov
0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2016-02-19 10:33 UTC (permalink / raw)
To: Borislav Petkov
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 12:18 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Fri, Feb 19, 2016 at 12:06:33PM +0200, Andy Shevchenko wrote:
>> Sorry for being too late, but this commit breaks 32-bit kernel on
>> Intel Medfield. Reverting the only commit from today's linux-next
>> helps.
>
> You mean this commit?!
>
> fbae4ba8c4a3 ("x86, microcode: Reload microcode on resume")
>
> This has been in since 3.19.
>
> Please explain.
No, the commit 84aba677f009 as of today's linux-next on which I commented.
commit 84aba677f009e20185aea322563389ad56e0ef7e
Author: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Date: Tue Feb 16 09:43:19 2016 +0100
x86/microcode: Remove unnecessary paravirt_enabled check
One more thing: I run this kernel as a second from kexec. It might be
related as well. For now I have no possibility to run it as a first
kernel.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 10:33 ` Andy Shevchenko
@ 2016-02-19 10:46 ` Borislav Petkov
2016-02-19 10:50 ` Andy Shevchenko
0 siblings, 1 reply; 11+ messages in thread
From: Borislav Petkov @ 2016-02-19 10:46 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 12:33:46PM +0200, Andy Shevchenko wrote:
> No, the commit 84aba677f009 as of today's linux-next on which I commented.
You commented under the "> A subsequent commit, fbae4ba8c4a3" which confused me
as to which commit is the culprit.
> commit 84aba677f009e20185aea322563389ad56e0ef7e
> Author: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Date: Tue Feb 16 09:43:19 2016 +0100
>
> x86/microcode: Remove unnecessary paravirt_enabled check
>
> One more thing: I run this kernel as a second from kexec. It might be
> related as well. For now I have no possibility to run it as a first
> kernel.
Well, how exactly are you triggering this? Do you have a splat or some
other register dump so that I can try to pinpoint this. I'll need more
info so that I can reproduce it here and debug it.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 10:46 ` Borislav Petkov
@ 2016-02-19 10:50 ` Andy Shevchenko
2016-02-19 11:00 ` Andy Shevchenko
0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2016-02-19 10:50 UTC (permalink / raw)
To: Borislav Petkov
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 12:46 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Fri, Feb 19, 2016 at 12:33:46PM +0200, Andy Shevchenko wrote:
>> No, the commit 84aba677f009 as of today's linux-next on which I commented.
>
> You commented under the "> A subsequent commit, fbae4ba8c4a3" which confused me
> as to which commit is the culprit.
Yeah, at least now it's clear I suppose.
>> commit 84aba677f009e20185aea322563389ad56e0ef7e
>> Author: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Date: Tue Feb 16 09:43:19 2016 +0100
>>
>> x86/microcode: Remove unnecessary paravirt_enabled check
>>
>> One more thing: I run this kernel as a second from kexec. It might be
>> related as well. For now I have no possibility to run it as a first
>> kernel.
>
> Well, how exactly are you triggering this? Do you have a splat or some
> other register dump so that I can try to pinpoint this. I'll need more
> info so that I can reproduce it here and debug it.
It stuck at some point during boot. I'm trying to get earlycon or
earlyprintk to show me something...
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 10:50 ` Andy Shevchenko
@ 2016-02-19 11:00 ` Andy Shevchenko
2016-02-19 11:10 ` Borislav Petkov
0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2016-02-19 11:00 UTC (permalink / raw)
To: Borislav Petkov
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 12:50 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Feb 19, 2016 at 12:46 PM, Borislav Petkov <bp@alien8.de> wrote:
>> On Fri, Feb 19, 2016 at 12:33:46PM +0200, Andy Shevchenko wrote:
>>> commit 84aba677f009e20185aea322563389ad56e0ef7e
>>> Author: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>> Date: Tue Feb 16 09:43:19 2016 +0100
>>>
>>> x86/microcode: Remove unnecessary paravirt_enabled check
>>>
>>> One more thing: I run this kernel as a second from kexec. It might be
>>> related as well. For now I have no possibility to run it as a first
>>> kernel.
>>
>> Well, how exactly are you triggering this? Do you have a splat or some
>> other register dump so that I can try to pinpoint this. I'll need more
>> info so that I can reproduce it here and debug it.
>
> It stuck at some point during boot. I'm trying to get earlycon or
> earlyprintk to show me something...
That what I see last with earlycon enabled + `debug` in cmdline:
…
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty1] enabled
[ 0.000000] console [ttyS1] enabled
[ 0.000000] bootconsole [uart8250] disabled
Without it I see nothing at all.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 11:00 ` Andy Shevchenko
@ 2016-02-19 11:10 ` Borislav Petkov
2016-02-19 11:21 ` Andy Shevchenko
0 siblings, 1 reply; 11+ messages in thread
From: Borislav Petkov @ 2016-02-19 11:10 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 01:00:35PM +0200, Andy Shevchenko wrote:
> That what I see last with earlycon enabled + `debug` in cmdline:
That doesn't help. Can you dump RIP, etc registers as to where the
machine freezes?
Let me confirm this: booting with "dis_ucode_ldr" works?
Also, please send .config and detailed steps how to reproduce.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 11:10 ` Borislav Petkov
@ 2016-02-19 11:21 ` Andy Shevchenko
2016-02-19 11:36 ` Borislav Petkov
0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2016-02-19 11:21 UTC (permalink / raw)
To: Borislav Petkov
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 1:10 PM, Borislav Petkov <bp@alien8.de> wrote:
> On Fri, Feb 19, 2016 at 01:00:35PM +0200, Andy Shevchenko wrote:
>> That what I see last with earlycon enabled + `debug` in cmdline:
>
> That doesn't help.
Heh, rebuilt on clean repository -> everything works. Looks like false
alarm and practical proof to do clean build first.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
2016-02-19 11:21 ` Andy Shevchenko
@ 2016-02-19 11:36 ` Borislav Petkov
0 siblings, 0 replies; 11+ messages in thread
From: Borislav Petkov @ 2016-02-19 11:36 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Boris Ostrovsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86@kernel.org, linux-kernel@vger.kernel.org, david.vrabel,
Konrad Rzeszutek Wilk, xen-devel
On Fri, Feb 19, 2016 at 01:21:10PM +0200, Andy Shevchenko wrote:
> Heh, rebuilt on clean repository -> everything works. Looks like false
> alarm and practical proof to do clean build first.
Always, like *really* *always*, do
$ make mrproper
or even
$ git clean -dqfx
before testing kernels. I've learned that the hard way and it seems
you just did too.
:)
Btw, be careful with that git clean command - it kills *everything*. I
do "git clean -dnx" just in case before doing the "-f" thing.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-02-19 11:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 15:13 [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check Boris Ostrovsky
2016-02-11 18:17 ` Borislav Petkov
2016-02-19 10:06 ` Andy Shevchenko
2016-02-19 10:18 ` Borislav Petkov
2016-02-19 10:33 ` Andy Shevchenko
2016-02-19 10:46 ` Borislav Petkov
2016-02-19 10:50 ` Andy Shevchenko
2016-02-19 11:00 ` Andy Shevchenko
2016-02-19 11:10 ` Borislav Petkov
2016-02-19 11:21 ` Andy Shevchenko
2016-02-19 11:36 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).