On 26/04/2017 22:32, Radim Krčmář wrote:
>  v2: replaces [v1 1/6]
>      Ugh, KVM_ARCH_REQ_WAIT_NO_WAKEUP looks a weird ...

Yeah, let's drop patch 7 and just use bits for now.  I think using
KVM_ARCH_REQ_FLAGS directly should be fine, especially after the default
is flipped from "no wakeup" to "wakeup", but for 4.12 this is the
simplest incremental step.

> +/* TODO: merge with kvm_arch_vcpu_should_kick */
> +static bool kvm_should_kick_request(struct kvm_vcpu *vcpu, unsigned req)

I'm renaming this to kvm_request_needs_ipi; the point of the IPI for
synchronous requests is not the "kick", but the "ack" that comes back.

Paolo

> +{
> +     int mode = kvm_vcpu_exiting_guest_mode(vcpu);
> +
> +     return req & KVM_REQUEST_WAIT ?
> +             mode != OUTSIDE_GUEST_MODE : mode == IN_GUEST_MODE;
> +}
> +

Reply via email to