> -----Original Message----- > From: Xen-devel [mailto:[email protected]] On Behalf > Of Woods, Brian > Sent: 13 February 2019 15:34 > To: Paul Durrant <[email protected]>; [email protected] > Cc: Andrew Cooper <[email protected]>; Wei Liu > <[email protected]>; Jan Beulich <[email protected]>; Suthikulpanit, > Suravee <[email protected]>; Roger Pau Monne > <[email protected]> > Subject: Re: [Xen-devel] [PATCH 1/2] amd-iommu: use a bitfield for PTE/PDE > > On 2/13/19 3:45 AM, Paul Durrant wrote: > >> -----Original Message----- > >> From: Woods, Brian [mailto:[email protected]] > >> Sent: 12 February 2019 20:14 > >> To: Paul Durrant <[email protected]>; xen- > [email protected] > >> Cc: Suthikulpanit, Suravee <[email protected]>; Jan Beulich > >> <[email protected]>; Andrew Cooper <[email protected]>; Wei Liu > >> <[email protected]>; Roger Pau Monne <[email protected]> > >> Subject: Re: [PATCH 1/2] amd-iommu: use a bitfield for PTE/PDE > >> > >> On 2/4/19 5:19 AM, Paul Durrant wrote: > >>> The current use of get/set_field_from/in_reg_u32() is both inefficient > >> and > >>> requires some ugly casting. > >>> > >>> This patch defines a new bitfield structure (amd_iommu_pte) and uses > >> this > >>> structure in all PTE/PDE manipulation, resulting in much more readable > >>> and compact code. > >>> > >>> NOTE: This commit also fixes one malformed comment in > >>> set_iommu_pte_present(). > >>> > >>> Signed-off-by: Paul Durrant <[email protected]> > >> > >> Sorry about the delay. > >> > >> Nitpick here, but I'd rather have !!IOMMUF_{writable,readable} than > >> true. > > > > That's pretty ugly. How about I pass an OR of the flags through to lower > level functions rather than a pair of bools? If you're ok with that I'll > send a v2. > > > > Paul > > > > There's no need for a v2 based on that, that's just me nitpicking. > There's no real nice way to do it without turning > IOMMUF_{writable,readable} into bools or your suggested way which has > more code to decode a flag. Assuming everyone else is ok with the > patches as are, it's fine. If there's going to be a v2 for other > reasons, I'll just leave it up to your discretion (other people may have > stronger opinions about it anyway). >
Ok. Thanks Brian, Paul _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
