qemu-ppc
[Top][All Lists]
Advanced

[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: Scott Wood
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/5] target-ppc: Synchronize more SPRs to KVM using ONE_REG interface
Date: Wed, 23 Jan 2013 17:20:43 -0600

On 01/23/2013 04:41:27 PM, David Gibson wrote:
On Wed, Jan 23, 2013 at 11:52:54AM -0600, Scott Wood wrote:
> On 01/22/2013 11:04:59 PM, David Gibson wrote:
> >-    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.

Hmm? There is a KVM_CAP_ONE_REG. Its value is 70. It was introduced in Linux commit e24ed81fedd551e80378be62fa0b0532480ea7d4, at the same time as the ONE_REG ioctls themselves.

> 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.

Later on you say that you don't check for failure when accessing those registers -- that seems to be the place for a comment about not wanting to check a different capability for each one.

-Scott



reply via email to

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