[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/5] target-ppc: Synchronize more SPR
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/5] target-ppc: Synchronize more SPRs to KVM using ONE_REG interface |
Date: |
Thu, 24 Jan 2013 09:41:27 +1100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jan 23, 2013 at 11:52:54AM -0600, Scott Wood wrote:
> 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?
Drat, good point. There is no KVM_CAP_ONE_REG, that's the problem. I
guess I'll have to leave cap_hior as it is, and just not have a
capability check.
> 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.
I'm not sure quite what you mean by this.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: Digital signature
[Qemu-ppc] [PATCH 4/5] target-ppc: Synchronize FPU state with KVM, David Gibson, 2013/01/23
[Qemu-ppc] [PATCH 2/5] pseries: Improve handling of multiple PCI host bridges, David Gibson, 2013/01/23