Re: [PATCH v4 2/2] x86, arm, platform, xen, kconfig: add xen defconfig helper

2015-02-10 Thread David Rientjes
On Tue, 10 Feb 2015, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > This lets you build a kernel which can support xen dom0 > or xen guests by just using: > >make xenconfig > > on both x86 and arm64 kernels. This also splits out the > options which are available currently to be b

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Jeremy Fitzhardinge
On 02/10/2015 05:26 AM, Oleg Nesterov wrote: > On 02/10, Raghavendra K T wrote: >> On 02/10/2015 06:23 AM, Linus Torvalds wrote: >> >>> add_smp(&lock->tickets.head, TICKET_LOCK_INC); >>> if (READ_ONCE(lock->tickets.tail) & TICKET_SLOWPATH_FLAG) .. >>> >>> into something like >>>

[PATCH v4 2/2] x86, arm, platform, xen, kconfig: add xen defconfig helper

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" This lets you build a kernel which can support xen dom0 or xen guests by just using: make xenconfig on both x86 and arm64 kernels. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config. Techn

[PATCH v4 1/2] x86, platform, xen, kconfig: clarify kvmconfig is for kvm

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" We'll be adding options for xen as well. Cc: Josh Triplett Cc: Borislav Petkov Cc: Pekka Enberg Cc: David Rientjes Cc: Michal Marek Cc: Randy Dunlap Cc: penb...@kernel.org Cc: levinsasha...@gmail.com Cc: mtosa...@redhat.com Cc: fengguang...@intel.com Cc: David Vra

[PATCH v4 0/2] x86/arm64: add xenconfig

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" This v4 addresses the missing CONFIG_HYPERVISOR_GUEST and CONFIG_PARAVIRT as noted by David. Luis R. Rodriguez (2): x86, platform, xen, kconfig: clarify kvmconfig is for kvm x86, arm, platform, xen, kconfig: add xen defconfig helper arch/x86/configs/xen.config | 1

Re: [PATCH v3 RESEND] 2/2] x86, arm, platform, xen, kconfig: add xen defconfig helper

2015-02-10 Thread Luis R. Rodriguez
On Tue, Feb 10, 2015 at 04:49:13PM -0800, David Rientjes wrote: > On Tue, 10 Feb 2015, Luis R. Rodriguez wrote: > > > From: "Luis R. Rodriguez" > > > > This lets you build a kernel which can support xen dom0 > > or xen guests by just using: > > > >make xenconfig > > > > on both x86 and arm

Re: [PATCH] KVM: x86: emulate: correct page fault error code for NoWrite instructions

2015-02-10 Thread Nadav Amit
Sorry for that. I’ll try to run some few more tests next week. Nadav Paolo Bonzini wrote: > NoWrite instructions (e.g. cmp or test) never set the "write access" > bit in the error code, even if one of the operands is treated as a > destination. > > Fixes: c205fb7d7d4f81e46fc577b707ceb9e356af14

Re: [PATCH v3 RESEND] 2/2] x86, arm, platform, xen, kconfig: add xen defconfig helper

2015-02-10 Thread David Rientjes
On Tue, 10 Feb 2015, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > This lets you build a kernel which can support xen dom0 > or xen guests by just using: > >make xenconfig > > on both x86 and arm64 kernels. This also splits out the > options which are available currently to be b

[PATCH] virtual: Documentation: simplify and generalize paravirt_ops.txt

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" The general documentation we have for pv_ops is currenty present on the IA64 docs, but since this documentation covers IA64 xen enablement and IA64 Xen support got ripped out a while ago through commit d52eefb47 present since v3.14-rc1 lets just simplify, generalize and

[PATCH v3 RESEND] 2/2] x86, arm, platform, xen, kconfig: add xen defconfig helper

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" This lets you build a kernel which can support xen dom0 or xen guests by just using: make xenconfig on both x86 and arm64 kernels. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config. Techn

[PATCH v3 RESEND] 1/2] x86, platform, xen, kconfig: clarify kvmconfig is for kvm

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" We'll be adding options for xen as well. Cc: Josh Triplett Cc: Borislav Petkov Cc: Pekka Enberg Cc: David Rientjes Cc: Michal Marek Cc: Randy Dunlap Cc: penb...@kernel.org Cc: levinsasha...@gmail.com Cc: mtosa...@redhat.com Cc: fengguang...@intel.com Cc: David Vra

[PATCH v3 RESEND] 0/2] x86/arm64: add xenconfig

2015-02-10 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" Resending to the maintainers that it was recommended to try. Ingo, Thomas, Andrew, who should this go through? Please note that the Kconfig maintainer is not available anymore and it was recommended this go through that person first, meanwhile while that is ironed out it

Re: [PATCH v3 0/2] x86/arm64: add xenconfig

2015-02-10 Thread Paul Bolle
On Tue, 2015-02-10 at 14:21 -0800, David Rientjes wrote: > We need an update to the MAINTAINERS file if "Yann E. MORIN" > isn't the active Kconfig maintainer anymore. Yes, we do. Michal, what update would you suggest? Thanks, Paul Bolle -- To unsubscribe from this list: send the line "unsub

Re: [PATCH v3 0/2] x86/arm64: add xenconfig

2015-02-10 Thread David Rientjes
On Fri, 6 Feb 2015, Luis R. Rodriguez wrote: > David should this go through your tree? Can anyone provide pointers? > I think it should probably go through Michal's tree? It would help to have an ack from at least one of the x86 maintainers, so maybe add Ingo Molnar and Thomas Gleixner . We

Re: [PATCH 5/5] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:54PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > The host kernel is not doing anything while the CPU is executing > a KVM guest VCPU, so it can be marked as being in an extended > quiescent state, identical to that used when running user space > code. > >

Re: [PATCH 4/5] nohz,kvm: export context_tracking_user_enter/exit

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:53PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > Export context_tracking_user_enter/exit so it can be used by KVM. > > Signed-off-by: Rik van Riel Reviewed-by: Paul E. McKenney > --- > kernel/context_tracking.c | 2 ++ > 1 file changed, 2 insertions(

Re: [PATCH 3/5] rcu,nohz: run vtime_user_enter/exit only when state == IN_USER

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:52PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > Only run vtime_user_enter, vtime_user_exit, and the user enter & exit > trace points when we are entering or exiting user state, respectively. > > The KVM code in guest_enter and guest_exit already take car

Re: [PATCH 2/5] nohz: add stub context_tracking_is_enabled

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:51PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > With code elsewhere doing something conditional on whether or not > context tracking is enabled, we want a stub function that tells us > context tracking is not enabled, when CONFIG_CONTEXT_TRACKING is > not

Re: [PATCH 1/5] context_tracking: generalize context tracking APIs to support user and guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:50PM -0500, r...@redhat.com wrote: > From: Rik van Riel > > Split out the mechanism from context_tracking_user_enter and > context_tracking_user_exit into context_tracking_enter and > context_tracking_exit. Leave the old functions in order to avoid > breaking ARM, wh

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 01:00:35PM -0800, Andy Lutomirski wrote: > On Tue, Feb 10, 2015 at 12:42 PM, Paul E. McKenney > wrote: > > On Tue, Feb 10, 2015 at 12:19:28PM -0800, Andy Lutomirski wrote: > >> On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney > >> wrote: > >> > On Tue, Feb 10, 2015 at 11

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Andy Lutomirski
On Tue, Feb 10, 2015 at 12:42 PM, Paul E. McKenney wrote: > On Tue, Feb 10, 2015 at 12:19:28PM -0800, Andy Lutomirski wrote: >> On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney >> wrote: >> > On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: >> >> On 02/10/2015 06:41 AM, r...@red

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 12:19:28PM -0800, Andy Lutomirski wrote: > On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney > wrote: > > On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: > >> On 02/10/2015 06:41 AM, r...@redhat.com wrote: > >> >From: Rik van Riel > >> > > >> >The host ke

[PATCH 4/5] nohz,kvm: export context_tracking_user_enter/exit

2015-02-10 Thread riel
From: Rik van Riel Export context_tracking_user_enter/exit so it can be used by KVM. Signed-off-by: Rik van Riel --- kernel/context_tracking.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 0e4e318d5ea4..5bdf1a342ab3 100644 ---

[PATCH -v5 0/5] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread riel
When running a KVM guest on a system with NOHZ_FULL enabled, and the KVM guest running with idle=poll mode, we still get wakeups of the rcuos/N threads. This problem has already been solved for user space by telling the RCU subsystem that the CPU is in an extended quiescent state while running use

[PATCH 2/5] nohz: add stub context_tracking_is_enabled

2015-02-10 Thread riel
From: Rik van Riel With code elsewhere doing something conditional on whether or not context tracking is enabled, we want a stub function that tells us context tracking is not enabled, when CONFIG_CONTEXT_TRACKING is not set. Signed-off-by: Rik van Riel --- include/linux/context_tracking_state

[PATCH 5/5] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread riel
From: Rik van Riel The host kernel is not doing anything while the CPU is executing a KVM guest VCPU, so it can be marked as being in an extended quiescent state, identical to that used when running user space code. The only exception to that rule is when the host handles an interrupt, which is

[PATCH 1/5] context_tracking: generalize context tracking APIs to support user and guest

2015-02-10 Thread riel
From: Rik van Riel Split out the mechanism from context_tracking_user_enter and context_tracking_user_exit into context_tracking_enter and context_tracking_exit. Leave the old functions in order to avoid breaking ARM, which calls these functions from assembler code, and cannot easily use C enum p

[PATCH 3/5] rcu,nohz: run vtime_user_enter/exit only when state == IN_USER

2015-02-10 Thread riel
From: Rik van Riel Only run vtime_user_enter, vtime_user_exit, and the user enter & exit trace points when we are entering or exiting user state, respectively. The KVM code in guest_enter and guest_exit already take care of calling vtime_guest_enter and vtime_guest_exit, respectively. The RCU c

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Andy Lutomirski
On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney wrote: > On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: >> On 02/10/2015 06:41 AM, r...@redhat.com wrote: >> >From: Rik van Riel >> > >> >The host kernel is not doing anything while the CPU is executing >> >a KVM guest VCPU, so

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: > On 02/10/2015 06:41 AM, r...@redhat.com wrote: > >From: Rik van Riel > > > >The host kernel is not doing anything while the CPU is executing > >a KVM guest VCPU, so it can be marked as being in an extended > >quiescent state, ident

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Rik van Riel
On 02/10/2015 02:59 PM, Andy Lutomirski wrote: > On 02/10/2015 06:41 AM, r...@redhat.com wrote: >> From: Rik van Riel >> >> The host kernel is not doing anything while the CPU is executing >> a KVM guest VCPU, so it can be marked as being in an extended >> quiescent state, identical to that used w

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Andy Lutomirski
On 02/10/2015 06:41 AM, r...@redhat.com wrote: From: Rik van Riel The host kernel is not doing anything while the CPU is executing a KVM guest VCPU, so it can be marked as being in an extended quiescent state, identical to that used when running user space code. The only exception to that rule

Re: [PATCH 2/2] KVM: x86: optimize delivery of TSC deadline timer interrupt

2015-02-10 Thread Marcelo Tosatti
On Sat, Feb 07, 2015 at 09:33:09PM +0100, Paolo Bonzini wrote: > > Can remove another 300 cycles from do_div when programming LAPIC > > tscdeadline timer. > > Do you mean using something like lib/reciprocal_div.c? Yes. > Good idea, > though that's not latency, it's just being slow. :) It adds

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 06:36:47PM +0100, Frederic Weisbecker wrote: > On Tue, Feb 10, 2015 at 09:25:26AM -0800, Paul E. McKenney wrote: > > On Tue, Feb 10, 2015 at 11:48:37AM -0500, Rik van Riel wrote: > > > On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: > > > > On Tue, Feb 10, 2015 at 09:41:4

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Frederic Weisbecker
On Tue, Feb 10, 2015 at 09:25:26AM -0800, Paul E. McKenney wrote: > On Tue, Feb 10, 2015 at 11:48:37AM -0500, Rik van Riel wrote: > > On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: > > > On Tue, Feb 10, 2015 at 09:41:45AM -0500, r...@redhat.com wrote: > > >> From: Rik van Riel > > >> > > >> Th

KVM call for agenda for 2015-02-17

2015-02-10 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Call details: By popular demand, a google calendar public entry with it https://www.google.com/calendar/embed?src=dG9iMXRqcXAzN3Y4ZXZwNzRoMHE4a3BqcXNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ (Let me know if you have any problems wi

[Bug 92291] kvm/guest crashes when smp > 1 with AMD FX8300; with host kernel oops from abrt as well

2015-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=92291 Paolo Bonzini changed: What|Removed |Added CC||bonz...@gnu.org --- Comment #7 from Paolo

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 11:48:37AM -0500, Rik van Riel wrote: > On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: > > On Tue, Feb 10, 2015 at 09:41:45AM -0500, r...@redhat.com wrote: > >> From: Rik van Riel > >> > >> These wrapper functions allow architecture code (eg. ARM) to keep > >> calling c

Re: [PATCH 4/5] add single_task_running

2015-02-10 Thread Paolo Bonzini
On 10/02/2015 17:46, Jan Kiszka wrote: >> > +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) >> > +bool single_task_running(void) >> > +{ >> > + /* Not exactly the same... */ >> > + return !need_resched(); >> > +} >> > +#endif >> > > 3.15 and earlier lacks ktime_before in addition, see e.g. >

[Bug 92291] kvm/guest crashes when smp > 1 with AMD FX8300; with host kernel oops from abrt as well

2015-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=92291 Alan changed: What|Removed |Added Status|NEW |NEEDINFO CC|

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Rik van Riel
On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: > On Tue, Feb 10, 2015 at 09:41:45AM -0500, r...@redhat.com wrote: >> From: Rik van Riel >> >> These wrapper functions allow architecture code (eg. ARM) to keep >> calling context_tracking_user_enter & context_tracking_user_exit >> the same way it

Email alert

2015-02-10 Thread WEBMASTER
E-mail ®account needs to be updated with the F-Secure R-HTK4S new (2015) version of the anti-spam/anti-virus/anti-spyware. Please click on the link below for updates ==>>http://goo.gl/O5XNZs Sorry for the inconvenience. Regards, WEBMAIL ADMINISTRATOR Copyright © 2015 All rights reserved ®. ABN 3

Re: [PATCH 4/5] add single_task_running

2015-02-10 Thread Jan Kiszka
On 2015-02-10 14:14, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > external-module-compat-comm.h | 4 > external-module-compat.c | 8 > 2 files changed, 12 insertions(+) > > diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h > index d683c3

Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63

2015-02-10 Thread Paolo Bonzini
On 10/02/2015 17:34, Jan Kiszka wrote: >> > >> > commit cfaa790a3fb8a7efa98f4a6457e19dc3a0db35d3 >> > Author: Borislav Petkov >> > Date: Thu Jan 15 09:44:56 2015 +0100 >> > >> > kvm: Fix CR3_PCID_INVD type on 32-bit >> > >> > arch/x86/kvm/emulate.c: In function ‘check_cr_write’:

Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63

2015-02-10 Thread Jan Kiszka
On 2015-02-10 17:18, Paolo Bonzini wrote: > On 10/02/2015 17:15, Jan Kiszka wrote: #define CR3_L_MODE_RESERVED_BITS 0xFF00ULL +#define CR3_PCID_INVD (1UL << 63) >> 1ULL (for i386) > > Already fixed: > > commit cfaa790a3fb8a7efa98f4a6457e19dc3a0db35d3 > Author:

Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63

2015-02-10 Thread Paolo Bonzini
On 10/02/2015 17:15, Jan Kiszka wrote: >> > #define CR3_L_MODE_RESERVED_BITS 0xFF00ULL >> > +#define CR3_PCID_INVD (1UL << 63) > 1ULL (for i386) Already fixed: commit cfaa790a3fb8a7efa98f4a6457e19dc3a0db35d3 Author: Borislav Petkov Date: Thu Jan 15 09:44:56 2015 +01

Re: [PATCH 12/21] KVM: x86: MOV to CR3 can set bit 63

2015-02-10 Thread Jan Kiszka
On 2014-11-02 10:54, Nadav Amit wrote: > Although Intel SDM mentions bit 63 is reserved, MOV to CR3 can have bit 63 > set. > As Intel SDM states in section 4.10.4 "Invalidation of TLBs and > Paging-Structure Caches": " MOV to CR3. ... If CR4.PCIDE = 1 and bit 63 of the > instruction’s source opera

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Frederic Weisbecker
On Tue, Feb 10, 2015 at 09:41:45AM -0500, r...@redhat.com wrote: > From: Rik van Riel > > These wrapper functions allow architecture code (eg. ARM) to keep > calling context_tracking_user_enter & context_tracking_user_exit > the same way it always has, without error prone tricks like duplicate >

[PATCH 5/6] nohz,kvm: export context_tracking_user_enter/exit

2015-02-10 Thread riel
From: Rik van Riel Export context_tracking_user_enter/exit so it can be used by KVM. Signed-off-by: Rik van Riel --- kernel/context_tracking.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index 0e4e318d5ea4..5bdf1a342ab3 100644 ---

[PATCH 2/6] rcu,nohz: add state parameter to context_tracking_enter/exit

2015-02-10 Thread riel
From: Rik van Riel Add the expected ctx_state as a parameter to context_tracking_enter and context_tracking_exit, allowing the same functions to not just track kernel <> user space switching, but also kernel <> guest transitions. Signed-off-by: Rik van Riel --- include/linux/context_tracking.h

[PATCH 4/6] rcu,nohz: run vtime_user_enter/exit only when state == IN_USER

2015-02-10 Thread riel
From: Rik van Riel Only run vtime_user_enter, vtime_user_exit, and the user enter & exit trace points when we are entering or exiting user state, respectively. The KVM code in guest_enter and guest_exit already take care of calling vtime_guest_enter and vtime_guest_exit, respectively. The RCU c

[PATCH -v4 0/6] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread riel
When running a KVM guest on a system with NOHZ_FULL enabled, and the KVM guest running with idle=poll mode, we still get wakeups of the rcuos/N threads. This problem has already been solved for user space by telling the RCU subsystem that the CPU is in an extended quiescent state while running use

[PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread riel
From: Rik van Riel These wrapper functions allow architecture code (eg. ARM) to keep calling context_tracking_user_enter & context_tracking_user_exit the same way it always has, without error prone tricks like duplicate defines of argument values in assembly code. Signed-off-by: Rik van Riel --

[PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread riel
From: Rik van Riel The host kernel is not doing anything while the CPU is executing a KVM guest VCPU, so it can be marked as being in an extended quiescent state, identical to that used when running user space code. The only exception to that rule is when the host handles an interrupt, which is

[PATCH 3/6] nohz: add stub context_tracking_is_enabled

2015-02-10 Thread riel
From: Rik van Riel With code elsewhere doing something conditional on whether or not context tracking is enabled, we want a stub function that tells us context tracking is not enabled, when CONFIG_CONTEXT_TRACKING is not set. Signed-off-by: Rik van Riel --- include/linux/context_tracking_state

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Oleg Nesterov
On 02/10, Denys Vlasenko wrote: > > # define HEAD_MASK (TICKET_SLOWPATH_FLAG-1) > > ... > unlock_again: > > val = xadd((&lock->ticket.head_tail, TICKET_LOCK_INC); > if (unlikely(!(val & HEAD_MASK))) { > /* overflow. we inadvertently incremented the tail word. > * tail's lsb is TICKET_SLOWP

Your Email Account has been temporally suspended!!!

2015-02-10 Thread Admin
Dear Email Account User, We recently detected an unusual activity from your email account, hence your mailbox has been temporally suspended by the system administrator, please recover your account by clicking on the following link OR copy to your browser: http://helpdeskcenter4428.w

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Oleg Nesterov
On 02/10, Raghavendra K T wrote: > > On 02/10/2015 06:23 AM, Linus Torvalds wrote: > >> add_smp(&lock->tickets.head, TICKET_LOCK_INC); >> if (READ_ONCE(lock->tickets.tail) & TICKET_SLOWPATH_FLAG) .. >> >> into something like >> >> val = xadd((&lock->ticket.head_tail, TICK

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Sasha Levin
On 02/10/2015 04:30 AM, Raghavendra K T wrote: >> >> So I think Raghavendra's last version (which hopefully fixes the >> lockup problem that Sasha reported) together with changing that > > V2 did pass the stress, but getting confirmation Sasha would help. I've been running it for the last two day

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Denys Vlasenko
On Tue, Feb 10, 2015 at 2:18 PM, Denys Vlasenko wrote: > while (1) { > if (READ_ONCE(lock->tickets.head) != TICKET_TAIL(val)) > cpu_relax(); > } Doh should be while (READ_ONCE(lock->tickets.head) != TICKET_TAIL(val) cpu_relax(

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Denys Vlasenko
On Tue, Feb 10, 2015 at 10:30 AM, Raghavendra K T wrote: > On 02/10/2015 06:23 AM, Linus Torvalds wrote: >> add_smp(&lock->tickets.head, TICKET_LOCK_INC); >> if (READ_ONCE(lock->tickets.tail) & TICKET_SLOWPATH_FLAG) .. >> >> into something like >> >> val = xadd((&lock->t

[PATCH 3/5] add CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT

2015-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- x86/external-module-compat.h | 4 1 file changed, 4 insertions(+) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 475643a..79f2b76 100644 --- a/x86/external-module-compat.h +++ b/x86/external-module-compat.h @@ -51,6 +51,10 @@

[PATCH 5/5] tweak replacement for POSTED_INTR_VECTOR

2015-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Not tested with APICv! --- sync | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sync b/sync index 3086b70..36bed39 100755 --- a/sync +++ b/sync @@ -341,13 +341,18 @@ def hack_content(fname, data): if line == '\tif

[PATCH 1/5] add AVX512 features

2015-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- x86/external-module-compat.h | 16 1 file changed, 16 insertions(+) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 94cdb45..475643a 100644 --- a/x86/external-module-compat.h +++ b/x86/external-module-compat.h @@ -4

[PATCH 2/5] fix missing get_xsave_addr in kernels 3.17-3.18.2

2015-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- external-module-compat-comm.h | 2 +- external-module-compat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 66cfde2..d683c30 100644 --- a/external-module-compat-comm

[PATCH 4/5] add single_task_running

2015-02-10 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- external-module-compat-comm.h | 4 external-module-compat.c | 8 2 files changed, 12 insertions(+) diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index d683c30..456ebf8 100644 --- a/external-module-compat-comm.h +++

[PATCH kvm-kmod 0/5] update for 3.20-rc1 (roughly)

2015-02-10 Thread Paolo Bonzini
The last patch is still mostly untested. Paolo Bonzini (5): add AVX512 features fix missing get_xsave_addr in kernels 3.17-3.18.2 add CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT add single_task_running tweak replacement for POSTED_INTR_VECTOR external-module-compat-comm.h | 6 +- ext

[PATCH 1/2] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
Export the _save_fp asm function used by the lose_fpu(1) macro to GPL modules so that KVM can make use of it when it is built as a module. This fixes the following build error when CONFIG_KVM=m due to commit f798217dfd03 ("KVM: MIPS: Don't leak FPU/DSP to guest"): ERROR: "_save_fp" [arch/mips/kvm

[PATCH 0/2] MIPS: Export functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
These two patches export the _save_fp and _save_msa asm function used by the lose_fpu(1) macro to GPL modules so that KVM can make use of it when it is built as a module. This fixes the following build errors when CONFIG_KVM=m [and CONFIG_CPU_HAS_MSA=y] due to commit f798217dfd03 ("KVM: MIPS: Don'

[PATCH 2/2] MIPS: Export MSA functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
Export the _save_msa asm function used by the lose_fpu(1) macro to GPL modules so that KVM can make use of it when it is built as a module. This fixes the following build error when CONFIG_KVM=m and CONFIG_CPU_HAS_MSA=y due to commit f798217dfd03 ("KVM: MIPS: Don't leak FPU/DSP to guest"): ERROR:

Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

2015-02-10 Thread Raghavendra K T
On 02/10/2015 06:23 AM, Linus Torvalds wrote: On Mon, Feb 9, 2015 at 4:02 AM, Peter Zijlstra wrote: On Mon, Feb 09, 2015 at 03:04:22PM +0530, Raghavendra K T wrote: So we have 3 choices, 1. xadd 2. continue with current approach. 3. a read before unlock and also after that. For the truly par

Re: [PATCH 1/2] KVM: x86: extract guest running logic from __vcpu_run

2015-02-10 Thread Paolo Bonzini
On 09/02/2015 23:44, David Matlack wrote: >> > >> > +static inline int __vcpu_run(struct kvm *kvm, struct kvm_vcpu *vcpu) > Kind of confusing function body given the name. Maybe put > >if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && >!vcpu->arch.apf.halted) >

Re: [PATCH] KVM: MIPS: Don't leak FPU/DSP to guest

2015-02-10 Thread James Hogan
On Tue, Feb 10, 2015 at 09:01:07AM +0100, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 09/02/2015 23:58, James Hogan wrote: > >> First lets save and disable the FPU (and MSA) state with > >> lose_fpu(1) > > > > Please don't apply this patch yet. lose_fpu() u

Re: [PATCH] KVM: MIPS: Don't leak FPU/DSP to guest

2015-02-10 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/02/2015 23:58, James Hogan wrote: >> First lets save and disable the FPU (and MSA) state with >> lose_fpu(1) > > Please don't apply this patch yet. lose_fpu() uses function > symbols which aren't exported for modules to use yet, so that'll > n