qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] target-ppc: Synchronize more SPRs to KVM us


From: Scott Wood
Subject: Re: [Qemu-devel] [PATCH 3/5] target-ppc: Synchronize more SPRs to KVM using ONE_REG interface
Date: Wed, 23 Jan 2013 11:52:54 -0600

On 01/22/2013 11:04:59 PM, David Gibson wrote:
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 2f4f068..e84b993 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -60,7 +60,7 @@ static int cap_booke_sregs;
 static int cap_ppc_smt;
 static int cap_ppc_rma;
 static int cap_spapr_tce;
-static int cap_hior;
+static int cap_one_reg;

/* 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
@@ -89,7 +89,11 @@ int kvm_arch_init(KVMState *s)
     cap_ppc_smt = kvm_check_extension(s, KVM_CAP_PPC_SMT);
     cap_ppc_rma = kvm_check_extension(s, KVM_CAP_PPC_RMA);
     cap_spapr_tce = kvm_check_extension(s, KVM_CAP_SPAPR_TCE);
-    cap_hior = kvm_check_extension(s, KVM_CAP_PPC_HIOR);
+    /* This capability is misnamed - it was introduced with the
+     * KVM_SET_ONE_REG ioctl(), which at the time only supported the
+     * HIOR.  We don't want a different capability for every register
+     * the interface can support though. */
+    cap_one_reg = kvm_check_extension(s, KVM_CAP_PPC_HIOR);

So what happens when we want to use onereg for booke, which doesn't have KVM_CAP_PPC_HIOR? Into what variable would we put a check for KVM_CAP_ONE_REG?

IMHO this should stay as cap_hior and merge the above comment with the comment where you check cap_hior, regarding not all registers necessarily being supported.

-Scott



reply via email to

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