DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: dev@dpdk.org, anatoly.burakov@intel.com
Subject: Re: [dpdk-dev] [bug] dpdk-vfio: Invalid region/index assumption
Date: Thu, 28 Jul 2016 08:54:42 +0200	[thread overview]
Message-ID: <2860054.FZ01Xh8IR9@xps13> (raw)
In-Reply-To: <20160727161457.7992c756@t450s.home>

Hi,

2016-07-27 16:14, Alex Williamson:
> I took a quick look at the dpdk vfio code and spotted an invalid
> assumption that should probably be corrected ASAP.

It can theoretically be a bug but the value may never change in the kernel,
right?
So when you say ASAP, I feel it can wait the next DPDK release
(we plan to release today).
Do you agree?

> That is:
> 
> lib/librte_eal/linuxapp/eal/eal_vfio.h:
> #define VFIO_GET_REGION_ADDR(x) ((uint64_t) x << 40ULL)
> #define VFIO_GET_REGION_IDX(x) (x >> 40)
> 
> Region offset to index is an implementation detail of the kernel, the
> vfio API defines that the offset of a given region (BAR) is found via
> the offset field of struct vfio_region_info returned via the
> VFIO_DEVICE_GET_REGION_INFO ioctl.  You're free to cache the offset
> into any sort of local variable you like, but the kernel may change the
> implementation of region index to offset at any point in time.  This is
> explicitly not part of the ABI.  Is there a place to file a bug, or is
> this sufficient?  Thanks,

Thanks for the report. This email is sufficient :)

  reply	other threads:[~2016-07-28  6:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 22:14 Alex Williamson
2016-07-28  6:54 ` Thomas Monjalon [this message]
2016-07-28  9:42   ` Burakov, Anatoly
2016-07-28 14:54     ` Alex Williamson
2016-07-28  8:06 ` Santosh Shukla

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=2860054.FZ01Xh8IR9@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=alex.williamson@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).