qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: <peter.maydell@linaro.org>, <wangxingang5@huawei.com>,
	<shannon.zhaosl@gmail.com>, <imammedo@redhat.com>,
	<anisinha@redhat.com>, <qemu-arm@nongnu.org>,
	<qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] hw/arm/virt-acpi-build: Fix IORT id_count
Date: Tue, 18 Jun 2024 13:12:01 -0700	[thread overview]
Message-ID: <ZnHqEcdhrmT9OBt7@Asurada-Nvidia> (raw)
In-Reply-To: <20240618155630-mutt-send-email-mst@kernel.org>

On Tue, Jun 18, 2024 at 04:03:34PM -0400, Michael S. Tsirkin wrote:
> On Mon, Jun 17, 2024 at 03:39:45PM -0700, Nicolin Chen wrote:
> > -            next_range.input_base = idmap->input_base + idmap->id_count;
> > +            next_range.input_base = idmap->input_base + idmap->id_count + 1;
> >          }
> 
> 
> All this has to be written in the way that actually refers to the
> spec. id_count is nowhere in the spec and one has to know that
> in the end this is used by build_iort_id_mapping to figure out
> where this comes from. Not good.
> 
> I think the best way is to fix build_iort_id_mapping:
> make it subtract 1 from id_count.
> 
> Then change text from "Number of IDs" to "Number of IDs - The number of IDs in the range minus one"
> 
> You should also add the reference to IO Remapping Table document
> near build_iort_id_mapping, it is currently unclear which table this
> refers to.
> 
> Of couse this means the only correct use has to be tweaked so the change
> to build_iort_id_mapping does not break it: 0xFFFF -> 0x10000 - but
> that's good for readability, anyway.

OK. I will send a v3 following that.

Thanks
Nicolin


      reply	other threads:[~2024-06-18 20:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 22:39 [PATCH v2] hw/arm/virt-acpi-build: Fix IORT id_count Nicolin Chen
2024-06-18  9:49 ` Michael S. Tsirkin
2024-06-18 19:04   ` Nicolin Chen
2024-06-18 19:38     ` Michael S. Tsirkin
2024-06-18 19:57       ` Nicolin Chen
2024-06-18 20:03 ` Michael S. Tsirkin
2024-06-18 20:12   ` Nicolin Chen [this message]

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=ZnHqEcdhrmT9OBt7@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=anisinha@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=wangxingang5@huawei.com \
    /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).