ivshmem: Rename property memdev to x-memdev for 2.5
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. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1448384789-14830-6-git-send-email-armbru@redhat.com> [Update of qemu-doc.texi squashed in] Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
		
							parent
							
								
									2825717c02
								
							
						
					
					
						commit
						1d649244b3
					
				| 
						 | 
					@ -60,8 +60,6 @@
 | 
				
			||||||
#define IVSHMEM(obj) \
 | 
					#define IVSHMEM(obj) \
 | 
				
			||||||
    OBJECT_CHECK(IVShmemState, (obj), TYPE_IVSHMEM)
 | 
					    OBJECT_CHECK(IVShmemState, (obj), TYPE_IVSHMEM)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define IVSHMEM_MEMDEV_PROP "memdev"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef struct Peer {
 | 
					typedef struct Peer {
 | 
				
			||||||
    int nb_eventfds;
 | 
					    int nb_eventfds;
 | 
				
			||||||
    EventNotifier *eventfds;
 | 
					    EventNotifier *eventfds;
 | 
				
			||||||
| 
						 | 
					@ -857,8 +855,8 @@ static void pci_ivshmem_realize(PCIDevice *dev, Error **errp)
 | 
				
			||||||
        PCI_BASE_ADDRESS_MEM_PREFETCH;
 | 
					        PCI_BASE_ADDRESS_MEM_PREFETCH;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!!s->server_chr + !!s->shmobj + !!s->hostmem != 1) {
 | 
					    if (!!s->server_chr + !!s->shmobj + !!s->hostmem != 1) {
 | 
				
			||||||
        error_setg(errp, "You must specify either a shmobj, a chardev"
 | 
					        error_setg(errp,
 | 
				
			||||||
                   " or a hostmem");
 | 
					                   "You must specify either 'shm', 'chardev' or 'x-memdev'");
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1182,7 +1180,7 @@ static void ivshmem_init(Object *obj)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    IVShmemState *s = IVSHMEM(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,
 | 
					                             (Object **)&s->hostmem,
 | 
				
			||||||
                             ivshmem_check_memdev_is_busy,
 | 
					                             ivshmem_check_memdev_is_busy,
 | 
				
			||||||
                             OBJ_PROP_LINK_UNREF_ON_RELEASE,
 | 
					                             OBJ_PROP_LINK_UNREF_ON_RELEASE,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1300,7 +1300,7 @@ a memory backend that has hugepage support:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@example
 | 
					@example
 | 
				
			||||||
qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1
 | 
					qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1
 | 
				
			||||||
                 -device ivshmem,memdev=mb1
 | 
					                 -device ivshmem,x-memdev=mb1
 | 
				
			||||||
@end example
 | 
					@end example
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ivshmem-server also supports hugepages mount points with the
 | 
					ivshmem-server also supports hugepages mount points with the
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -393,7 +393,7 @@ static void test_ivshmem_memdev(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* just for the sake of checking memory-backend property */
 | 
					    /* just for the sake of checking memory-backend property */
 | 
				
			||||||
    setup_vm_cmd(&state, "-object memory-backend-ram,size=1M,id=mb1"
 | 
					    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);
 | 
					    qtest_quit(state.qtest);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue