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

From: Paolo Bonzini
Date: Thu Feb 23 2017 - 05:58:08 EST




On 16/02/2017 17:04, Radim KrÄmÃÅ wrote:
> +
> +static inline void __kvm_request_clear(unsigned req, struct kvm_vcpu *vcpu)
> +{
> + test_bit(req, &vcpu->requests);
> }

Are you sure? :)

Paolo

> static inline bool kvm_request_test_and_clear(unsigned req, struct kvm_vcpu *vcpu)
> {
> - if (test_bit(req, &vcpu->requests)) {
> - clear_bit(req, &vcpu->requests);
> + if (__kvm_request_test(req, vcpu)) {
> + __kvm_request_clear(req, vcpu);
>
> /*
> * Ensure the rest of the request is visible to
> --