qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <mlureau@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: marcandre lureau <marcandre.lureau@redhat.com>,
	claudio fontana <claudio.fontana@huawei.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.5 5/5] ivshmem: Rename property memdev to x-memdev for 2.5
Date: Tue, 24 Nov 2015 12:20:49 -0500 (EST)	[thread overview]
Message-ID: <995141504.16573140.1448385649670.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1448384789-14830-6-git-send-email-armbru@redhat.com>



----- Original Message -----
> The device's guest interface and its QEMU user interface are
> flawed^Whotly debated.  We'll resolve that in the next development
> cycle, probably by deprecating the device in favour of a cleaned up,
> but not quite compatible revision.
> 
> To avoid adding more baggage to the soon-to-be-deprecated interface,
> mark property "memdev" as experimental, by renaming it to "x-memdev".
> It's the only recent user interface change.

Sounds good to me,

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  hw/misc/ivshmem.c    | 8 +++-----
>  tests/ivshmem-test.c | 2 +-
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index a6bfdde..e24f9ee 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -60,8 +60,6 @@
>  #define IVSHMEM(obj) \
>      OBJECT_CHECK(IVShmemState, (obj), TYPE_IVSHMEM)
>  
> -#define IVSHMEM_MEMDEV_PROP "memdev"
> -

I agree the define is unneeded, I probably adapted the code from pc-dimm which declare it in public header (not sure why btw)

>  typedef struct Peer {
>      int nb_eventfds;
>      EventNotifier *eventfds;
> @@ -857,8 +855,8 @@ static void pci_ivshmem_realize(PCIDevice *dev, Error
> **errp)
>          PCI_BASE_ADDRESS_MEM_PREFETCH;
>  
>      if (!!s->server_chr + !!s->shmobj + !!s->hostmem != 1) {
> -        error_setg(errp, "You must specify either a shmobj, a chardev"
> -                   " or a hostmem");
> +        error_setg(errp,
> +                   "You must specify either 'shm', 'chardev' or
> 'x-memdev'");

nice improvement

>          return;
>      }
>  
> @@ -1182,7 +1180,7 @@ static void ivshmem_init(Object *obj)
>  {
>      IVShmemState *s = IVSHMEM(obj);
>  
> -    object_property_add_link(obj, IVSHMEM_MEMDEV_PROP, TYPE_MEMORY_BACKEND,
> +    object_property_add_link(obj, "x-memdev", TYPE_MEMORY_BACKEND,
>                               (Object **)&s->hostmem,
>                               ivshmem_check_memdev_is_busy,
>                               OBJ_PROP_LINK_UNREF_ON_RELEASE,
> diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c
> index 8f1a849..03c7b96 100644
> --- a/tests/ivshmem-test.c
> +++ b/tests/ivshmem-test.c
> @@ -393,7 +393,7 @@ static void test_ivshmem_memdev(void)
>  
>      /* just for the sake of checking memory-backend property */
>      setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1"
> -                 " -device ivshmem,memdev=mb1", false);
> +                 " -device ivshmem,x-memdev=mb1", false);
>  
>      qtest_quit(state.qtest);
>  }
> --
> 2.4.3
> 
> 

  reply	other threads:[~2015-11-24 17:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 17:06 [Qemu-devel] [PATCH for-2.5 0/5] ivshmem: Last minute changes Markus Armbruster
2015-11-24 17:06 ` [Qemu-devel] [PATCH for-2.5 1/5] qemu-doc: Fix ivshmem example markup Markus Armbruster
2015-11-24 17:12   ` Marc-André Lureau
2015-11-24 17:06 ` [Qemu-devel] [PATCH for-2.5 2/5] qemu-doc: Fix ivshmem usage example with shm= Markus Armbruster
2015-11-24 17:14   ` Marc-André Lureau
2015-11-24 17:06 ` [Qemu-devel] [PATCH for-2.5 3/5] tests/ivshmem-test: Supply missing initializer in get_device() Markus Armbruster
2015-11-24 17:16   ` Marc-André Lureau
2015-11-24 17:06 ` [Qemu-devel] [PATCH for-2.5 4/5] ivshmem: Mark questionable socket type test FIXME Markus Armbruster
2015-11-24 17:17   ` Marc-André Lureau
2015-11-24 17:29     ` Markus Armbruster
2015-11-24 17:42       ` Marc-André Lureau
2015-11-24 18:53         ` Markus Armbruster
2015-11-24 19:52           ` Marc-André Lureau
2015-11-25  8:42             ` Markus Armbruster
2015-11-25  8:46               ` Marc-André Lureau
2015-11-25  9:18                 ` Markus Armbruster
2015-11-24 17:06 ` [Qemu-devel] [PATCH for-2.5 5/5] ivshmem: Rename property memdev to x-memdev for 2.5 Markus Armbruster
2015-11-24 17:20   ` Marc-André Lureau [this message]
2015-11-24 17:28   ` Markus Armbruster

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=995141504.16573140.1448385649670.JavaMail.zimbra@redhat.com \
    --to=mlureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=claudio.fontana@huawei.com \
    --cc=marcandre.lureau@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).