Re: [PATCH v3 05/10] KVM: arm/arm64: don't clear exit request from caller

Christoffer Dall
2017-05-10T12:19:19Z

On Wed, May 10, 2017 at 12:07:31PM +0200, Andrew Jones wrote:
> On Wed, May 10, 2017 at 11:55:11AM +0200, Christoffer Dall wrote:
> > On Tue, May 09, 2017 at 07:17:06PM +0200, Andrew Jones wrote:
> > > On Sat, May 06, 2017 at 08:12:56PM +0200, Christoffer Dall wrote:
> > > > On Wed, May 03, 2017 at 06:06:30PM +0200, Andrew Jones wrote:
> > > > > VCPU requests that the receiver should handle should only be cleared
> > > > > by the receiver.
> > > >
> > > > I cannot parse this sentence.
> > >
> > > I'll try again:
> > >
> > > VCPU requests should only be cleared by the receiving VCPUs. The only
> > > exception is when a request is set as a side-effect. In these cases
> > > the "requester" threads may clear the requests when it is sure the
> > > receiving VCPUs do not need to see them.
> > >
> >
> > I can parse this, and I mostly understand this, except for the part
> > about side-effects.
>
> E.g. kvm_vcpu_block(). This case isn't perfect, because the requester is
> also the receiver, but the protocol applies to self-requests too, so it
> still counts. Here KVM_REQ_UNHALT may be set as a side-effect of the call,
> but on exit from the call, the caller may be sure that the receiver
> (itself) doesn't care about the request, and thus can just clear it.
>

I see. You could mention this as an example if you like.

Thanks,
-Christoffer