[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used




> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Friday, June 12, 2015 6:35 PM
> To: Wu, Feng
> Cc: andrew.cooper3@xxxxxxxxxx; george.dunlap@xxxxxxxxxxxxx; Tian, Kevin;
> Zhang, Yang Z; xen-devel@xxxxxxxxxxxxx; keir@xxxxxxx
> Subject: RE: [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used
> 
> >>> On 12.06.15 at 11:40, <feng.wu@xxxxxxxxx> wrote:
> >> -----Original Message-----
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> >>> On 08.05.15 at 11:07, <feng.wu@xxxxxxxxx> wrote:
> >> > +static inline void setup_posted_irte(
> >> > +    struct iremap_entry *new_ire, struct pi_desc *pi_desc, uint8_t
> gvec)
> >> > +{
> >> > +    new_ire->post.urg = 0;
> >> > +    new_ire->post.vector = gvec;
> >> > +    new_ire->post.pda_l = (((u64)virt_to_maddr(pi_desc)) >>
> >> > +                           (32 - PDA_LOW_BIT)) &
> PDA_MASK(LOW);
> >> > +    new_ire->post.pda_h = (((u64)virt_to_maddr(pi_desc)) >> 32) &
> >> > +                           PDA_MASK(HIGH);
> >>
> >> Looking at this another time I can't see what the and-ing with
> >> PAD_MASK() is supposed to be good for.
> >
> > I cannot understand this well. Do you mean we don't need and PDA_MASK()
> > here?
> 
> Correct - the bitfield width (where the data gets stored into) already
> enforces the intended truncation afaict.

We may not need PDA_MASK(HIGH), but is PDA_MASK(LOW) really unnecessary here?

Thanks,
Feng

> 
> Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.