From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W03rH-00050z-Pw for qemu-devel@nongnu.org; Mon, 06 Jan 2014 01:40:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W03rB-0000B4-L8 for qemu-devel@nongnu.org; Mon, 06 Jan 2014 01:40:19 -0500 Received: from mail-pb0-f52.google.com ([209.85.160.52]:49841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W03rB-0000Av-Fg for qemu-devel@nongnu.org; Mon, 06 Jan 2014 01:40:13 -0500 Received: by mail-pb0-f52.google.com with SMTP id uo5so18077708pbc.25 for ; Sun, 05 Jan 2014 22:40:12 -0800 (PST) Message-ID: <52CA4FC6.1030801@ozlabs.ru> Date: Mon, 06 Jan 2014 17:40:06 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1388986600-26301-1-git-send-email-aik@ozlabs.ru> <1388986600-26301-3-git-send-email-aik@ozlabs.ru> In-Reply-To: <1388986600-26301-3-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] PPC: KVM: fix "set one register" 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 On 01/06/2014 04:36 PM, Alexey Kardashevskiy wrote: > Due to missing @one_reg_id assignment in _spr_register(), > the kvm_get_one_reg/kvm_set_one_reg API has never really been working. > > This enabled the API and removes use of the API for LPCR as > kvm_arch_get_registers/kvm_arch_put_registers run a loop for all 1024 SPR > and LPCR is one of them. Agrh. The commit message must be: === Due to missing @one_reg_id assignment in _spr_register(), the kvm_get_one_reg/kvm_set_one_reg API has never really been working. This reenables the API by assigning the @one_reg_id field in the SPR descriptor. === Repost? > > Signed-off-by: Alexey Kardashevskiy > --- > target-ppc/translate_init.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 144de3d..149a932 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -628,6 +628,9 @@ static inline void _spr_register(CPUPPCState *env, int num, > spr->oea_read = oea_read; > spr->oea_write = oea_write; > #endif > +#if defined(CONFIG_KVM) > + spr->one_reg_id = one_reg_id, > +#endif > env->spr[num] = initial_value; > } > > -- Alexey