lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b692b96-ac7b-d652-bbcb-9688a048952e@gmail.com>
Date:   Fri, 7 Apr 2017 20:43:51 +0300
From:   Oleksandr Andrushchenko <andr2000@...il.com>
To:     Stefano Stabellini <sstabellini@...nel.org>
Cc:     Julien Grall <julien.grall@....com>,
        xen-devel@...ts.xenproject.org, joculator@...il.com,
        al1img@...il.com, vlad.babchuk@...il.com, andrii.anisov@...il.com,
        olekstysh@...il.com, konrad.wilk@...cle.com, lars.kurth@...rix.com,
        linux-kernel@...r.kernel.org,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>,
        Oleksandr Grytsov <oleksandr_grytsov@...m.com>
Subject: Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display

On 04/07/2017 07:36 PM, Stefano Stabellini wrote:
> On Fri, 7 Apr 2017, 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
> It is already defined in include/xen/page.h
Thank you, Stefano, but I meant if the change below
will fit the requirement, e.g. what Julien means is:
-#define XENDISPL_EVENT_PAGE_SIZE 4096
+#define XENDISPL_EVENT_PAGE_SIZE XEN_PAGE_SIZE
Julien, does this change work for you?

>
>>>> +#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:
>>>> + */
>>>>
>>> Cheers,
>>>
>> Thank you,
>> Oleksandr
>>
Thank you,
Oleksandr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ