From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482AbdDJGGq (ORCPT ); Mon, 10 Apr 2017 02:06:46 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35695 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbdDJGGp (ORCPT ); Mon, 10 Apr 2017 02:06:45 -0400 Subject: Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display To: Juergen Gross , Julien Grall , xen-devel@lists.xenproject.org References: <1491553840-5180-1-git-send-email-andr2000@gmail.com> <1491553840-5180-5-git-send-email-andr2000@gmail.com> <82ade2ce-93e0-d817-b289-ca09fa1bb66e@arm.com> <9ae3da7e-069a-f93c-c1ef-800a46c7e067@gmail.com> <397a9a62-8128-d6b4-0f87-2219ec0cba48@suse.com> 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 Grytsov From: Oleksandr Andrushchenko Message-ID: <6f8fae9b-82fa-ec98-e381-25e60733fe22@gmail.com> Date: Mon, 10 Apr 2017 09:06:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <397a9a62-8128-d6b4-0f87-2219ec0cba48@suse.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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