From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Jan Beulich <JBeulich@suse.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: Wed, 30 Jan 2013 16:24:53 -0500 [thread overview]
Message-ID: <20130130212452.GA1885@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <5106B99502000078000BA307@nat28.tlf.novell.com>
On Mon, Jan 28, 2013 at 04:47:01PM +0000, Jan Beulich wrote:
> >>> On 28.01.13 at 17:39, Konrad Rzeszutek Wilk <konrad@kernel.org> wrote:
> > 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.
>
> How that? Or really - how would it ever end up being 32 bytes?
It won't. The structure will be aligned on the 8 bytes, so it will
be 24 bytes. Thanks for noticing my mistake.
prev parent reply other threads:[~2013-01-30 21:24 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
2013-01-28 16:47 ` Jan Beulich
2013-01-30 21:24 ` Konrad Rzeszutek Wilk [this message]
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=20130130212452.GA1885@konrad-lan.dumpdata.com \
--to=konrad@kernel.org \
--cc=JBeulich@suse.com \
--cc=Xen-devel@lists.xensource.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.