From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: "Murilo Opsfelder Araújo" <muriloo@linux.vnet.ibm.com>,
qemu-ppc@nongnu.org
Cc: paulus@ozlabs.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [Qemu-ppc] [QEMU-PPC] [RFC 1/3] hw/ppc/spapr_caps: Rework spapr_caps to use uint8 internal representation
Date: Wed, 10 Jan 2018 11:21:20 +1100 [thread overview]
Message-ID: <1515543680.1993.12.camel@gmail.com> (raw)
In-Reply-To: <b8e59719-0b88-3cab-9d65-491cb35d5e03@linux.vnet.ibm.com>
On Tue, 2018-01-09 at 09:13 -0200, Murilo Opsfelder Araújo wrote:
> On 01/09/2018 07:21 AM, Suraj Jitindar Singh wrote:
> > Currently spapr_caps are tied to boolean values (on or off). This
> > patch
> > reworks the caps so that they can have any value between 0 and 127,
> > inclusive. This allows more capabilities with various values to be
> > represented in the same way internally. Capabilities are numbered
> > in
> > ascending order. The internal representation of capability values
> > is an
> > array of uint8s in the sPAPRMachineState, indexed by capability
> > number.
> > Note: The MSB (0x80) of a capability is reserved to track whether
> > the
> > capability was set from the command line.
> >
> > Capabilities can have their own name, description, options, getter
> > and
> > setter functions, type and allow functions. They also each have
> > their own
> > section in the migration stream. Capabilities are only migrated if
> > they
> > were explictly set on the command line, with the assumption that
> > otherwise the default will match.
> >
> > On migration we ensure that the capability value on the destination
> > is greater than or equal to the capability value from the source.
> > So
> > long at this remains the case then the migration is considered
> > compatible and allowed to continue.
> >
> > This patch implements generic getter and setter functions for
> > boolean
> > capabilities. It also converts the existings cap-htm, cap-vsx and
> > cap-dfp capabilities to this new format.
>
> Hi, Suraj.
>
> I've got the impression that this patch does a lot of things. What
> about
> splitting this patch into the following?
>
> - rename spapr_has_cap() -> spapr_get_cap()
> - introduce each spapr_cap_[gs]et_bool() in separate patches
> - make use of spapr_cap[gs]et_bool()
> - convert capabilities internal representation to uint8
> - add each new capability separately
Absolutely. This was an RFC to get the code out there for comment.
I'll try to split it up further as suggested for the actual patch
series :)
>
> Perhaps it can be broken into even smaller changes.
>
> Cheers
> Murilo
>
next prev parent reply other threads:[~2018-01-10 0:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 9:21 [Qemu-devel] [QEMU-PPC] [RFC 0/3] target/ppc: Rework spapr_caps Suraj Jitindar Singh
2018-01-09 9:21 ` [Qemu-devel] [QEMU-PPC] [RFC 1/3] hw/ppc/spapr_caps: Rework spapr_caps to use uint8 internal representation Suraj Jitindar Singh
2018-01-09 11:13 ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araújo
2018-01-10 0:21 ` Suraj Jitindar Singh [this message]
2018-01-09 12:07 ` Andrea Bolognani
2018-01-10 0:19 ` Suraj Jitindar Singh
2018-01-10 2:51 ` David Gibson
2018-01-10 4:13 ` [Qemu-devel] " David Gibson
2018-01-12 2:19 ` Suraj Jitindar Singh
2018-01-09 9:21 ` [Qemu-devel] [QEMU-PPC] [RFC 2/3] hw/spapr/spapr_caps: Add new caps safe_[cache/bounds_check/indirect_branch] Suraj Jitindar Singh
2018-01-09 11:15 ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araújo
2018-01-10 0:25 ` Suraj Jitindar Singh
2018-01-09 12:02 ` [Qemu-devel] " joserz
2018-01-10 0:23 ` Suraj Jitindar Singh
2018-01-10 4:54 ` David Gibson
2018-01-09 9:21 ` [Qemu-devel] [QEMU-PPC] [RFC 3/3] target/ppc: Add H-Call H_GET_CPU_CHARACTERISTICS Suraj Jitindar Singh
2018-01-09 11:19 ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araújo
2018-01-10 0:26 ` Suraj Jitindar Singh
2018-01-10 5:02 ` [Qemu-devel] " David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515543680.1993.12.camel@gmail.com \
--to=sjitindarsingh@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=muriloo@linux.vnet.ibm.com \
--cc=paulus@ozlabs.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.