From: Eric Blake <eblake@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Dave Airlie <airlied@redhat.com>,
virtio-dev@lists.oasis-open.org,
virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file
Date: Thu, 11 Sep 2014 09:19:16 -0600 [thread overview]
Message-ID: <5411BD74.80608@redhat.com> (raw)
In-Reply-To: <1410448173-12960-2-git-send-email-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]
On 09/11/2014 09:09 AM, Gerd Hoffmann wrote:
> This patch adds the header file with structs and defines for
> the virtio based gpu device. Covers 2d operations only.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/hw/virtio/virtgpu_hw.h | 158 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 158 insertions(+)
> create mode 100644 include/hw/virtio/virtgpu_hw.h
>
> diff --git a/include/hw/virtio/virtgpu_hw.h b/include/hw/virtio/virtgpu_hw.h
> new file mode 100644
> index 0000000..461f452
> --- /dev/null
> +++ b/include/hw/virtio/virtgpu_hw.h
> @@ -0,0 +1,158 @@
> +#ifndef VIRTGPU_HW_H
> +#define VIRTGPU_HW_H
Non-trivial file, deserves a copyright and license notice.
> +
> +enum virtgpu_ctrl_type {
> + VIRTGPU_UNDEFINED = 0,
> +
> + /* 2d commands */
> + VIRTGPU_CMD_GET_DISPLAY_INFO = 0x0100,
Please consider also adding:
#define VIRTGPU_CMD_GET_DISPLAY_INFO VIRTGPU_CMD_GET_DISPLAY_INFO
and friends. It makes it MUCH nicer for application software to probe
for later extensions if every member of the enum is also associated with
a preprocessor macro.
> +
> +struct virtgpu_ctrl_hdr {
> + uint32_t type;
> + uint32_t flags;
> + uint64_t fence_id;
> + uint32_t ctx_id;
> + uint32_t padding;
> +};
> +
Is the padding to ensure that this is aligned regardless of 32-bit or
64-bit hosts? Is it worth adding a compile-time assertion about the
size of the struct to ensure the compiler doesn't add any additional
padding?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-09-11 15:19 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 15:09 [PATCH 0/2] virtio-gpu: hardware specification Gerd Hoffmann
2014-09-11 15:09 ` [Qemu-devel] " Gerd Hoffmann
2014-09-11 15:09 ` [PATCH 1/2] virtio-gpu/2d: add hardware spec include file Gerd Hoffmann
2014-09-11 15:09 ` [Qemu-devel] " Gerd Hoffmann
2014-09-11 15:15 ` Peter Maydell
2014-09-11 15:15 ` Peter Maydell
2014-09-11 15:40 ` Gerd Hoffmann
2014-09-11 15:19 ` Eric Blake [this message]
2014-09-12 10:44 ` Gerd Hoffmann
2014-09-12 12:48 ` Eric Blake
2014-09-12 12:48 ` Eric Blake
2014-09-12 12:51 ` Eric Blake
2014-09-12 12:51 ` Eric Blake
2014-09-12 13:03 ` Peter Maydell
2014-09-12 13:03 ` Peter Maydell
2014-09-14 13:46 ` Michael S. Tsirkin
2014-09-14 13:46 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-14 14:04 ` Peter Maydell
2014-09-14 14:04 ` Peter Maydell
2014-09-14 14:11 ` Michael S. Tsirkin
2014-09-14 14:11 ` Michael S. Tsirkin
2014-09-14 14:32 ` Peter Maydell
2014-09-14 14:32 ` Peter Maydell
2014-09-14 15:09 ` Michael S. Tsirkin
2014-09-14 15:09 ` Michael S. Tsirkin
2014-09-14 16:11 ` Peter Maydell
2014-09-14 16:11 ` Peter Maydell
2014-09-14 16:31 ` Michael S. Tsirkin
2014-09-14 16:31 ` Michael S. Tsirkin
2014-09-15 10:36 ` Gerd Hoffmann
2014-09-15 10:40 ` Gerd Hoffmann
2014-09-15 10:40 ` [Qemu-devel] " Gerd Hoffmann
2014-09-15 10:55 ` Michael S. Tsirkin
2014-09-15 10:55 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-11 15:19 ` Eric Blake
2014-09-11 15:20 ` Peter Maydell
2014-09-11 15:43 ` Gerd Hoffmann
2014-09-11 15:53 ` Christopher Covington
2014-09-11 18:58 ` [virtio-dev] " Paolo Bonzini
2014-09-11 18:58 ` [Qemu-devel] [virtio-dev] " Paolo Bonzini
2014-09-11 15:09 ` [PATCH 2/2] virtio-gpu/2d: add docs/specs/virtio-gpu.txt Gerd Hoffmann
2014-09-11 15:09 ` [Qemu-devel] " Gerd Hoffmann
2014-09-11 15:30 ` Eric Blake
2014-09-12 11:08 ` Gerd Hoffmann
2014-09-11 15:30 ` Eric Blake
2014-09-12 9:10 ` [virtio-dev] " Stefan Hajnoczi
2014-09-12 9:10 ` [Qemu-devel] " Stefan Hajnoczi
2014-09-12 11:38 ` Gerd Hoffmann
2014-09-12 11:38 ` [Qemu-devel] " Gerd Hoffmann
2014-09-12 21:14 ` Dave Airlie
2014-09-15 10:14 ` Gerd Hoffmann
2014-09-15 10:14 ` [Qemu-devel] " Gerd Hoffmann
2014-09-12 21:14 ` Dave Airlie
2014-09-14 9:16 ` Michael S. Tsirkin
2014-09-14 9:16 ` [Qemu-devel] " Michael S. Tsirkin
2014-09-14 11:05 ` [virtio-dev] " Dave Airlie
2014-09-14 11:05 ` [Qemu-devel] " Dave Airlie
2014-09-12 21:18 ` [virtio-dev] [PATCH 0/2] virtio-gpu: hardware specification Dave Airlie
2014-09-12 21:18 ` [Qemu-devel] " Dave Airlie
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=5411BD74.80608@redhat.com \
--to=eblake@redhat.com \
--cc=airlied@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtualization@lists.linux-foundation.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.