aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/ivshmem.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2016-03-15 19:34:53 +0100
committerMarkus Armbruster <armbru@redhat.com>2016-03-21 21:29:03 +0100
commit13fd2cb68953ac066116d444415f9d5ec7ce1200 (patch)
treedb2866763e1c7bdc41dc10dcfcca1c50a8fda11d /hw/misc/ivshmem.c
parentddc852844388bb43a39319f0be8a4c4af3a4c526 (diff)
ivshmem: Drop ivshmem property x-memdev
Use ivshmem-plain instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1458066895-20632-39-git-send-email-armbru@redhat.com>
Diffstat (limited to 'hw/misc/ivshmem.c')
-rw-r--r--hw/misc/ivshmem.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 527d6362dd..455206059f 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -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;
@@ -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);
@@ -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,
};