qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] monitor: add PPC BookE SPRs


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH v2] monitor: add PPC BookE SPRs
Date: Tue, 3 May 2011 13:02:40 +0200

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 <address@hidden>
> ---
> 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:


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
     }
 
     ret = kvm_vcpu_ioctl(cenv, KVM_GET_SREGS, &sregs);




reply via email to

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