RE: [PATCH v10 6/7] vtd: use a bit field for context_entry

2020-11-29 Thread Tian, Kevin
> From: Paul Durrant > Sent: Friday, November 20, 2020 9:25 PM > > From: Paul Durrant > > This removes the need for much shifting, masking and several magic > numbers. > On the whole it makes the code quite a bit more readable. > > Signed-off-by: Paul Durrant Reviewed-by: Kevin Tian > ---

Re: [PATCH v10 6/7] vtd: use a bit field for context_entry

2020-11-27 Thread Jan Beulich
On 20.11.2020 14:24, Paul Durrant wrote: > @@ -121,21 +119,22 @@ static int context_set_domain_id(struct context_entry > *context, > } > > set_bit(i, iommu->domid_bitmap); > -context->hi |= (i & ((1 << DID_FIELD_WIDTH) - 1)) << DID_HIGH_OFFSET; > +context->did = i; > + > r