From: "Michael S. Tsirkin" <mst@redhat.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: walling@linux.ibm.com, alex.williamson@redhat.com,
pmorel@linux.ibm.com, david@redhat.com, cohuck@redhat.com,
qemu-devel@nongnu.org, pasic@linux.ibm.com,
borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v3 1/5] vfio: vfio_iommu_type1: linux header place holder
Date: Sun, 8 Sep 2019 09:08:34 -0400 [thread overview]
Message-ID: <20190908090650-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1567815389-18229-2-git-send-email-mjrosato@linux.ibm.com>
On Fri, Sep 06, 2019 at 08:16:25PM -0400, Matthew Rosato wrote:
> From: Pierre Morel <pmorel@linux.ibm.com>
>
> This should be copied from Linux kernel UAPI includes.
> The version used here is Linux 5.3.0
>
> We define a new device region in vfio.h to be able to
> get the ZPCI CLP information by reading this region from
> userland.
>
> We create a new file, vfio_zdev.h to define the structure
> of the new region we defined in vfio.h
>
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
You should add these in scripts/update-linux-headers.sh ,
then run that script.
> ---
> linux-headers/linux/vfio.h | 7 ++++---
> linux-headers/linux/vfio_zdev.h | 35 +++++++++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+), 3 deletions(-)
> create mode 100644 linux-headers/linux/vfio_zdev.h
>
> diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
> index 24f5051..8328c87 100644
> --- a/linux-headers/linux/vfio.h
> +++ b/linux-headers/linux/vfio.h
> @@ -9,8 +9,8 @@
> * it under the terms of the GNU General Public License version 2 as
> * published by the Free Software Foundation.
> */
> -#ifndef VFIO_H
> -#define VFIO_H
> +#ifndef _UAPIVFIO_H
> +#define _UAPIVFIO_H
>
> #include <linux/types.h>
> #include <linux/ioctl.h>
> @@ -371,6 +371,7 @@ struct vfio_region_gfx_edid {
> * to do TLB invalidation on a GPU.
> */
> #define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1)
> +#define VFIO_REGION_SUBTYPE_ZDEV_CLP (2)
>
> /*
> * The MSIX mappable capability informs that MSIX data of a BAR can be mmapped
> @@ -914,4 +915,4 @@ struct vfio_iommu_spapr_tce_remove {
>
> /* ***************************************************************** */
>
> -#endif /* VFIO_H */
> +#endif /* _UAPIVFIO_H */
> diff --git a/linux-headers/linux/vfio_zdev.h b/linux-headers/linux/vfio_zdev.h
> new file mode 100644
> index 0000000..2b912a5
> --- /dev/null
> +++ b/linux-headers/linux/vfio_zdev.h
> @@ -0,0 +1,35 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +/*
> + * Region definition for ZPCI devices
> + *
> + * Copyright IBM Corp. 2019
> + *
> + * Author(s): Pierre Morel <pmorel@linux.ibm.com>
> + */
> +
> +#ifndef _VFIO_ZDEV_H_
> +#define _VFIO_ZDEV_H_
> +
> +#include <linux/types.h>
> +
> +/**
> + * struct vfio_region_zpci_info - ZPCI information.
> + *
> + */
> +struct vfio_region_zpci_info {
> + __u64 dasm;
> + __u64 start_dma;
> + __u64 end_dma;
> + __u64 msi_addr;
> + __u64 flags;
> + __u16 pchid;
> + __u16 mui;
> + __u16 noi;
> + __u16 maxstbl;
> + __u8 version;
> + __u8 gid;
> +#define VFIO_PCI_ZDEV_FLAGS_REFRESH 1
> + __u8 util_str[];
> +} __attribute__ ((__packed__));
> +
> +#endif
> --
> 1.8.3.1
next prev parent reply other threads:[~2019-09-08 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 0:16 [Qemu-devel] [PATCH v3 0/5] Retrieving zPCI specific info from QEMU Matthew Rosato
2019-09-07 0:16 ` [Qemu-devel] [PATCH v3 1/5] vfio: vfio_iommu_type1: linux header place holder Matthew Rosato
2019-09-08 13:08 ` Michael S. Tsirkin [this message]
2019-09-07 0:16 ` [Qemu-devel] [PATCH v3 2/5] s390: PCI: Creation a header dedicated to PCI CLP Matthew Rosato
2019-09-07 0:16 ` [Qemu-devel] [PATCH v3 3/5] s390: vfio_pci: Use a PCI Group structure Matthew Rosato
2019-09-09 5:18 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-09-09 16:21 ` Matthew Rosato
2019-09-07 0:16 ` [Qemu-devel] [PATCH v3 4/5] s390: vfio_pci: Use a PCI Function structure Matthew Rosato
2019-09-07 0:16 ` [Qemu-devel] [PATCH v3 5/5] s390: vfio_pci: Get zPCI function info from host Matthew Rosato
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=20190908090650-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pmorel@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=walling@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).