From: Wei Liu <wei.liu2@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
Jennifer Herbert <jennifer.herbert@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
Ian Jackson <Ian.Jackson@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v3 1/8] public / x86: Introduce __HYPERCALL_dm_op...
Date: Fri, 13 Jan 2017 10:44:19 +0000 [thread overview]
Message-ID: <20170113104418.GB5089@citrix.com> (raw)
In-Reply-To: <b081dad93dd4488b84336d60f0671945@AMSPEX02CL03.citrite.net>
On Fri, Jan 13, 2017 at 09:05:19AM +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: 12 January 2017 16:29
> > To: Andrew Cooper <Andrew.Cooper3@citrix.com>; Paul Durrant
> > <Paul.Durrant@citrix.com>
> > Cc: Ian Jackson <Ian.Jackson@citrix.com>; Jennifer Herbert
> > <jennifer.herbert@citrix.com>; Wei Liu <wei.liu2@citrix.com>; xen-
> > devel@lists.xenproject.org; Daniel De Graaf <dgdegra@tycho.nsa.gov>
> > Subject: RE: [PATCH v3 1/8] public / x86: Introduce __HYPERCALL_dm_op...
> >
> > >>> On 12.01.17 at 17:10, <Paul.Durrant@citrix.com> wrote:
> > >> > +
> > >> > +struct xen_dm_op_buf {
> > >> > + XEN_GUEST_HANDLE_64(void) h;
> > >> > + uint32_t size;
> > >> > +};
> > >>
> > >> Sorry to quibble, but there is a problem here which has only just
> > >> occurred to me. This ABI isn't futureproof, and has padding at the end
> > >> which affects how the array is layed out.
> >
> > Yes, padding needs to be added.
> >
> > >> The userspace side should be
> > >>
> > >> struct xen_dm_op_buf {
> > >> void *h;
> > >> size_t size;
> > >> }
> > >>
> > >> which will work sensibly for 32bit and 64bit userspace, and futureproof
> > >> (for when 128bit turns up). Its size is also a power of two which
> > >> avoids alignment issues in the array.
> > >>
> > >> The kernel already has to parse this structure anyway, and will know the
> > >> bitness of its userspace process. We could easily (at this point)
> > >> require the kernel to turn it into the kernels bitness for forwarding on
> > >> to Xen, which covers the 32bit userspace under a 64bit kernel problem,
> > >> in a way which won't break the hypercall ABI when 128bit comes along.
> >
> > But that won't cover a 32-bit kernel.
> >
>
> Do we need to care about a 32-bit kernel for a tools-only hypercall? I thought a toolstack already had to be (at least) 64-bit to match Xen.
>
Toolstack can run on 32bit kernel on 64bit Xen.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-01-13 10:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 14:58 [PATCH v3 0/8] New hypercall for device models Paul Durrant
2017-01-12 14:58 ` [PATCH v3 1/8] public / x86: Introduce __HYPERCALL_dm_op Paul Durrant
2017-01-12 15:33 ` Andrew Cooper
2017-01-12 16:10 ` Paul Durrant
2017-01-12 16:29 ` Jan Beulich
2017-01-13 9:05 ` Paul Durrant
2017-01-13 10:30 ` Jan Beulich
2017-01-13 10:47 ` Paul Durrant
2017-01-13 10:44 ` Wei Liu [this message]
2017-01-13 12:03 ` Andrew Cooper
2017-01-13 12:47 ` Jan Beulich
2017-01-16 16:05 ` Andrew Cooper
2017-01-16 16:16 ` Jan Beulich
2017-01-16 17:07 ` Paul Durrant
2017-01-16 17:18 ` Jan Beulich
2017-01-17 11:22 ` Andrew Cooper
2017-01-17 12:29 ` George Dunlap
2017-01-17 15:06 ` Andrew Cooper
2017-01-17 15:37 ` Jan Beulich
2017-01-17 12:42 ` Jan Beulich
2017-01-17 15:13 ` Andrew Cooper
2017-01-17 15:31 ` Jan Beulich
2017-01-12 14:58 ` [PATCH v3 2/8] dm_op: convert HVMOP_*ioreq_server* Paul Durrant
2017-01-12 16:30 ` Jan Beulich
2017-01-12 14:58 ` [PATCH v3 3/8] dm_op: convert HVMOP_track_dirty_vram Paul Durrant
2017-01-13 11:45 ` Jan Beulich
2017-01-13 11:46 ` Paul Durrant
2017-01-13 13:22 ` Tim Deegan
2017-01-16 15:12 ` George Dunlap
2017-01-12 14:58 ` [PATCH v3 4/8] dm_op: convert HVMOP_set_pci_intx_level, HVMOP_set_isa_irq_level, and Paul Durrant
2017-01-12 14:58 ` [PATCH v3 5/8] dm_op: convert HVMOP_modified_memory Paul Durrant
2017-01-13 11:51 ` Jan Beulich
2017-01-13 11:54 ` Paul Durrant
2017-01-12 14:58 ` [PATCH v3 6/8] dm_op: convert HVMOP_set_mem_type Paul Durrant
2017-01-13 11:54 ` Jan Beulich
2017-01-12 14:58 ` [PATCH v3 7/8] dm_op: convert HVMOP_inject_trap and HVMOP_inject_msi Paul Durrant
2017-01-12 14:58 ` [PATCH v3 8/8] x86/hvm: serialize trap injecting producer and consumer Paul Durrant
2017-01-12 16:28 ` Andrew Cooper
2017-01-12 16:41 ` 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=20170113104418.GB5089@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=jennifer.herbert@citrix.com \
--cc=xen-devel@lists.xenproject.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).