From: "Woods, Brian" <Brian.Woods@amd.com>
To: Paul Durrant <paul.durrant@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"Woods, Brian" <Brian.Woods@amd.com>,
"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>
Subject: Re: [PATCH] amd-iommu: get rid of pointless IOMMU_PAGING_MODE_LEVEL_X definitions
Date: Fri, 12 Oct 2018 17:14:05 +0000 [thread overview]
Message-ID: <20181012171402.GB22686@amd.com> (raw)
In-Reply-To: <20180927124601.24455-1-paul.durrant@citrix.com>
On Thu, Sep 27, 2018 at 01:46:01PM +0100, Paul Durrant wrote:
> The levels are absolute numbers such that IOMMU_PAGING_MODE_LEVEL_X
> evaluates to X (for the valid range of 0 - 7) so simply use numbers in
> the code.
>
> No functional change.
>
> NOTE: This patch also adds emacs boilerplate to amd-iommu-defs.h
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Is there a strong reason to get rid of these? Some of examples below
create seemingly magic numbers in the code. While if you're familiar
with the functions this isn't a big deal, otherwise you have to dig
further to tell.
> + pte = table + pfn_to_pde_idx(gfn, 1);
> + need_flush = set_iommu_pde_present(pde, next_mfn, 0, iw, ir);
If there's a general consensus that getting rid of these is better, I
don't mind and will agree to it.
--
Brian Woods
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-10-12 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 12:46 [PATCH] amd-iommu: get rid of pointless IOMMU_PAGING_MODE_LEVEL_X definitions Paul Durrant
2018-10-02 12:33 ` Paul Durrant
2018-10-11 8:25 ` Paul Durrant
2018-10-12 17:14 ` Woods, Brian [this message]
2018-10-12 17:18 ` Paul Durrant
2018-10-25 10:29 ` Jan Beulich
2018-10-26 15:55 ` Paul Durrant
2018-10-26 18:39 ` Woods, Brian
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=20181012171402.GB22686@amd.com \
--to=brian.woods@amd.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.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.