Re: [PATCH 13/50] KVM: PPC: booke: check for signals in kvmppc_vcpu_run

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

 



On 01/08/2012 06:21 PM, Alexander Graf wrote:
> > 
> > well, that's not actually what x86 does, but what it should be doing. 
> > The point is checking for signals after an exit is meaningless.  You've
> > exited, so the guest can't be holding off a signal for the host.  The
> > check after the exit is really meant for the next entry, but it doesn't
> > cover the first entry, so you have another check before that.
>
> Yes, but the end of the exit handler is basically the beginning of the entry loop. If we already know that we're in a heavy weight exit, we don't check for signals anymore:
>
>         if (!(r & RESUME_HOST)) {
>                 /* To avoid clobbering exit_reason, only check for signals if
>                  * we aren't already exiting to userspace for some other
>                  * reason. */
>                 if (signal_pending(current)) {
>                         run->exit_reason = KVM_EXIT_INTR;
>                         r = (-EINTR << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
>                         kvmppc_account_exit(vcpu, SIGNAL_EXITS);
>                 }
>         }
>
> That way we do basically what you're suggesting, but are a bit more explicit, having checking code at the beginning and end and some conditional checking if it's required or not.
>
>

What I'm thinking of is unifying all of this.  But ppc driving the exit
handler from assembly doesn't allow this.

The goal is not just to save code, but to make sure that the various
assumptions that generic code (like a future kvm_vcpu_kick()) makes are
satisfied implicitly, by having just one copy.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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