From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W42gW-0005Jk-7z for qemu-devel@nongnu.org; Fri, 17 Jan 2014 01:13:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W42gO-0002Nr-0Z for qemu-devel@nongnu.org; Fri, 17 Jan 2014 01:13:40 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:32949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W42gN-0002Ng-9R for qemu-devel@nongnu.org; Fri, 17 Jan 2014 01:13:31 -0500 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Jan 2014 16:13:24 +1000 From: Alexey Kardashevskiy Date: Fri, 17 Jan 2014 17:13:16 +1100 Message-Id: <1389939196-24323-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] spapr: fix H_SET_MODE to sync LPCR with KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf 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 --- 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