Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 8:29 PM, Dave Young wrote: > On 01/17/18 at 06:14pm, Linus Torvalds wrote: >> On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: >>> >>> It does not work with just once wbinvd(), and it only works with >>> removing the wbinvd() for me. Tom's new post works for me

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 8:29 PM, Dave Young wrote: > On 01/17/18 at 06:14pm, Linus Torvalds wrote: >> On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: >>> >>> It does not work with just once wbinvd(), and it only works with >>> removing the wbinvd() for me. Tom's new post works for me as well >>> since

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/18/18 at 11:04am, Dave Young wrote: > On 01/17/18 at 07:00pm, Linus Torvalds wrote: > > On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > > > > > Could you say more about how to check this? My .config disabled > > > CONFIG_X86_MCE, should this be enabled? > > > > By

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/18/18 at 11:04am, Dave Young wrote: > On 01/17/18 at 07:00pm, Linus Torvalds wrote: > > On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > > > > > Could you say more about how to check this? My .config disabled > > > CONFIG_X86_MCE, should this be enabled? > > > > By all means, try it.

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 07:00pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > > > Could you say more about how to check this? My .config disabled > > CONFIG_X86_MCE, should this be enabled? > > By all means, try it. > > Some pending machine check

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 07:00pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > > > Could you say more about how to check this? My .config disabled > > CONFIG_X86_MCE, should this be enabled? > > By all means, try it. > > Some pending machine check exception that we have

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Arjan van de Ven
Does anybody have any other ideas? the only other weird case that comes to mind; what happens if there's a line dirty in the caches, but the memory is now mapped uncached. (Which could happen if kexec does muck with MTRRs, CR0 or other similar things in weird ways)... not sure what happens

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Arjan van de Ven
Does anybody have any other ideas? the only other weird case that comes to mind; what happens if there's a line dirty in the caches, but the memory is now mapped uncached. (Which could happen if kexec does muck with MTRRs, CR0 or other similar things in weird ways)... not sure what happens

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > Could you say more about how to check this? My .config disabled > CONFIG_X86_MCE, should this be enabled? By all means, try it. Some pending machine check exception that we have *not* reacted to, and that is pending

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 6:57 PM, Dave Young wrote: > > Could you say more about how to check this? My .config disabled > CONFIG_X86_MCE, should this be enabled? By all means, try it. Some pending machine check exception that we have *not* reacted to, and that is pending around kexec boot could

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:53pm, Arjan van de Ven wrote: > > > > Does anybody have any other ideas? > > wbinvd is thankfully not common, but also not rare (MTRR setup and a bunch of > other cases) > and in some other operating systems it happens even more than on Linux.. it's > generally not totally

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:53pm, Arjan van de Ven wrote: > > > > Does anybody have any other ideas? > > wbinvd is thankfully not common, but also not rare (MTRR setup and a bunch of > other cases) > and in some other operating systems it happens even more than on Linux.. it's > generally not totally

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 6:47 PM, Dave Young wrote: > Did several quick tests, probably need more tests, but till now the > results are: > > void stop_this_cpu(void *dummy) > { > => add wbinvd here: kexec works > local_irq_disable(); > => add wbinvd here: kexec

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 6:47 PM, Dave Young wrote: > Did several quick tests, probably need more tests, but till now the > results are: > > void stop_this_cpu(void *dummy) > { > => add wbinvd here: kexec works > local_irq_disable(); > => add wbinvd here: kexec works > /* >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Arjan van de Ven
Does anybody have any other ideas? wbinvd is thankfully not common, but also not rare (MTRR setup and a bunch of other cases) and in some other operating systems it happens even more than on Linux.. it's generally not totally broken like this. I can only imagine a machine check case where a

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Arjan van de Ven
Does anybody have any other ideas? wbinvd is thankfully not common, but also not rare (MTRR setup and a bunch of other cases) and in some other operating systems it happens even more than on Linux.. it's generally not totally broken like this. I can only imagine a machine check case where a

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:14pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > > > It does not work with just once wbinvd(), and it only works with > > removing the wbinvd() for me. Tom's new post works for me as well > > since my cpu is an Intel

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:14pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > > > It does not work with just once wbinvd(), and it only works with > > removing the wbinvd() for me. Tom's new post works for me as well > > since my cpu is an Intel i5-4200U. > >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:14pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > > > It does not work with just once wbinvd(), and it only works with > > removing the wbinvd() for me. Tom's new post works for me as well > > since my cpu is an Intel

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 06:14pm, Linus Torvalds wrote: > On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > > > It does not work with just once wbinvd(), and it only works with > > removing the wbinvd() for me. Tom's new post works for me as well > > since my cpu is an Intel i5-4200U. > >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > It does not work with just once wbinvd(), and it only works with > removing the wbinvd() for me. Tom's new post works for me as well > since my cpu is an Intel i5-4200U. Intriguing. It's not like the wbinvd really should

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 5:47 PM, Dave Young wrote: > > It does not work with just once wbinvd(), and it only works with > removing the wbinvd() for me. Tom's new post works for me as well > since my cpu is an Intel i5-4200U. Intriguing. It's not like the wbinvd really should be that much of a

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 09:06am, Tom Lendacky wrote: > On 1/17/2018 1:22 AM, Dave Young wrote: > > [Modify the subject since this is a new problem, original io vector > > issue has been fixed with one commit from Thomas] > > > > Add more cc according to below old discussion: > >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 09:06am, Tom Lendacky wrote: > On 1/17/2018 1:22 AM, Dave Young wrote: > > [Modify the subject since this is a new problem, original io vector > > issue has been fixed with one commit from Thomas] > > > > Add more cc according to below old discussion: > >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 11:42am, Linus Torvalds wrote: > On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: > > > > For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() > > then kexec works fine. like this: > > Honestly, I think we should apply that patch regardless. >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Dave Young
On 01/17/18 at 11:42am, Linus Torvalds wrote: > On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: > > > > For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() > > then kexec works fine. like this: > > Honestly, I think we should apply that patch regardless. > > Using 'wbinvd'

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 2:01 PM, Tom Lendacky wrote: > On 1/17/2018 1:42 PM, Linus Torvalds wrote: >> On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: >>> >>> For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() >>> then kexec works fine. like this: >> >> Honestly, I

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 2:01 PM, Tom Lendacky wrote: > On 1/17/2018 1:42 PM, Linus Torvalds wrote: >> On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: >>> >>> For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() >>> then kexec works fine. like this: >> >> Honestly, I think we should apply

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 11:42 AM, Linus Torvalds wrote: > > [ .. ]Some of the errata > around SME have been about machine check exceptions or something. That should be "some of the errata around wbinvd". I have no idea if there have been SME issues. That

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Wed, Jan 17, 2018 at 11:42 AM, Linus Torvalds wrote: > > [ .. ]Some of the errata > around SME have been about machine check exceptions or something. That should be "some of the errata around wbinvd". I have no idea if there have been SME issues. That said, the really bad old wbinvd

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 1:42 PM, Linus Torvalds wrote: > On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: >> >> For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() >> then kexec works fine. like this: > > Honestly, I think we should apply that patch regardless. > >

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 1:42 PM, Linus Torvalds wrote: > On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: >> >> For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() >> then kexec works fine. like this: > > Honestly, I think we should apply that patch regardless. > > Using 'wbinvd'

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: > > For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() > then kexec works fine. like this: Honestly, I think we should apply that patch regardless. Using 'wbinvd' should not be some "just because of random

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Linus Torvalds
On Tue, Jan 16, 2018 at 11:22 PM, Dave Young wrote: > > For the kexec reboot hang, if I remove the wbinvd in stop_this_cpu() > then kexec works fine. like this: Honestly, I think we should apply that patch regardless. Using 'wbinvd' should not be some "just because of random reasons". There are

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 1:22 AM, Dave Young wrote: > [Modify the subject since this is a new problem, original io vector > issue has been fixed with one commit from Thomas] > > Add more cc according to below old discussion: > https://lkml.org/lkml/2017/7/27/574 > > Tom, I'm not sure why you finally did not

Re: kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-17 Thread Tom Lendacky
On 1/17/2018 1:22 AM, Dave Young wrote: > [Modify the subject since this is a new problem, original io vector > issue has been fixed with one commit from Thomas] > > Add more cc according to below old discussion: > https://lkml.org/lkml/2017/7/27/574 > > Tom, I'm not sure why you finally did not

kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-16 Thread Dave Young
[Modify the subject since this is a new problem, original io vector issue has been fixed with one commit from Thomas] Add more cc according to below old discussion: https://lkml.org/lkml/2017/7/27/574 Tom, I'm not sure why you finally did not dynamically run wbinvd? On 01/04/18 at 11:15am, Dave

kexec reboot fails with extra wbinvd introduced for AME SME

2018-01-16 Thread Dave Young
[Modify the subject since this is a new problem, original io vector issue has been fixed with one commit from Thomas] Add more cc according to below old discussion: https://lkml.org/lkml/2017/7/27/574 Tom, I'm not sure why you finally did not dynamically run wbinvd? On 01/04/18 at 11:15am, Dave