On 27 February 2014 12:21, Pranavkumar Sawargaonkar <pranavkumar@xxxxxxxxxx> 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. > > Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@xxxxxxxxxx> > Signed-off-by: Anup Patel <anup.patel@xxxxxxxxxx> > --- > target-arm/kvm64.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c > index d303046..b64909d 100644 > --- a/target-arm/kvm64.c > +++ b/target-arm/kvm64.c > @@ -205,4 +205,12 @@ int kvm_arch_get_registers(CPUState *cs) > > void kvm_arch_reset_vcpu(CPUState *cs) > { > + /* TODO: Feed the kernel back its initial register state */ > + > + /* For now just re-init VCPU so that all registers are > + * set to their respective reset values. This will work > + * for "mach-virt" only because for "mach-virt" we have > + * start-pc set to zero. > + */ > + kvm_arch_init_vcpu(cs); > } > -- > 1.7.9.5 > Sorry for mentioning wrong qemu devel mail id and spamming in my previous mail. Correcting correct qemu-devel id. Thanks, Pranav _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm