qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] spapr: fix H_SET_MODE to sync LPCR with KVM


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [PATCH] spapr: fix H_SET_MODE to sync LPCR with KVM
Date: Fri, 17 Jan 2014 17:13:16 +1100

The kvm_cpu_exec() only puts registers to KVM if the @kvm_vcpu_dirty flag
has been set.

This adds registers sync which also sets @kvm_vcpu_dirty so we store new
LPCR to KVM before continuing with the KVM_RUN ioctl.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
 hw/ppc/spapr_hcall.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index f755a53..b61d744 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -682,6 +682,7 @@ static target_ulong h_set_mode(PowerPCCPU *cpu, 
sPAPREnvironment *spapr,
             CPU_FOREACH(cs) {
                 PowerPCCPU *cp = POWERPC_CPU(cs);
                 CPUPPCState *env = &cp->env;
+                kvm_cpu_synchronize_state(cs);
                 env->spr[SPR_LPCR] &= ~LPCR_ILE;
             }
             ret = H_SUCCESS;
@@ -691,6 +692,7 @@ static target_ulong h_set_mode(PowerPCCPU *cpu, 
sPAPREnvironment *spapr,
             CPU_FOREACH(cs) {
                 PowerPCCPU *cp = POWERPC_CPU(cs);
                 CPUPPCState *env = &cp->env;
+                kvm_cpu_synchronize_state(cs);
                 env->spr[SPR_LPCR] |= LPCR_ILE;
             }
             ret = H_SUCCESS;
-- 
1.8.4.rc4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]