linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
@ 2015-02-23 16:01 Boris Ostrovsky
  2015-02-23 16:09 ` Andy Lutomirski
  2015-02-23 17:09 ` [Xen-devel] " David Vrabel
  0 siblings, 2 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2015-02-23 16:01 UTC (permalink / raw)
  To: konrad.wilk, david.vrabel; +Cc: xen-devel, linux-kernel, luto, boris.ostrovsky

Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
introduced CR4 shadows.

These shadows are initialized in early boot code. The commit missed
initialization for 64-bit PV(H) guests that this patch adds.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 arch/x86/xen/enlighten.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index bd8b845..7393f3e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1741,6 +1741,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 #ifdef CONFIG_X86_32
 	i386_start_kernel();
 #else
+	cr4_init_shadow(); /* 32b kernel does this in i386_start_kernel() */
 	x86_64_start_reservations((char *)__pa_symbol(&boot_params));
 #endif
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-02-23 16:01 [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests Boris Ostrovsky
@ 2015-02-23 16:09 ` Andy Lutomirski
  2015-02-23 16:16   ` Boris Ostrovsky
  2015-02-23 17:09 ` [Xen-devel] " David Vrabel
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Lutomirski @ 2015-02-23 16:09 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Konrad Rzeszutek Wilk, David Vrabel, xen-devel, linux-kernel

On Mon, Feb 23, 2015 at 8:01 AM, Boris Ostrovsky
<boris.ostrovsky@oracle.com> wrote:
> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
> introduced CR4 shadows.
>
> These shadows are initialized in early boot code. The commit missed
> initialization for 64-bit PV(H) guests that this patch adds.

Whoops, worry.

This is needed for 3.21, right?

--Andy

>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
>  arch/x86/xen/enlighten.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index bd8b845..7393f3e 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1741,6 +1741,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
>  #ifdef CONFIG_X86_32
>         i386_start_kernel();
>  #else
> +       cr4_init_shadow(); /* 32b kernel does this in i386_start_kernel() */
>         x86_64_start_reservations((char *)__pa_symbol(&boot_params));
>  #endif
>  }
> --
> 1.7.1
>



-- 
Andy Lutomirski
AMA Capital Management, LLC

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-02-23 16:09 ` Andy Lutomirski
@ 2015-02-23 16:16   ` Boris Ostrovsky
  0 siblings, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2015-02-23 16:16 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Konrad Rzeszutek Wilk, David Vrabel, xen-devel, linux-kernel


On 02/23/2015 11:09 AM, Andy Lutomirski wrote:
> On Mon, Feb 23, 2015 at 8:01 AM, Boris Ostrovsky
> <boris.ostrovsky@oracle.com> wrote:
>> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
>> introduced CR4 shadows.
>>
>> These shadows are initialized in early boot code. The commit missed
>> initialization for 64-bit PV(H) guests that this patch adds.
> Whoops, worry.
>
> This is needed for 3.21, right?

It would have been 3.20, I think. Which is now 4.0.


-boris

>
> --Andy
>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> ---
>>   arch/x86/xen/enlighten.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
>> index bd8b845..7393f3e 100644
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -1741,6 +1741,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
>>   #ifdef CONFIG_X86_32
>>          i386_start_kernel();
>>   #else
>> +       cr4_init_shadow(); /* 32b kernel does this in i386_start_kernel() */
>>          x86_64_start_reservations((char *)__pa_symbol(&boot_params));
>>   #endif
>>   }
>> --
>> 1.7.1
>>
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-02-23 16:01 [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests Boris Ostrovsky
  2015-02-23 16:09 ` Andy Lutomirski
@ 2015-02-23 17:09 ` David Vrabel
  2015-03-03  5:35   ` Luis R. Rodriguez
  1 sibling, 1 reply; 8+ messages in thread
From: David Vrabel @ 2015-02-23 17:09 UTC (permalink / raw)
  To: Boris Ostrovsky, konrad.wilk, david.vrabel; +Cc: xen-devel, linux-kernel, luto

On 23/02/15 16:01, Boris Ostrovsky wrote:
> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
> introduced CR4 shadows.
> 
> These shadows are initialized in early boot code. The commit missed
> initialization for 64-bit PV(H) guests that this patch adds.

Applied to stable/for-linus-4.0, thanks.

Boris, can you kick of a set of tests on this branch, please?

David

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-02-23 17:09 ` [Xen-devel] " David Vrabel
@ 2015-03-03  5:35   ` Luis R. Rodriguez
  2015-03-03 14:27     ` Boris Ostrovsky
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2015-03-03  5:35 UTC (permalink / raw)
  To: David Vrabel
  Cc: Boris Ostrovsky, Konrad Rzeszutek Wilk, xen-devel, linux-kernel,
	Andy Lutomirski

On Mon, Feb 23, 2015 at 9:09 AM, David Vrabel <david.vrabel@citrix.com> wrote:
> On 23/02/15 16:01, Boris Ostrovsky wrote:
>> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
>> introduced CR4 shadows.
>>
>> These shadows are initialized in early boot code. The commit missed
>> initialization for 64-bit PV(H) guests that this patch adds.
>
> Applied to stable/for-linus-4.0, thanks.
>
> Boris, can you kick of a set of tests on this branch, please?

Do we know worst case what should blow up without this commit ?

 Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-03-03  5:35   ` Luis R. Rodriguez
@ 2015-03-03 14:27     ` Boris Ostrovsky
  2015-03-03 18:15       ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Boris Ostrovsky @ 2015-03-03 14:27 UTC (permalink / raw)
  To: Luis R. Rodriguez, David Vrabel
  Cc: Konrad Rzeszutek Wilk, xen-devel, linux-kernel, Andy Lutomirski

On 03/03/2015 12:35 AM, Luis R. Rodriguez wrote:
> On Mon, Feb 23, 2015 at 9:09 AM, David Vrabel <david.vrabel@citrix.com> wrote:
>> On 23/02/15 16:01, Boris Ostrovsky wrote:
>>> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
>>> introduced CR4 shadows.
>>>
>>> These shadows are initialized in early boot code. The commit missed
>>> initialization for 64-bit PV(H) guests that this patch adds.
>> Applied to stable/for-linus-4.0, thanks.
>>
>> Boris, can you kick of a set of tests on this branch, please?
> Do we know worst case what should blow up without this commit ?

PVH guest will crash.

-boris


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-03-03 14:27     ` Boris Ostrovsky
@ 2015-03-03 18:15       ` Luis R. Rodriguez
  2015-03-03 18:27         ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2015-03-03 18:15 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: David Vrabel, Konrad Rzeszutek Wilk, xen-devel, linux-kernel,
	Andy Lutomirski, Andrey Ryabinin

On Tue, Mar 03, 2015 at 09:27:34AM -0500, Boris Ostrovsky wrote:
> On 03/03/2015 12:35 AM, Luis R. Rodriguez wrote:
>> On Mon, Feb 23, 2015 at 9:09 AM, David Vrabel <david.vrabel@citrix.com> wrote:
>>> On 23/02/15 16:01, Boris Ostrovsky wrote:
>>>> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
>>>> introduced CR4 shadows.
>>>>
>>>> These shadows are initialized in early boot code. The commit missed
>>>> initialization for 64-bit PV(H) guests that this patch adds.
>>> Applied to stable/for-linus-4.0, thanks.
>>>
>>> Boris, can you kick of a set of tests on this branch, please?
>> Do we know worst case what should blow up without this commit ?
>
> PVH guest will crash.

Oh wow that is serious. And this is a reactive measure to a change upstream,
it might be hard but it'd be nice if we can have a proactive architecture
to address this. Don't mind me though, I realize this seems hard, just 
thinking out loud right now. Did you find it through code inspection or
a test?

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests
  2015-03-03 18:15       ` Luis R. Rodriguez
@ 2015-03-03 18:27         ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-03 18:27 UTC (permalink / raw)
  To: Luis R. Rodriguez, Boris Ostrovsky
  Cc: David Vrabel, xen-devel, linux-kernel, Andy Lutomirski, Andrey Ryabinin

On March 3, 2015 1:15:42 PM EST, "Luis R. Rodriguez" <mcgrof@suse.com> wrote:
>On Tue, Mar 03, 2015 at 09:27:34AM -0500, Boris Ostrovsky wrote:
>> On 03/03/2015 12:35 AM, Luis R. Rodriguez wrote:
>>> On Mon, Feb 23, 2015 at 9:09 AM, David Vrabel
><david.vrabel@citrix.com> wrote:
>>>> On 23/02/15 16:01, Boris Ostrovsky wrote:
>>>>> Commit 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")
>>>>> introduced CR4 shadows.
>>>>>
>>>>> These shadows are initialized in early boot code. The commit
>missed
>>>>> initialization for 64-bit PV(H) guests that this patch adds.
>>>> Applied to stable/for-linus-4.0, thanks.
>>>>
>>>> Boris, can you kick of a set of tests on this branch, please?
>>> Do we know worst case what should blow up without this commit ?
>>
>> PVH guest will crash.
>
>Oh wow that is serious. And this is a reactive measure to a change
>upstream,
>it might be hard but it'd be nice if we can have a proactive
>architecture
>to address this. Don't mind me though, I realize this seems hard, just 
>thinking out loud right now. Did you find it through code inspection or
>a test?

Boris runs every night on different hardware an regression test against the latest Linux kernel.

>
>  Luis

L

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-03 18:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 16:01 [PATCH] x86/xen: Initialize cr4 shadow for 64-bit PV(H) guests Boris Ostrovsky
2015-02-23 16:09 ` Andy Lutomirski
2015-02-23 16:16   ` Boris Ostrovsky
2015-02-23 17:09 ` [Xen-devel] " David Vrabel
2015-03-03  5:35   ` Luis R. Rodriguez
2015-03-03 14:27     ` Boris Ostrovsky
2015-03-03 18:15       ` Luis R. Rodriguez
2015-03-03 18:27         ` Konrad Rzeszutek Wilk

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).