All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
	Tim Deegan <tim@xen.org>
Subject: Re: [RFC PATCH 3/16]: PVH xen: Add PHYSDEVOP_map_iomem
Date: Mon, 28 Jan 2013 11:39:27 -0500	[thread overview]
Message-ID: <20130128163926.GC7223@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <20130124170350.7a0afe31@mantra.us.oracle.com>

On Thu, Jan 24, 2013 at 05:03:50PM -0800, Mukesh Rathor wrote:
> On Thu, 24 Jan 2013 15:06:29 +0000
> Tim Deegan <tim@xen.org> wrote:
> 
> > At 17:32 -0800 on 11 Jan (1357925563), Mukesh Rathor wrote:
> >DEFINE_XEN_GUEST_HANDLE(physdev_dbgp_op_t);
> > >  
> > > + 
> > > +#define PHYSDEVOP_map_iomem        30
> > > +struct physdev_map_iomem {
> > > +    /* IN */
> > > +    unsigned long first_gfn;
> > > +    unsigned long first_mfn;
> > > +    unsigned int nr_mfns;
> > > +    unsigned int add_mapping;        /* 1 == add mapping;  0 ==
> > > unmap */ +
> > > +};
> > > +typedef struct physdev_map_iomem physdev_map_iomem_t;
> > > +DEFINE_XEN_GUEST_HANDLE(physdev_map_iomem_t);
> > > +
> > 
> > This needs documentation.  Also, the arguemnts should be explicitly
> > sized to avoid compat difficulties. 
> > 
> > Tim.
> 
> Done:
> 
> /* Map given gfns to mfns where mfns are part of IO space. */
> #define PHYSDEVOP_map_iomem        30
> struct physdev_map_iomem {
>     /* IN */
>     uint64_t first_gfn;
>     uint64_t first_mfn;
>     uint32_t nr_mfns;
>     uint32_t add_mapping;        /* 1 == add mapping;  0 == unmap */
> 
> };

Which is BTW what the Linux tree already has.

Perhaps the 'add_mapping' should be just called 'flags'
and have two #defines?

It is also has a bit of an issue when you use __packed__ - that is it
will shrink from 32 bytes down to 24 bytes. Perhaps we should make this
hypercall be:

	uint64_t first_gfn
	uint64_t first_mfn;
	uint32_t nr_mfns;
	uint32_t flags;
	uint64_t _pad;

and then it is a nice 32 bytes long?

> 
> 
> thanks,
> Mukesh
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
> 

  reply	other threads:[~2013-01-28 16:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  1:32 [RFC PATCH 3/16]: PVH xen: Add PHYSDEVOP_map_iomem Mukesh Rathor
2013-01-14 11:23 ` Jan Beulich
2013-01-15 23:35   ` Mukesh Rathor
2013-01-16  9:45     ` Jan Beulich
2013-01-24  2:12       ` Mukesh Rathor
2013-01-24  9:23         ` Jan Beulich
2013-01-25  1:53           ` Mukesh Rathor
2013-01-25  8:05             ` Jan Beulich
2013-01-26  2:23               ` Mukesh Rathor
2013-01-26  3:04                 ` Mukesh Rathor
2013-01-28 15:13                   ` Stefano Stabellini
2013-01-28 16:43                     ` Konrad Rzeszutek Wilk
2013-01-28 16:47                       ` Jan Beulich
2013-01-28 16:50                         ` Ian Campbell
2013-01-28 10:55                 ` Ian Campbell
2013-01-24 15:06 ` Tim Deegan
2013-01-25  1:03   ` Mukesh Rathor
2013-01-28 16:39     ` Konrad Rzeszutek Wilk [this message]
2013-01-28 16:47       ` Jan Beulich
2013-01-30 21:24         ` Konrad Rzeszutek Wilk

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=20130128163926.GC7223@konrad-lan.dumpdata.com \
    --to=konrad@kernel.org \
    --cc=Xen-devel@lists.xensource.com \
    --cc=mukesh.rathor@oracle.com \
    --cc=tim@xen.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.