From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkxKj-0008FC-RB for qemu-devel@nongnu.org; Thu, 15 May 2014 11:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkxKa-0008Rr-N8 for qemu-devel@nongnu.org; Thu, 15 May 2014 11:12:33 -0400 Received: from mail-by2lp0238.outbound.protection.outlook.com ([207.46.163.238]:7133 helo=na01-by2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkxKa-0008RO-DF for qemu-devel@nongnu.org; Thu, 15 May 2014 11:12:24 -0400 Message-ID: <5374D94D.1030609@freescale.com> Date: Thu, 15 May 2014 18:12:13 +0300 From: Diana Craciun MIME-Version: 1.0 References: <1399898246-4831-1-git-send-email-pranavkumar@linaro.org> <1399898246-4831-8-git-send-email-pranavkumar@linaro.org> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V5 7/8] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "kvmarm@lists.cs.columbia.edu" , "patches@apm.com" , QEMU Developers , Pranavkumar Sawargaonkar On 05/14/2014 06:42 PM, Peter Maydell wrote: > On 12 May 2014 13:37, Pranavkumar Sawargaonkar wrote: >> To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU >> using kvm_arm_vcpu_init() so that all registers of VCPU are set >> to their reset values by in-kernel KVM code. >> >> Signed-off-by: Pranavkumar Sawargaonkar >> Signed-off-by: Anup Patel >> --- >> target-arm/kvm64.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c >> index 917d256..6e988f3 100644 >> --- a/target-arm/kvm64.c >> +++ b/target-arm/kvm64.c >> @@ -269,4 +269,8 @@ int kvm_arch_get_registers(CPUState *cs) >> >> void kvm_arch_reset_vcpu(CPUState *cs) >> { >> + /* Re-init VCPU so that all registers are set to >> + * their respective reset values. >> + */ >> + kvm_arm_vcpu_init(cs); >> } > Reviewed-by: Peter Maydell > > There is a cleanup we can make which makes this the > common reset function for both 32 and 64 bit, but let's > not tangle that up with this patchseries. It is not just cleanup, on 32 bit the reset is not working properly as it is currently implemented. The reason is that the secondary cores fail to boot because the "cpu->arch.pause" (to mark the VCPU as paused) is not set in KVM because the KVM_ARM_VCPU_INIT ioctl is not called on reset. I can make the changes to re-initialize the VCPU also for 32 bit once these patches are final. Diana