All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Artem Mygaiev <artem_mygaiev@epam.com>
Cc: LarsKurth <lars.kurth@citrix.com>,
	IuriiKonovalenko <iurii.konovalenko@globallogic.com>,
	embedded-pv-devel <embedded-pv-devel@lists.xenproject.org>,
	Oleksandr Andrushchenko <andr2000@gmail.com>,
	TimDeegan <tim@xen.org>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	ian.jackson@eu.citrix.com, al1img@gmail.com,
	Andrii Anisov <andrii.anisov@gmail.com>,
	OleksandrTyshchenko <olekstysh@gmail.com>,
	Volodymyr Babchuk <vlad.babchuk@gmail.com>,
	Julien Grall <julien.grall@arm.com>,
	David Vrabel <david.vrabel@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>,
	Mygaiev Artem <joculator@gmail.com>
Subject: Re: [Embedded-pv-devel] [PATCH v9] xen: add para-virtual sound interface header files
Date: Thu, 24 Nov 2016 08:11:36 -0700	[thread overview]
Message-ID: <583711380200007800121CEA@prv-mh.provo.novell.com> (raw)
In-Reply-To: <2568fba3-574d-93db-fdb9-403aae376fa9@epam.com>

>>> On 24.11.16 at 15:58, <artem_mygaiev@epam.com> wrote:
> On 24.11.16 15:31, Jan Beulich wrote:
>>>>> On 24.11.16 at 14:18, <artem_mygaiev@epam.com> wrote:
>>> On 24.11.16 15:04, Jan Beulich wrote:
>>>>> In my case I need it to at least define Linux specific __packed
>>>>> attribute which is not supported by Win AFAIK.
>>>> ... needs to avoid using platform specific constructs (or making
>>>> other assumptions on the platform). I can only re-iterate: Please
>>>> follow the model other PV protocols already present (without
>>>> repeating their mistakes, if at all possible).
>>> But if we don't pack (or enforce some specific alignment) data
>>> structures used between domains they may have different alignment on
>>> different domains, no?
>> Let me repeat what I've said before: Please take a look at existing
>> interface headers. By properly placing fields and adding explicit
>> padding where needed, you can avoid such layout differences.
> 
> Don't get me wrong - I have checked the i/f headers before. My concern
> is very generic: C standard defines alignment as an
> *implementation-defined* integer, so current implementation is based
> under two assumptions on the guest platforms: a) guest compiler does not
> have "packing" enabled by default and b) alignment follows typical
> values (1 byte for char, 2 bytes for short, ...). While this is true in
> most cases, with some embedded RTOS this may become an issue.

This being true, I think the way existing interfaces have their
header written, there are relatively little extra assumptions: I
think all we require is that types don't have an alignment larger
than their size. In particular point a) can be taken care of by
adding explicit padding fields (as is the case for existing headers).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-11-24 15:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 16:38 [PATCH v9] sndif: add ABI for para-virtual sound Oleksandr Andrushchenko
2016-11-23 16:38 ` [PATCH v9] xen: add para-virtual sound interface header files Oleksandr Andrushchenko
2016-11-24 10:58   ` Jan Beulich
2016-11-24 11:49     ` Oleksandr Andrushchenko
2016-11-24 12:15       ` Jan Beulich
2016-11-24 12:52         ` Oleksandr Andrushchenko
2016-11-24 13:02           ` Jan Beulich
2016-11-24 12:15       ` [Embedded-pv-devel] " Julien Grall
2016-11-24 12:53         ` Oleksandr Andrushchenko
2016-11-24 13:00           ` Julien Grall
2016-11-24 14:28             ` Oleksandr Andrushchenko
2016-11-24 13:04           ` Jan Beulich
2016-11-24 13:18             ` Artem Mygaiev
2016-11-24 13:31               ` Jan Beulich
2016-11-24 14:58                 ` Artem Mygaiev
2016-11-24 15:09                   ` Julien Grall
2016-11-24 15:50                     ` Artem Mygaiev
2016-11-24 16:08                       ` Julien Grall
2016-11-24 16:29                         ` Artem Mygaiev
2016-11-24 15:11                   ` Jan Beulich [this message]
2016-11-24 15:29                   ` Oleksandr Andrushchenko
2016-11-24 12:13   ` Julien Grall
2016-11-24 12:35     ` Oleksandr Andrushchenko

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=583711380200007800121CEA@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=al1img@gmail.com \
    --cc=andr2000@gmail.com \
    --cc=andrii.anisov@gmail.com \
    --cc=artem_mygaiev@epam.com \
    --cc=dario.faggioli@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=embedded-pv-devel@lists.xenproject.org \
    --cc=ian.jackson@eu.citrix.com \
    --cc=iurii.konovalenko@globallogic.com \
    --cc=joculator@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=lars.kurth@citrix.com \
    --cc=oleksandr.dmytryshyn@globallogic.com \
    --cc=olekstysh@gmail.com \
    --cc=tim@xen.org \
    --cc=vlad.babchuk@gmail.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 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.