On Wed, Jan 23, 2013 at 05:20:43PM -0600, Scott Wood wrote:
> 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.

*facepalm* So there is.  I'm an idiot, I don't know how I missed that,
sorry.  I'll rework accordingly.

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

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

Attachment: signature.asc
Description: Digital signature

Reply via email to