From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOJ9v-00021R-SD for qemu-devel@nongnu.org; Thu, 13 Mar 2014 23:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOJ9q-0002j6-1s for qemu-devel@nongnu.org; Thu, 13 Mar 2014 23:51:47 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:56567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOJ9p-0002it-T5 for qemu-devel@nongnu.org; Thu, 13 Mar 2014 23:51:41 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so2039631pbb.33 for ; Thu, 13 Mar 2014 20:51:40 -0700 (PDT) Date: Thu, 13 Mar 2014 20:51:42 -0700 From: Christoffer Dall Message-ID: <20140314035142.GG24808@cbox> References: <1393483868-6151-1-git-send-email-pranavkumar@linaro.org> <1393483868-6151-8-git-send-email-pranavkumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC PATCH 7/7] target-arm: Hacky implementation of kvm_arch_reset_vcpu() for KVM ARM64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranavkumar Sawargaonkar Cc: Peter Maydell , Anup Patel , patches@apm.com, qemu-devel , Alexander Graf , "kvmarm@lists.cs.columbia.edu" On Thu, Feb 27, 2014 at 04:05:04PM +0530, Pranavkumar Sawargaonkar wrote: > Hi Peter, > > On 27 February 2014 15:23, Peter Maydell wrote: > > On 27 February 2014 06:51, Pranavkumar Sawargaonkar > > wrote: > >> We need to "Feed the kernel back its initial register state" using KVM > >> ioctls for KVM ARM64 (just like KVM ARM). This means we need to save > >> the "initial register state" in kvm_arch_init_vcpu() which is not the > >> case for KVM ARM64 right now. In simpler work, we are depended upon > >> VCPU register init/save/restore for implementing kvm_arch_reset_vcpu(). > >> > >> This patch adds a hacky implementation of kvm_arch_reset_vcpu() which > >> only works for "mach-virt". As-per this hacky implemenation, we re-init > >> the VCPU using kvm_arch_init_vcpu() so that all registers of VCPU are > >> set to their reset values by in-kernel KVM code. > > > > Re-initing the VCPU is actually the right way to do this -- it is feeding > > all the register state back to KVM that is the hack. (One day I may > > fix 32 bit ARM to re-init the VCPU). > > > Didn't I promise a patch to the KVM Documentation some time to clarify this? Hmmm. -Christoffer