[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 7/7] target-arm: Hacky implementation of kvm
From: |
Pranavkumar Sawargaonkar |
Subject: |
Re: [Qemu-devel] [RFC PATCH 7/7] target-arm: Hacky implementation of kvm_arch_reset_vcpu() for KVM ARM64 |
Date: |
Thu, 27 Feb 2014 12:47:27 +0530 |
On 27 February 2014 12:21, Pranavkumar Sawargaonkar
<address@hidden> 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 <address@hidden>
> Signed-off-by: Anup Patel <address@hidden>
> ---
> 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
- Re: [Qemu-devel] [RFC PATCH 7/7] target-arm: Hacky implementation of kvm_arch_reset_vcpu() for KVM ARM64,
Pranavkumar Sawargaonkar <=