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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux