From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSlMn-0004AY-J9 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:52:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSlMk-00006s-QJ for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:52:01 -0500 Received: from mail-la0-f42.google.com ([209.85.215.42]:37196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSlMk-00006k-J9 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 06:51:58 -0500 Received: by labhs14 with SMTP id hs14so36807441lab.4 for ; Tue, 03 Mar 2015 03:51:57 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <54F595C0.5060004@redhat.com> References: <1424880159-29348-1-git-send-email-alex.bennee@linaro.org> <1424880159-29348-2-git-send-email-alex.bennee@linaro.org> <8761ai73j1.fsf@linaro.org> <54F595C0.5060004@redhat.com> From: Peter Maydell Date: Tue, 3 Mar 2015 20:51:37 +0900 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/6] target-arm: kvm: save/restore mp state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kvm-devel , Marc Zyngier , QEMU Developers , Christoffer Dall , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , arm-mail-list On 3 March 2015 at 20:06, Paolo Bonzini wrote: > > > On 03/03/2015 11:56, Alex Benn=C3=A9e wrote: >> > > This adds the saving and restore of the current Multi-Processing sta= te >> > > of the machine. While the KVM_GET/SET_MP_STATE API exposes a number = of >> > > potential states for x86 we only use two for ARM. Either the process= is >> > > running or not. >> > >> > By this you mean "is the CPU in the PSCI powered down state or not", >> > right? >> >> From the vcpu's perspective it is either running or not. However it is >> the same mechanism that is used when PSCI_0_2_FN_CPU_OFF is passed the >> VM, internally setting vcpu->arch.paused. Well, it has to be (ABI defined to be) identical with being PSCI powered down/up, because that's how userspace is going to be treating it. If we might tell userspace we're in the "not running" state for other cases than PSCI-powered-down then we probably need to consider separating those out into separate states. > I suggest that you define a new MP_STATE constant for this. HALTED in > x86 and s390 is the state an ARM processor enters when you execute wfi. Architecturally the CPU doesn't have to enter any state at all if you execute a WFI -- it might be implemented as "go to low power state and wait for an interrupt" or "go low power but maybe be unnecessarily woken up" or "nop, do nothing"... > Right now this is not migrated on ARM if I remember correctly, but > perhaps you'll want to add it in the future. ...which is why we don't need to migrate this: it just means that migration during WFI causes an unnecessary-wakeup, which is architecturally fine. -- PMM