From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0E17-0000L8-Dx for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:31:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0E0t-0003g4-PI for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:31:09 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:45951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0E0t-0003fp-G6 for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:30:55 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Jan 2014 17:30:54 -0000 Date: Mon, 6 Jan 2014 18:30:47 +0100 From: Greg Kurz Message-ID: <20140106183047.0bfbe384@bahia.local> In-Reply-To: <1388986600-26301-3-git-send-email-aik@ozlabs.ru> References: <1388986600-26301-1-git-send-email-aik@ozlabs.ru> <1388986600-26301-3-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: KVM: fix "set one register" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Mon, 6 Jan 2014 16:36:40 +1100 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. > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: Greg Kurz > --- > 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; > } > -- Gregory Kurz kurzgreg@fr.ibm.com gkurz@linux.vnet.ibm.com Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.