From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] arm64: KVM: export current vcpu->pause state via pseudo regs Date: Thu, 31 Jul 2014 18:57:39 +0200 Message-ID: <53DA7583.2030504@redhat.com> References: <1404914112-7298-1-git-send-email-alex.bennee@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Christoffer Dall , Marc Zyngier , Catalin Marinas , Will Deacon , Gleb Natapov , open list To: =?UTF-8?B?QWxleCBCZW5uw6ll?= , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Return-path: In-Reply-To: <1404914112-7298-1-git-send-email-alex.bennee@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Il 09/07/2014 15:55, Alex Benn=C3=A9e ha scritto: > To cleanly restore an SMP VM we need to ensure that the current pause > state of each vcpu is correctly recorded. Things could get confused i= f > the CPU starts running after migration restore completes when it was > paused before it state was captured. >=20 > I've done this by exposing a register (currently only 1 bit used) via > the GET/SET_ONE_REG logic to pass the state between KVM and the VM > controller (e.g. QEMU). >=20 > Signed-off-by: Alex Benn=C3=A9e > --- > arch/arm64/include/uapi/asm/kvm.h | 8 +++++ > arch/arm64/kvm/guest.c | 61 +++++++++++++++++++++++++++++= +++++++++- > 2 files changed, 68 insertions(+), 1 deletion(-) Since it's a pseudo register anyway, would it make sense to use the existing KVM_GET/SET_MP_STATE ioctl interface? How is this represented within QEMU in TCG mode? Also, how is KVM/ARM representing (and passing to QEMU) the halted state of the VCPU? Paolo