From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Juergen Gross <jgross@suse.com>,
Julien Grall <julien.grall@arm.com>,
xen-devel@lists.xenproject.org
Cc: joculator@gmail.com, al1img@gmail.com, vlad.babchuk@gmail.com,
andrii.anisov@gmail.com, olekstysh@gmail.com,
konrad.wilk@oracle.com, lars.kurth@citrix.com,
sstabellini@kernel.org, linux-kernel@vger.kernel.org,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Subject: Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display
Date: Mon, 10 Apr 2017 09:06:41 +0300 [thread overview]
Message-ID: <6f8fae9b-82fa-ec98-e381-25e60733fe22@gmail.com> (raw)
In-Reply-To: <397a9a62-8128-d6b4-0f87-2219ec0cba48@suse.com>
On 04/10/2017 09:03 AM, Juergen Gross wrote:
> On 07/04/17 16:02, Oleksandr Andrushchenko wrote:
>> Hi, Julien!
>>
>> On 04/07/2017 04:50 PM, Julien Grall wrote:
>>> Hi Oleksandr,
>>>
>>> On 07/04/17 09:30, Oleksandr Andrushchenko wrote:
>>>> +/*
>>>> +
>>>> ******************************************************************************
>>>>
>>>> + * Back to front events delivery
>>>> +
>>>> ******************************************************************************
>>>>
>>>> + * In order to deliver asynchronous events from back to front a
>>>> shared page is
>>>> + * allocated by front and its granted reference propagated to back via
>>>> + * XenStore entries (evt-ring-ref/evt-event-channel).
>>>> + * This page has a common header used by both front and back to
>>>> synchronize
>>>> + * access and control event's ring buffer, while back being a
>>>> producer of the
>>>> + * events and front being a consumer. The rest of the page after the
>>>> header
>>>> + * is used for event packets.
>>>> + *
>>>> + * Upon reception of an event(s) front may confirm its reception
>>>> + * for either each event, group of events or none.
>>>> + */
>>>> +
>>>> +struct xendispl_event_page {
>>>> + uint32_t in_cons;
>>>> + uint32_t in_prod;
>>>> + uint8_t reserved[56];
>>>> +};
>>>> +
>>>> +#define XENDISPL_EVENT_PAGE_SIZE 4096
>>> This will be always the size of a grant (e.g xen page size), right? If
>>> so, I would prefer if you use XEN_PAGE_SIZE to so we can easily update
>>> Linux in the case Xen is using a different page size.
>>>
>>> Note that the Front-end, Backend and Xen may use different page size,
>>> so your drivers would need to cope with that. The current approach is
>>> to always use the page granularity of Xen.
>>>
>> Will the following satisfy the requirement?
>> #define XENDISPL_EVENT_PAGE_SIZE XEN_PAGE_SIZE
>>
>>>> +#define XENDISPL_IN_RING_OFFS (sizeof(struct xendispl_event_page))
>>>> +#define XENDISPL_IN_RING_SIZE (XENDISPL_EVENT_PAGE_SIZE -
>>>> XENDISPL_IN_RING_OFFS)
>>>> +#define XENDISPL_IN_RING_LEN (XENDISPL_IN_RING_SIZE / sizeof(struct
>>>> xendispl_evt))
>>>> +#define XENDISPL_IN_RING(page) \
>>>> + ((struct xendispl_evt *)((char *)(page) + XENDISPL_IN_RING_OFFS))
>>>> +#define XENDISPL_IN_RING_REF(page, idx) \
>>>> + (XENDISPL_IN_RING((page))[(idx) % XENDISPL_IN_RING_LEN])
>>>> +
>>>> +#endif /* __XEN_PUBLIC_IO_DISPLIF_H__ */
>>>> +
>>>> +/*
>>>> + * Local variables:
>>>> + * mode: C
>>>> + * c-file-style: "BSD"
>>>> + * c-basic-offset: 4
>>>> + * tab-width: 4
>>>> + * indent-tabs-mode: nil
>>>> + * End:
>>>> + */
> I believe you'll send V2 due to the XEN_PAGE_SIZE usage?
yes
>
> Can you then please remove the editor mode settings block in each
> header, too? Those are disliked in the Linux tree.
sure, I will
>
>
> Juergen
Do you mind if I keep your acks for V2 with these changes?
Thank you,
Oleksandr
next prev parent reply other threads:[~2017-04-10 6:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 8:30 [For Linux 0/4] PV protocol headers for Linux Kernel Oleksandr Andrushchenko
2017-04-07 8:30 ` [For Linux 1/4] xen/kbdif: update protocol description Oleksandr Andrushchenko
2017-04-07 11:29 ` [Xen-devel] " Juergen Gross
2017-04-07 12:45 ` Konrad Rzeszutek Wilk
2017-04-07 12:58 ` Oleksandr Andrushchenko
2017-04-07 8:30 ` [For Linux 2/4] xen/kbdif: add multi-touch support Oleksandr Andrushchenko
2017-04-07 11:30 ` [Xen-devel] " Juergen Gross
2017-04-07 8:30 ` [For Linux 3/4] xen/sndif: add sound-device ABI Oleksandr Andrushchenko
2017-04-07 11:31 ` [Xen-devel] " Juergen Gross
2017-04-07 8:30 ` [For Linux 4/4] xen/displif: add ABI for para-virtual display Oleksandr Andrushchenko
2017-04-07 11:31 ` [Xen-devel] " Juergen Gross
2017-04-07 13:50 ` Julien Grall
2017-04-07 14:02 ` Oleksandr Andrushchenko
2017-04-07 16:36 ` Stefano Stabellini
2017-04-07 17:43 ` Oleksandr Andrushchenko
2017-04-07 17:50 ` Stefano Stabellini
2017-04-07 17:51 ` Oleksandr Andrushchenko
2017-04-10 6:03 ` Juergen Gross
2017-04-10 6:06 ` Oleksandr Andrushchenko [this message]
2017-04-10 6:07 ` Juergen Gross
2017-04-07 8:47 ` [For Linux 0/4] PV protocol headers for Linux Kernel 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=6f8fae9b-82fa-ec98-e381-25e60733fe22@gmail.com \
--to=andr2000@gmail.com \
--cc=al1img@gmail.com \
--cc=andrii.anisov@gmail.com \
--cc=jgross@suse.com \
--cc=joculator@gmail.com \
--cc=julien.grall@arm.com \
--cc=konrad.wilk@oracle.com \
--cc=lars.kurth@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=oleksandr_grytsov@epam.com \
--cc=olekstysh@gmail.com \
--cc=sstabellini@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox