diff mbox

[V6,6/8] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64

Message ID 1400757486-2860-7-git-send-email-pranavkumar@linaro.org
State Superseded
Headers show

Commit Message

PranavkumarSawargaonkar May 22, 2014, 11:18 a.m. UTC
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 <pranavkumar@linaro.org>
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/kvm64.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
index dcf621f..feeac4a 100644
--- a/target-arm/kvm64.c
+++ b/target-arm/kvm64.c
@@ -269,4 +269,8 @@  int kvm_arch_get_registers(CPUState *cs)
 
 void kvm_arm_reset_vcpu(ARMCPU *cpu)
 {
+    /* Re-init VCPU so that all registers are set to
+     * their respective reset values.
+     */
+    kvm_arm_vcpu_init(CPU(cpu));
 }