[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFEAcA-6dEBcOZYOP69G8z+6hxCTBdhV9Tv9vBA1C6kSc7UkJg@mail.gmail.com>
Date: Thu, 31 Jul 2014 17:53:56 +0100
From: Peter Maydell <peter.maydell@...aro.org>
To: Christoffer Dall <christoffer.dall@...aro.org>
Cc: Alex Bennée <alex.bennee@...aro.org>,
kvm-devel <kvm@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
open list <linux-kernel@...r.kernel.org>,
Gleb Natapov <gleb@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
arm-mail-list <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] arm64: KVM: export current vcpu->pause state via pseudo regs
On 31 July 2014 17:50, Christoffer Dall <christoffer.dall@...aro.org> wrote:
> On Thu, Jul 31, 2014 at 05:45:28PM +0100, Peter Maydell wrote:
>> Consider the case where the reset state of the system is
>> "CPU 0 running, CPUs 1..N stopped", and we're doing an
>> incoming migration to a state where all CPUs are running.
>> In that case we'll be using this ioctl to clear the pause flag,
>> right? (We'll also obviously need to set the PC and other
>> register state correctly before resuming the guest.)
>>
> Doh, you're right, I somehow had it in my mind that when you send the
> thread a signal, the pause flag would be cleared, but that goes against
> the whole idea of a CPU being turned off for KVM.
>
> But wouldn't we then have to also wake up the thread when clearing the
> pause flag? It feels strange that the ioctl can clear the pause flag,
> but keep the thread on a wake-queue, and then userspace has to send the
> thread a signal of some sort to wake it up?
I have no idea about the implementation, I just know what
the user-facing ABI ought to look like. In particular userspace
definitely shouldn't have to send the thread any kind of
signal, it should just use KVM_RUN as usual and that should
cause the vCPU to either remain powered-down or start
executing code, as appropriate for the state we've just set.
-- PMM
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists