Received: from eggs.gnu.org ([140.186.70.92]:57898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHWi-0001Mx-4Z for qemu-devel@nongnu.org; Tue, 03 May 2011 11:28:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHHWg-0008Rw-Ua for qemu-devel@nongnu.org; Tue, 03 May 2011 11:28:40 -0400 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:44912 helo=TX2EHSOBE002.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHWg-0008Rk-QF for qemu-devel@nongnu.org; Tue, 03 May 2011 11:28:38 -0400 Date: Tue, 3 May 2011 10:28:33 -0500 From: Scott Wood Message-ID: <20110503102833.71153d2d@schlenkerla.am.freescale.net> In-Reply-To: References: <20110429221023.GA26084@schlenkerla.am.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] monitor: add PPC BookE SPRs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org On Tue, 3 May 2011 13:02:40 +0200 Alexander Graf wrote: > > On 30.04.2011, at 00:10, Scott Wood wrote: > > > Read them via KVM_GET_SREGS in kvm_arch_get_registers(), > > and display them in "info registers". > > > > Also get CR and PID from the existing KVM_GET_REGS. > > > > Signed-off-by: Scott Wood > > --- > > v2: fix a couple style oversights, and cache kvm caps as requested > > In fact, I'll just squash this patch with yours, if that's ok for you: OK. > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > index a4ec4bc..5a1b6cb 100644 > --- a/target-ppc/kvm.c > +++ b/target-ppc/kvm.c > @@ -45,7 +45,9 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[] = { > static int cap_interrupt_unset = false; > static int cap_interrupt_level = false; > static int cap_segstate; > +#ifdef KVM_CAP_PPC_BOOKE_SREGS > static int cap_booke_sregs; > +#endif > > /* XXX We have a race condition where we actually have a level triggered > * interrupt, but the infrastructure can't expose that yet, so the guest > @@ -94,13 +96,9 @@ static int kvm_arch_sync_sregs(CPUState *cenv) > if (cenv->excp_model == POWERPC_EXCP_BOOKE) { > return 0; > } else { > -#ifdef KVM_CAP_PPC_SEGSTATE > if (!cap_segstate) { > return 0; > } > -#else > - return 0; > -#endif So there are no headers out there that we need to support building with that don't have KVM_CAP_PPC_SEGSTATE? -Scott