All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Feng" <feng.wu@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"keir@xen.org" <keir@xen.org>,
	"george.dunlap@eu.citrix.com" <george.dunlap@eu.citrix.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Zhang, Yang Z" <yang.z.zhang@intel.com>,
	"Wu, Feng" <feng.wu@intel.com>
Subject: Re: [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used
Date: Mon, 15 Jun 2015 11:38:14 +0000	[thread overview]
Message-ID: <E959C4978C3B6342920538CF579893F0025A6EBF@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <557EB8740200007800084B6D@mail.emea.novell.com>



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Monday, June 15, 2015 5:35 PM
> To: Wu, Feng
> Cc: andrew.cooper3@citrix.com; george.dunlap@eu.citrix.com; Tian, Kevin;
> Zhang, Yang Z; xen-devel@lists.xen.org; keir@xen.org
> Subject: RE: [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used
> 
> >>> On 15.06.15 at 11:20, <feng.wu@intel.com> wrote:
> 
> >
> >> -----Original Message-----
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: Friday, June 12, 2015 6:35 PM
> >> To: Wu, Feng
> >> Cc: andrew.cooper3@citrix.com; george.dunlap@eu.citrix.com; Tian, Kevin;
> >> Zhang, Yang Z; xen-devel@lists.xen.org; keir@xen.org
> >> 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@intel.com> wrote:
> >> >> -----Original Message-----
> >> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> >> >>> On 08.05.15 at 11:07, <feng.wu@intel.com> 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?
> 
> I think so - iirc the bitfield is exactly the width you need (or if it
> wasn't, that would be a mistake). What you can't get rid of is the
> shifting.

You are right. I got the same result after removing the PDA_MASK.

Thanks,
Feng

> 
> Jan

  reply	other threads:[~2015-06-15 11:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  9:20 [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used Wu, Feng
2015-06-15  9:35 ` Jan Beulich
2015-06-15 11:38   ` Wu, Feng [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-08  9:07 [RFC v2 00/15] Add VT-d Posted-Interrupts support Feng Wu
2015-05-08  9:07 ` [RFC v2 07/15] vt-d: Add API to update IRTE when VT-d PI is used Feng Wu
2015-06-09 14:32   ` Jan Beulich
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:33       ` Jan Beulich
2015-06-10  6:17   ` Jan Beulich
2015-06-12  9:40     ` Wu, Feng
2015-06-12 10:34       ` Jan Beulich

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=E959C4978C3B6342920538CF579893F0025A6EBF@SHSMSX104.ccr.corp.intel.com \
    --to=feng.wu@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.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 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.