Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Andy Lutomirski
On Mon, Jun 20, 2016 at 7:58 AM, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only with > interrupts disabled. Let's provide them a version of

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Andy Lutomirski
On Mon, Jun 20, 2016 at 7:58 AM, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only with > interrupts disabled. Let's provide them a version of user_enter/user_exit > that skips saving

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Rik van Riel
On Mon, 2016-06-20 at 16:58 +0200, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only > with > interrupts disabled.  Let's provide them a version of > user_enter/user_exit > that skips

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Rik van Riel
On Mon, 2016-06-20 at 16:58 +0200, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only > with > interrupts disabled.  Let's provide them a version of > user_enter/user_exit > that skips

[PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Paolo Bonzini
Thanks to all the work that was done by Andy Lutomirski and others, enter_from_user_mode and prepare_exit_to_usermode are now called only with interrupts disabled. Let's provide them a version of user_enter/user_exit that skips saving and restoring the interrupt flag. On an AMD-based machine I

[PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-20 Thread Paolo Bonzini
Thanks to all the work that was done by Andy Lutomirski and others, enter_from_user_mode and prepare_exit_to_usermode are now called only with interrupts disabled. Let's provide them a version of user_enter/user_exit that skips saving and restoring the interrupt flag. On an AMD-based machine I

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > So I believe it would be cleaner to name the irqs-off code paths explicitly: > > __guest_enter_irqsoff(), and propagate that naming into other parts as well? > > Ok, I'll send v2 with both the KVM cleanups and the entry optimizations. It >

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > So I believe it would be cleaner to name the irqs-off code paths explicitly: > > __guest_enter_irqsoff(), and propagate that naming into other parts as well? > > Ok, I'll send v2 with both the KVM cleanups and the entry optimizations. It > should > be four patches

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Paolo Bonzini
> So I believe it would be cleaner to name the irqs-off code paths explicitly: > __guest_enter_irqsoff(), and propagate that naming into other parts as well? Ok, I'll send v2 with both the KVM cleanups and the entry optimizations. It should be four patches putting all things together. Thanks

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Paolo Bonzini
> So I believe it would be cleaner to name the irqs-off code paths explicitly: > __guest_enter_irqsoff(), and propagate that naming into other parts as well? Ok, I'll send v2 with both the KVM cleanups and the entry optimizations. It should be four patches putting all things together. Thanks

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > > On 08/06/2016 14:16, Ingo Molnar wrote: > > > The guest ones are not quite as consistent. I can fix that later, > > > there's no reason also to have guest context tracking split between > > > include/linux/context_tracking.h and

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > > On 08/06/2016 14:16, Ingo Molnar wrote: > > > The guest ones are not quite as consistent. I can fix that later, > > > there's no reason also to have guest context tracking split between > > > include/linux/context_tracking.h and include/linux/kvm_host.h. > > > >

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Paolo Bonzini
On 08/06/2016 14:16, Ingo Molnar wrote: > > The guest ones are not quite as consistent. I can fix that later, > > there's no reason also to have guest context tracking split between > > include/linux/context_tracking.h and include/linux/kvm_host.h. > > Could we please first do the cleanups

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Paolo Bonzini
On 08/06/2016 14:16, Ingo Molnar wrote: > > The guest ones are not quite as consistent. I can fix that later, > > there's no reason also to have guest context tracking split between > > include/linux/context_tracking.h and include/linux/kvm_host.h. > > Could we please first do the cleanups

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > > On 04/06/2016 07:07, Andy Lutomirski wrote: > > On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: > >> > >> Thanks to all the work that was done by Andy Lutomirski and others, > >> enter_from_user_mode and

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-08 Thread Ingo Molnar
* Paolo Bonzini wrote: > > > On 04/06/2016 07:07, Andy Lutomirski wrote: > > On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: > >> > >> Thanks to all the work that was done by Andy Lutomirski and others, > >> enter_from_user_mode and prepare_exit_to_usermode are now called only with > >>

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-06 Thread Paolo Bonzini
On 04/06/2016 07:07, Andy Lutomirski wrote: > On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: >> >> Thanks to all the work that was done by Andy Lutomirski and others, >> enter_from_user_mode and prepare_exit_to_usermode are now called only with >> interrupts disabled.

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-06 Thread Paolo Bonzini
On 04/06/2016 07:07, Andy Lutomirski wrote: > On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: >> >> Thanks to all the work that was done by Andy Lutomirski and others, >> enter_from_user_mode and prepare_exit_to_usermode are now called only with >> interrupts disabled. Let's provide them a

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-03 Thread Andy Lutomirski
On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: > > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only with > interrupts disabled. Let's provide them a version of user_enter/user_exit >

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-03 Thread Andy Lutomirski
On May 30, 2016 5:30 AM, "Paolo Bonzini" wrote: > > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only with > interrupts disabled. Let's provide them a version of user_enter/user_exit > that skips saving and

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-01 Thread Rik van Riel
On Mon, 2016-05-30 at 14:30 +0200, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only > with > interrupts disabled.  Let's provide them a version of > user_enter/user_exit > that skips

Re: [PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-06-01 Thread Rik van Riel
On Mon, 2016-05-30 at 14:30 +0200, Paolo Bonzini wrote: > Thanks to all the work that was done by Andy Lutomirski and others, > enter_from_user_mode and prepare_exit_to_usermode are now called only > with > interrupts disabled.  Let's provide them a version of > user_enter/user_exit > that skips

[PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-05-30 Thread Paolo Bonzini
Thanks to all the work that was done by Andy Lutomirski and others, enter_from_user_mode and prepare_exit_to_usermode are now called only with interrupts disabled. Let's provide them a version of user_enter/user_exit that skips saving and restoring the interrupt flag. On an AMD-based machine I

[PATCH 1/2] x86/entry: Avoid interrupt flag save and restore

2016-05-30 Thread Paolo Bonzini
Thanks to all the work that was done by Andy Lutomirski and others, enter_from_user_mode and prepare_exit_to_usermode are now called only with interrupts disabled. Let's provide them a version of user_enter/user_exit that skips saving and restoring the interrupt flag. On an AMD-based machine I