qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	eric.auger@redhat.com, aik@ozlabs.ru
Subject: Re: [Qemu-devel] [PATCH v2 4/5] qapi: Create DEFINE_PROP_OFF_AUTO_PCIBAR
Date: Wed, 24 Jan 2018 08:49:58 -0700	[thread overview]
Message-ID: <20180124084958.27de6759@w520.home> (raw)
In-Reply-To: <20180110190224.5389.18151.stgit@gimli.home>


Ping, can any qapi folks comment or provide an ack/review for this
please?  Thanks!

Alex

On Wed, 10 Jan 2018 12:02:24 -0700
Alex Williamson <alex.williamson@redhat.com> wrote:

> Add an option which allows the user to specify a PCI BAR number,
> including an 'off' and 'auto' selection.
> 
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Eric Blake <eblake@redhat.com>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>  hw/core/qdev-properties.c    |   11 +++++++++++
>  include/hw/qdev-properties.h |    4 ++++
>  qapi/common.json             |   26 ++++++++++++++++++++++++++
>  3 files changed, 41 insertions(+)
> 
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 1dc80fcea2af..e33184e5a342 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -1256,3 +1256,14 @@ const PropertyInfo qdev_prop_link = {
>      .name = "link",
>      .create = create_link_property,
>  };
> +
> +/* --- OffAutoPCIBAR off/auto/bar0/bar1/bar2/bar3/bar4/bar5 --- */
> +
> +const PropertyInfo qdev_prop_off_auto_pcibar = {
> +    .name = "OffAutoPCIBAR",
> +    .description = "off/auto/bar0/bar1/bar2/bar3/bar4/bar5",
> +    .enum_table = &OffAutoPCIBAR_lookup,
> +    .get = get_enum,
> +    .set = set_enum,
> +    .set_default_value = set_default_value_enum,
> +};
> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 60b42ac561af..e2643f5126c4 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -33,6 +33,7 @@ extern const PropertyInfo qdev_prop_blocksize;
>  extern const PropertyInfo qdev_prop_pci_host_devaddr;
>  extern const PropertyInfo qdev_prop_arraylen;
>  extern const PropertyInfo qdev_prop_link;
> +extern const PropertyInfo qdev_prop_off_auto_pcibar;
>  
>  #define DEFINE_PROP(_name, _state, _field, _prop, _type) { \
>          .name      = (_name),                                    \
> @@ -213,6 +214,9 @@ extern const PropertyInfo qdev_prop_link;
>      DEFINE_PROP(_n, _s, _f, qdev_prop_pci_host_devaddr, PCIHostDeviceAddress)
>  #define DEFINE_PROP_MEMORY_REGION(_n, _s, _f)             \
>      DEFINE_PROP(_n, _s, _f, qdev_prop_ptr, MemoryRegion *)
> +#define DEFINE_PROP_OFF_AUTO_PCIBAR(_n, _s, _f, _d) \
> +    DEFINE_PROP_SIGNED(_n, _s, _f, _d, qdev_prop_off_auto_pcibar, \
> +                        OffAutoPCIBAR)
>  
>  #define DEFINE_PROP_END_OF_LIST()               \
>      {}
> diff --git a/qapi/common.json b/qapi/common.json
> index 6eb01821ef59..d9b14dd429f3 100644
> --- a/qapi/common.json
> +++ b/qapi/common.json
> @@ -100,3 +100,29 @@
>  { 'alternate': 'StrOrNull',
>    'data': { 's': 'str',
>              'n': 'null' } }
> +
> +##
> +# @OffAutoPCIBAR:
> +#
> +# An enumeration of options for specifying a PCI BAR
> +#
> +# @off: The specified feature is disabled
> +#
> +# @auto: The PCI BAR for the feature is automatically selected
> +#
> +# @bar0: PCI BAR0 is used for the feature
> +#
> +# @bar1: PCI BAR1 is used for the feature
> +#
> +# @bar2: PCI BAR2 is used for the feature
> +#
> +# @bar3: PCI BAR3 is used for the feature
> +#
> +# @bar4: PCI BAR4 is used for the feature
> +#
> +# @bar5: PCI BAR5 is used for the feature
> +#
> +# Since: 2.12
> +##
> +{ 'enum': 'OffAutoPCIBAR',
> +  'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
> 

  reply	other threads:[~2018-01-24 15:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 19:01 [Qemu-devel] [PATCH v2 0/5] vfio/pci: MSI-X MMIO relocation Alex Williamson
2018-01-10 19:01 ` [Qemu-devel] [PATCH v2 1/5] vfio/pci: Fixup VFIOMSIXInfo comment Alex Williamson
2018-01-10 19:02 ` [Qemu-devel] [PATCH v2 2/5] vfio/pci: Add base BAR MemoryRegion Alex Williamson
2018-02-02  2:19   ` [Qemu-devel] [PATCH v3 " Alex Williamson
2018-01-10 19:02 ` [Qemu-devel] [PATCH v2 3/5] vfio/pci: Emulate BARs Alex Williamson
2018-01-10 19:02 ` [Qemu-devel] [PATCH v2 4/5] qapi: Create DEFINE_PROP_OFF_AUTO_PCIBAR Alex Williamson
2018-01-24 15:49   ` Alex Williamson [this message]
2018-01-31 13:24   ` Markus Armbruster
2018-01-10 19:02 ` [Qemu-devel] [PATCH v2 5/5] vfio/pci: Allow relocating MSI-X MMIO Alex Williamson
2018-01-19  9:50   ` Auger Eric
2018-01-19 15:23     ` Alex Williamson
2018-01-19 15:27       ` Auger Eric
2018-01-15  3:39 ` [Qemu-devel] [PATCH v2 0/5] vfio/pci: MSI-X MMIO relocation Alexey Kardashevskiy
2018-01-19 10:26 ` Auger Eric

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=20180124084958.27de6759@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=qemu-devel@nongnu.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 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).