From: Jacob Pan <jacob.jun.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
jacob.jun.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: Re: bind pasid table API
Date: Thu, 28 Sep 2017 14:36:57 -0700 [thread overview]
Message-ID: <20170928143657.01ed2fa7@jacob-builder> (raw)
In-Reply-To: <20170928120705.GR8398-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
On Thu, 28 Sep 2017 14:07:05 +0200
Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:
> On Wed, Sep 27, 2017 at 10:51:55AM -0700, Jacob Pan wrote:
> > On Wed, 27 Sep 2017 15:40:41 +0200
> > Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> wrote:
> > > enum pasid_table_model {
> > > PASID_TABLE_INTEL,
> > > PASID_TABLE_ARM,
> > > PASID_TABLE_AMD,
> > > /* ... */
> > > };
> > >
> > I guess one vendor could have multiple pasid table format. so
> > perhaps the name could reflect the format as well?
>
> Yes, that makes sense.
>
> > > struct pasid_table_config {
> > > __u64 base_ptr;
> > > __u8 pasid_bits;
> > > union {
> > > struct {
> > > /* Intel specific fields */
> > > } intel;
> > >
> > > struct {
> > > /* ARM specific fields */
> > > } arm;
> > >
> > >
> > > struct {
> > > /* AMD specific fields */
> > > } amd;
> > >
> > > /* ... */
> > > };
> > > };
> > >
> > > How does that look?
> > >
> > It should work for us for now but I am not sure how stable the
> > vendor specific fields will be, this is UAPI. BTW, do you also
> > intend to include the pasid_table_model # in pasid_table_config?
>
> If its going to be UAPI then we probably also need a version and a
> length/size field. But since individual formats do not change, their
> sub-struct should be stable.
>
just to confirm, we have two separate APIs for bind_pasid_table_ptr and
bind_page_table. For the former, we need to passdown the following info
from qemu/vfio. For now
struct pasid_table_config {
__u32 version;
#define PASID_TABLE_CONFIG_VERSION_1 (1)
__u32 bytes;
__u64 base_ptr;
__u8 pasid_bits;
enum pasid_table_model model;
union {
struct {
/* Intel specific fields */
} intel;
struct {
/* ARM specific fields */
} arm;
struct {
/* AMD specific fields */
} amd;
/* ... */
};
};
> Regards,
>
> Joerg
>
[Jacob Pan]
next prev parent reply other threads:[~2017-09-28 21:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 3:45 bind pasid table API Jacob Pan
2017-09-20 12:09 ` Jean-Philippe Brucker
[not found] ` <6ecc1afc-6302-cd22-6944-ef4c6ac09587-5wv7dgnIgG8@public.gmane.org>
2017-09-20 22:35 ` Jacob Pan
2017-09-25 11:45 ` Jean-Philippe Brucker
[not found] ` <ef71b446-ae00-29af-a934-2e253454df31-5wv7dgnIgG8@public.gmane.org>
2017-09-25 15:14 ` Raj, Ashok
2017-09-26 9:46 ` Jean-Philippe Brucker
2017-09-21 3:00 ` Liu, Yi L
[not found] ` <A2975661238FB949B60364EF0F2C257439ADB33D-zVW8+lm/ZpmiAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-09-25 11:45 ` Jean-Philippe Brucker
2017-09-27 13:40 ` Joerg Roedel
[not found] ` <20170927134041.GN8398-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-09-27 17:51 ` Jacob Pan
2017-09-28 12:07 ` Joerg Roedel
[not found] ` <20170928120705.GR8398-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-09-28 21:36 ` Jacob Pan [this message]
2017-09-29 15:23 ` Joerg Roedel
2017-09-28 11:21 ` Jean-Philippe Brucker
[not found] ` <e23f7d00-90f2-e5d4-6619-9fe9150a96b9-5wv7dgnIgG8@public.gmane.org>
2017-09-28 17:11 ` Raj, Ashok
2017-09-29 5:44 ` Tian, Kevin
[not found] ` <AADFC41AFE54684AB9EE6CBC0274A5D190DEA654-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-09-29 15:38 ` Joerg Roedel
2017-09-29 15:30 ` Joerg Roedel
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=20170928143657.01ed2fa7@jacob-builder \
--to=jacob.jun.pan-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.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 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.