Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-03-01 Thread Peter Xu
On Thu, Mar 02, 2017 at 09:15:33AM +0800, Peter Xu wrote: [...] > Meanwhile, I think it's still worthwhile to go through the patch even > it's from cocinelle since sometimes coccinelle might do something that > we (or only me?) didn't expect. E.g., afaik it cannot handle well with > over-80-chars

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-03-01 Thread Peter Xu
On Wed, Mar 01, 2017 at 06:02:49PM +0100, Radim Krčmář wrote: > 2017-02-28 15:40+0800, Peter Xu: > > On Tue, Feb 28, 2017 at 03:34:24PM +0800, Peter Xu wrote: > > > > [...] > > > >> > diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c > >> > index ee4af898bcf6..552ae2b5e911 100644 > >

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-03-01 Thread Radim Krčmář
2017-02-28 15:40+0800, Peter Xu: > On Tue, Feb 28, 2017 at 03:34:24PM +0800, Peter Xu wrote: > > [...] > >> > diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c >> > index ee4af898bcf6..552ae2b5e911 100644 >> > --- a/arch/mips/kvm/emulate.c >> > +++ b/arch/mips/kvm/emulate.c >> > @@ -

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-03-01 Thread Radim Krčmář
2017-02-27 11:18+0100, David Hildenbrand: > Am 27.02.2017 um 11:02 schrieb David Hildenbrand: >> Am 24.02.2017 um 20:49 schrieb Radim Krčmář: >>> The leading underscores denote that the call is just a bitop wrapper. >> >> Actually, the leading underscore is misleading >> >> If we want to match th

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-02-27 Thread Peter Xu
On Tue, Feb 28, 2017 at 03:34:24PM +0800, Peter Xu wrote: [...] > > diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c > > index ee4af898bcf6..552ae2b5e911 100644 > > --- a/arch/mips/kvm/emulate.c > > +++ b/arch/mips/kvm/emulate.c > > @@ -865,7 +865,7 @@ enum emulation_result kvm_mips

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-02-27 Thread Peter Xu
On Fri, Feb 24, 2017 at 08:49:59PM +0100, Radim Krčmář wrote: > The leading underscores denote that the call is just a bitop wrapper. > > Switch all users of open-coded set/check/test to kvm_request ones. > > Automated by coccinelle script: > @@ > expression VCPU, REQ; > @@ > -set_bit(REQ

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-02-27 Thread David Hildenbrand
Am 27.02.2017 um 11:02 schrieb David Hildenbrand: > Am 24.02.2017 um 20:49 schrieb Radim Krčmář: >> The leading underscores denote that the call is just a bitop wrapper. > > Actually, the leading underscore is misleading > > If we want to match the semantics of set/test/clear_bit, using a leading

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-02-27 Thread David Hildenbrand
Am 24.02.2017 um 20:49 schrieb Radim Krčmář: > The leading underscores denote that the call is just a bitop wrapper. Actually, the leading underscore is misleading If we want to match the semantics of set/test/clear_bit, using a leading underscore might feel like using the non-atomic variants lik

[PATCH v2 2/5] KVM: add KVM request variants without barrier

2017-02-24 Thread Radim Krčmář
The leading underscores denote that the call is just a bitop wrapper. Switch all users of open-coded set/check/test to kvm_request ones. Automated by coccinelle script: @@ expression VCPU, REQ; @@ -set_bit(REQ, &VCPU->requests) +__kvm_request_set(REQ, VCPU) @@ expression VCPU, REQ;