Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583502

Re: [PATCH 5/5] KVM: add kvm_request_pending

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/5] KVM: add kvm_request_pending
Date 2017-02-17 16:00 +0100
Message-ID <tbSaS-5B2-9@gated-at.bofh.it> (permalink)
References <tbwN4-fF-9@gated-at.bofh.it> <tbwN4-fF-23@gated-at.bofh.it> <tbNuz-2Ef-53@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2017-02-17 10:51+0100, Andrew Jones:
> 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?

Sounds good; I don't think that callers would want stale values, thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] KVM: rename and extend vcpu->requests API Radim Krčmář <rkrcmar@redhat.com> - 2017-02-16 17:10 +0100
  [PATCH 5/5] KVM: add kvm_request_pending Radim Krčmář <rkrcmar@redhat.com> - 2017-02-16 17:10 +0100
    Re: [PATCH 5/5] KVM: add kvm_request_pending David Hildenbrand <david@redhat.com> - 2017-02-16 21:00 +0100
    Re: [PATCH 5/5] KVM: add kvm_request_pending Andrew Jones <drjones@redhat.com> - 2017-02-17 11:00 +0100
      Re: [PATCH 5/5] KVM: add kvm_request_pending Radim Krčmář <rkrcmar@redhat.com> - 2017-02-17 16:00 +0100
  [PATCH 2/5] KVM: add KVM request variants without barrier Radim Krčmář <rkrcmar@redhat.com> - 2017-02-16 17:10 +0100
    Re: [PATCH 2/5] KVM: add KVM request variants without barrier Paolo Bonzini <pbonzini@redhat.com> - 2017-02-23 12:00 +0100
      Re: [PATCH 2/5] KVM: add KVM request variants without barrier Radim Krčmář <rkrcmar@redhat.com> - 2017-02-23 17:00 +0100
  [PATCH 3/5] KVM: optimize kvm_make_all_cpus_request Radim Krčmář <rkrcmar@redhat.com> - 2017-02-16 17:10 +0100
  Re: [PATCH 1/5] KVM: change API for requests to match bit  operations Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-02-17 10:40 +0100
    Re: [PATCH 1/5] KVM: change API for requests to match bit operations Andrew Jones <drjones@redhat.com> - 2017-02-17 11:00 +0100
      Re: [PATCH 1/5] KVM: change API for requests to match bit  operations Cornelia Huck <cornelia.huck@de.ibm.com> - 2017-02-17 11:00 +0100
    Re: [PATCH 1/5] KVM: change API for requests to match bit operations Radim Krčmář <rkrcmar@redhat.com> - 2017-02-17 16:10 +0100

csiph-web