diff options
author | Pranavkumar Sawargaonkar <pranavkumar@linaro.org> | 2015-02-05 13:37:25 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-02-05 13:37:25 +0000 |
commit | 568bab1fb8cb2237f0134c4c5ffbc2a8ea26df69 (patch) | |
tree | d9b04071f7fbbce22f332d515dd1fda24e8b4971 /target-arm | |
parent | 8d298bee09f0cb8997c87006c0ff3a49a419837b (diff) |
target-arm: KVM64: Get and Sync up guest register state like kvm32.
This patch adds:
1. Call write_kvmstate_to_list() and write_list_to_cpustate()
in kvm_arch_get_registers() to sync guest register state.
2. Call write_list_to_kvmstate() in kvm_arch_put_registers()
to sync guest register state.
These changes are already there for kvm32 in target-arm/kvm32.c.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Message-id: 1423130382-18640-2-git-send-email-pranavkumar@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/kvm64.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index ba16821737..033babf551 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -193,9 +193,12 @@ int kvm_arch_put_registers(CPUState *cs, int level) } } + if (!write_list_to_kvmstate(cpu)) { + return EINVAL; + } + /* TODO: * FP state - * system registers */ return ret; } @@ -269,6 +272,14 @@ int kvm_arch_get_registers(CPUState *cs) } } + if (!write_kvmstate_to_list(cpu)) { + return EINVAL; + } + /* Note that it's OK to have registers which aren't in CPUState, + * so we can ignore a failure return here. + */ + write_list_to_cpustate(cpu); + /* TODO: other registers */ return ret; } |