Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1618814

Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display

From Julien Grall <julien.grall@arm.com>
Newsgroups linux.kernel
Subject Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display
Date 2017-04-07 16:00 +0200
Message-ID <ttCAF-7Q8-7@gated-at.bofh.it> (permalink)
References <ttxAZ-4Hw-7@gated-at.bofh.it> <ttxB0-4Hw-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

> +#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,

-- 
Julien Grall

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[For Linux 0/4] PV protocol headers for Linux Kernel Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 10:40 +0200
  [For Linux 3/4] xen/sndif: add sound-device ABI Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 10:40 +0200
    Re: [Xen-devel] [For Linux 3/4] xen/sndif: add sound-device ABI Juergen Gross <jgross@suse.com> - 2017-04-07 13:40 +0200
  [For Linux 1/4] xen/kbdif: update protocol description Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 10:40 +0200
    Re: [Xen-devel] [For Linux 1/4] xen/kbdif: update protocol  description Juergen Gross <jgross@suse.com> - 2017-04-07 13:40 +0200
      Re: [Xen-devel] [For Linux 1/4] xen/kbdif: update protocol  description Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2017-04-07 14:50 +0200
        Re: [Xen-devel] [For Linux 1/4] xen/kbdif: update protocol  description Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 15:00 +0200
  [For Linux 2/4] xen/kbdif: add multi-touch support Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 10:40 +0200
    Re: [Xen-devel] [For Linux 2/4] xen/kbdif: add multi-touch support Juergen Gross <jgross@suse.com> - 2017-04-07 13:40 +0200
  Re: [For Linux 0/4] PV protocol headers for Linux Kernel Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 10:50 +0200
  Re: [Xen-devel] [For Linux 4/4] xen/displif: add ABI for para-virtual  display Juergen Gross <jgross@suse.com> - 2017-04-07 13:40 +0200
  Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Julien Grall <julien.grall@arm.com> - 2017-04-07 16:00 +0200
    Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 16:10 +0200
      Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Stefano Stabellini <sstabellini@kernel.org> - 2017-04-07 18:40 +0200
        Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 19:50 +0200
          Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Stefano Stabellini <sstabellini@kernel.org> - 2017-04-07 20:00 +0200
            Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-07 20:00 +0200
      Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Oleksandr Andrushchenko <andr2000@gmail.com> - 2017-04-10 08:10 +0200
        Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Juergen Gross <jgross@suse.com> - 2017-04-10 08:10 +0200
      Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display Juergen Gross <jgross@suse.com> - 2017-04-10 08:10 +0200

csiph-web