qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 2/3] target-arm: Make pamax an argument to check_s2_startlevel
Date: Thu, 21 Jan 2016 17:07:07 +0100	[thread overview]
Message-ID: <20160121160707.GC25287@toto> (raw)
In-Reply-To: <8760ync4hd.fsf@linaro.org>

On Thu, Jan 21, 2016 at 03:54:54PM +0000, Alex Bennée wrote:
> 
> Edgar E. Iglesias <edgar.iglesias@gmail.com> writes:
> 
> > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
> >
> > Make pamax an argument to check_s2_startlevel in preparation
> > for future reuse.
> >
> > No functional change.
> >
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> > ---
> >  target-arm/helper.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/target-arm/helper.c b/target-arm/helper.c
> > index 8aedce9..4abeb4d 100644
> > --- a/target-arm/helper.c
> > +++ b/target-arm/helper.c
> > @@ -6579,7 +6579,8 @@ typedef enum {
> >   * Returns true if the suggested starting level is OK and false otherwise.
> >   */
> >  static bool check_s2_startlevel(ARMCPU *cpu, bool is_aa64, int level,
> > -                                int inputsize, int stride)
> > +                                int inputsize, int stride,
> > +                                unsigned int pamax)
> >  {
> 
> If you fix the docstring above you can have my:
> 
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

I've fixed the comment for v3.

Thanks,
Edgar

> 
> 
> >      const int grainsize = stride + 3;
> >      int startsizecheck;
> > @@ -6595,8 +6596,6 @@ static bool check_s2_startlevel(ARMCPU *cpu, bool is_aa64, int level,
> >      }
> >
> >      if (is_aa64) {
> > -        unsigned int pamax = arm_pamax(cpu);
> > -
> >          switch (stride) {
> >          case 13: /* 64KB Pages.  */
> >              if (level == 0 || (level == 1 && pamax <= 42)) {
> > @@ -6808,6 +6807,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
> >           * VTCR_EL2.SL0 field (whose interpretation depends on the page size)
> >           */
> >          int startlevel = extract32(tcr->raw_tcr, 6, 2);
> > +        unsigned int pamax = arm_pamax(cpu);
> >          bool ok;
> >
> >          if (va_size == 32 || stride == 9) {
> > @@ -6820,7 +6820,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address,
> >
> >          /* Check that the starting level is valid. */
> >          ok = check_s2_startlevel(cpu, va_size == 64, level,
> > -                                 inputsize, stride);
> > +                                 inputsize, stride, pamax);
> >          if (!ok) {
> >              /* AArch64 reports these as level 0 faults.
> >               * AArch32 reports these as level 1 faults.
> 
> 
> --
> Alex Bennée

  reply	other threads:[~2016-01-21 16:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 11:18 [Qemu-devel] [PATCH v2 0/3] target-arm: Add a few more S2 MMU input checks Edgar E. Iglesias
2016-01-21 11:18 ` [Qemu-devel] [PATCH v2 1/3] target-arm: Apply S2 MMU startlevel table size check to AArch64 Edgar E. Iglesias
2016-01-21 11:18 ` [Qemu-devel] [PATCH v2 2/3] target-arm: Make pamax an argument to check_s2_startlevel Edgar E. Iglesias
2016-01-21 15:54   ` Alex Bennée
2016-01-21 16:07     ` Edgar E. Iglesias [this message]
2016-01-21 11:18 ` [Qemu-devel] [PATCH v2 3/3] target-arm: Implement the S2 MMU inputsize > pamax check Edgar E. Iglesias
2016-01-22 10:28   ` Alex Bennée
2016-01-22 11:16     ` Edgar E. Iglesias
2016-01-22 11:45       ` Alex Bennée
2016-01-22 12:54         ` Edgar E. Iglesias

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=20160121160707.GC25287@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).