Skip to content

Commit

Permalink
ivshmem: Drop ivshmem property x-memdev
Browse files Browse the repository at this point in the history
Use ivshmem-plain instead.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
Markus Armbruster committed Mar 21, 2016
1 parent ddc8528 commit 13fd2cb
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions hw/misc/ivshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,17 +1210,12 @@ static void ivshmem_realize(PCIDevice *dev, Error **errp)
" or ivshmem-doorbell instead");
}

if (!!s->server_chr + !!s->shmobj + !!s->hostmem != 1) {
error_setg(errp,
"You must specify either 'shm', 'chardev' or 'x-memdev'");
if (!!s->server_chr + !!s->shmobj != 1) {
error_setg(errp, "You must specify either 'shm' or 'chardev'");
return;
}

if (s->hostmem) {
if (s->sizearg) {
g_warning("size argument ignored with hostmem");
}
} else if (s->sizearg == NULL) {
if (s->sizearg == NULL) {
s->legacy_size = 4 << 20; /* 4 MB default */
} else {
char *end;
Expand Down Expand Up @@ -1260,17 +1255,6 @@ static void ivshmem_realize(PCIDevice *dev, Error **errp)
ivshmem_common_realize(dev, errp);
}

static void ivshmem_init(Object *obj)
{
IVShmemState *s = IVSHMEM(obj);

object_property_add_link(obj, "x-memdev", TYPE_MEMORY_BACKEND,
(Object **)&s->hostmem,
ivshmem_check_memdev_is_busy,
OBJ_PROP_LINK_UNREF_ON_RELEASE,
&error_abort);
}

static void ivshmem_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
Expand All @@ -1287,7 +1271,6 @@ static const TypeInfo ivshmem_info = {
.name = TYPE_IVSHMEM,
.parent = TYPE_IVSHMEM_COMMON,
.instance_size = sizeof(IVShmemState),
.instance_init = ivshmem_init,
.class_init = ivshmem_class_init,
};

Expand Down

0 comments on commit 13fd2cb

Please sign in to comment.