lkml.org 
[lkml]   [2017]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/5] KVM: add kvm_request_pending
    On Thu, Feb 16, 2017 at 05:04:49PM +0100, Radim Krčmář wrote:
    ...
    > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
    > index 2cc438685af8..563cf964dc5c 100644
    > --- a/include/linux/kvm_host.h
    > +++ b/include/linux/kvm_host.h
    > @@ -1101,6 +1101,11 @@ static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
    > * should contain kvm_vcpu_kick().
    > */
    >
    > +static inline bool kvm_request_pending(struct kvm_vcpu *vcpu)
    > +{
    > + return vcpu->requests;

    How about wrapping this with READ_ONCE for good measure?

    > +}
    > +
    > static inline void __kvm_request_set(unsigned req, struct kvm_vcpu *vcpu)
    > {
    > set_bit(req, &vcpu->requests);
    > --
    > 2.11.1
    >

    Thanks,
    drew

    \
     
     \ /
      Last update: 2017-02-17 11:02    [W:3.179 / U:0.292 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site