2 * Inter-VM Shared Memory PCI device.
7 * Based On: cirrus_vga.c
8 * Copyright (c) 2004 Fabrice Bellard
9 * Copyright (c) 2004 Makoto Suzuki (suzu)
12 * Copyright (c) 2006 Igor Kovalenko
14 * This code is licensed under the GNU GPL v2.
16 * Contributions after 2012-01-13 are licensed under the terms of the
17 * GNU GPL, version 2 or (at your option) any later version.
20 #include "hw/i386/pc.h"
21 #include "hw/pci/pci.h"
22 #include "hw/pci/msix.h"
23 #include "sysemu/kvm.h"
24 #include "migration/migration.h"
25 #include "qemu/error-report.h"
26 #include "qemu/event_notifier.h"
27 #include "qemu/fifo8.h"
28 #include "sysemu/char.h"
31 #include <sys/types.h>
34 #define PCI_VENDOR_ID_IVSHMEM PCI_VENDOR_ID_REDHAT_QUMRANET
35 #define PCI_DEVICE_ID_IVSHMEM 0x1110
37 #define IVSHMEM_MAX_PEERS G_MAXUINT16
38 #define IVSHMEM_IOEVENTFD 0
41 #define IVSHMEM_PEER 0
42 #define IVSHMEM_MASTER 1
44 #define IVSHMEM_REG_BAR_SIZE 0x100
46 //#define DEBUG_IVSHMEM
48 #define IVSHMEM_DPRINTF(fmt, ...) \
49 do {printf("IVSHMEM: " fmt, ## __VA_ARGS__); } while (0)
51 #define IVSHMEM_DPRINTF(fmt, ...)
54 #define TYPE_IVSHMEM "ivshmem"
55 #define IVSHMEM(obj) \
56 OBJECT_CHECK(IVShmemState, (obj), TYPE_IVSHMEM)
60 EventNotifier *eventfds;
63 typedef struct EventfdEntry {
68 typedef struct IVShmemState {
76 CharDriverState **eventfd_chr;
77 CharDriverState *server_chr;
79 MemoryRegion ivshmem_mmio;
81 /* We might need to register the BAR before we actually have the memory.
82 * So prepare a container MemoryRegion for the BAR immediately and
83 * add a subregion when we have the memory.
87 uint64_t ivshmem_size; /* size of shared memory region */
88 uint32_t ivshmem_64bit;
89 int shm_fd; /* shared memory file descriptor */
92 int nb_peers; /* how many guests we have space for */
97 EventfdEntry *eventfd_table;
99 Error *migration_blocker;
104 int role_val; /* scalar to avoid multiple string comparisons */
107 /* registers for the Inter-VM shared memory device */
108 enum ivshmem_registers {
115 static inline uint32_t ivshmem_has_feature(IVShmemState *ivs,
116 unsigned int feature) {
117 return (ivs->features & (1 << feature));
120 static inline bool is_power_of_two(uint64_t x) {
121 return (x & (x - 1)) == 0;
124 /* accessing registers - based on rtl8139 */
125 static void ivshmem_update_irq(IVShmemState *s)
127 PCIDevice *d = PCI_DEVICE(s);
129 isr = (s->intrstatus & s->intrmask) & 0xffffffff;
131 /* don't print ISR resets */
133 IVSHMEM_DPRINTF("Set IRQ to %d (%04x %04x)\n",
134 isr ? 1 : 0, s->intrstatus, s->intrmask);
137 pci_set_irq(d, (isr != 0));
140 static void ivshmem_IntrMask_write(IVShmemState *s, uint32_t val)
142 IVSHMEM_DPRINTF("IntrMask write(w) val = 0x%04x\n", val);
146 ivshmem_update_irq(s);
149 static uint32_t ivshmem_IntrMask_read(IVShmemState *s)
151 uint32_t ret = s->intrmask;
153 IVSHMEM_DPRINTF("intrmask read(w) val = 0x%04x\n", ret);
158 static void ivshmem_IntrStatus_write(IVShmemState *s, uint32_t val)
160 IVSHMEM_DPRINTF("IntrStatus write(w) val = 0x%04x\n", val);
164 ivshmem_update_irq(s);
167 static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
169 uint32_t ret = s->intrstatus;
171 /* reading ISR clears all interrupts */
174 ivshmem_update_irq(s);
179 static void ivshmem_io_write(void *opaque, hwaddr addr,
180 uint64_t val, unsigned size)
182 IVShmemState *s = opaque;
184 uint16_t dest = val >> 16;
185 uint16_t vector = val & 0xff;
189 IVSHMEM_DPRINTF("writing to addr " TARGET_FMT_plx "\n", addr);
193 ivshmem_IntrMask_write(s, val);
197 ivshmem_IntrStatus_write(s, val);
201 /* check that dest VM ID is reasonable */
202 if (dest >= s->nb_peers) {
203 IVSHMEM_DPRINTF("Invalid destination VM ID (%d)\n", dest);
207 /* check doorbell range */
208 if (vector < s->peers[dest].nb_eventfds) {
209 IVSHMEM_DPRINTF("Notifying VM %d on vector %d\n", dest, vector);
210 event_notifier_set(&s->peers[dest].eventfds[vector]);
212 IVSHMEM_DPRINTF("Invalid destination vector %d on VM %d\n",
217 IVSHMEM_DPRINTF("Unhandled write " TARGET_FMT_plx "\n", addr);
221 static uint64_t ivshmem_io_read(void *opaque, hwaddr addr,
225 IVShmemState *s = opaque;
231 ret = ivshmem_IntrMask_read(s);
235 ret = ivshmem_IntrStatus_read(s);
239 /* return my VM ID if the memory is mapped */
248 IVSHMEM_DPRINTF("why are we reading " TARGET_FMT_plx "\n", addr);
255 static const MemoryRegionOps ivshmem_mmio_ops = {
256 .read = ivshmem_io_read,
257 .write = ivshmem_io_write,
258 .endianness = DEVICE_NATIVE_ENDIAN,
260 .min_access_size = 4,
261 .max_access_size = 4,
265 static void ivshmem_receive(void *opaque, const uint8_t *buf, int size)
267 IVShmemState *s = opaque;
269 IVSHMEM_DPRINTF("ivshmem_receive 0x%02x size: %d\n", *buf, size);
271 ivshmem_IntrStatus_write(s, *buf);
274 static int ivshmem_can_receive(void * opaque)
279 static void ivshmem_event(void *opaque, int event)
281 IVSHMEM_DPRINTF("ivshmem_event %d\n", event);
284 static void fake_irqfd(void *opaque, const uint8_t *buf, int size) {
286 EventfdEntry *entry = opaque;
287 PCIDevice *pdev = entry->pdev;
289 IVSHMEM_DPRINTF("interrupt on vector %p %d\n", pdev, entry->vector);
290 msix_notify(pdev, entry->vector);
293 static CharDriverState* create_eventfd_chr_device(void * opaque, EventNotifier *n,
296 /* create a event character device based on the passed eventfd */
297 IVShmemState *s = opaque;
298 CharDriverState * chr;
299 int eventfd = event_notifier_get_fd(n);
301 chr = qemu_chr_open_eventfd(eventfd);
304 error_report("creating chardriver for eventfd %d failed", eventfd);
307 qemu_chr_fe_claim_no_fail(chr);
309 /* if MSI is supported we need multiple interrupts */
310 if (ivshmem_has_feature(s, IVSHMEM_MSI)) {
311 s->eventfd_table[vector].pdev = PCI_DEVICE(s);
312 s->eventfd_table[vector].vector = vector;
314 qemu_chr_add_handlers(chr, ivshmem_can_receive, fake_irqfd,
315 ivshmem_event, &s->eventfd_table[vector]);
317 qemu_chr_add_handlers(chr, ivshmem_can_receive, ivshmem_receive,
325 static int check_shm_size(IVShmemState *s, int fd, Error **errp)
327 /* check that the guest isn't going to try and map more memory than the
328 * the object has allocated return -1 to indicate error */
332 if (fstat(fd, &buf) < 0) {
333 error_setg(errp, "exiting: fstat on fd %d failed: %s",
334 fd, strerror(errno));
338 if (s->ivshmem_size > buf.st_size) {
339 error_setg(errp, "Requested memory size greater"
340 " than shared object size (%" PRIu64 " > %" PRIu64")",
341 s->ivshmem_size, (uint64_t)buf.st_size);
348 /* create the shared memory BAR when we are not using the server, so we can
349 * create the BAR and map the memory immediately */
350 static int create_shared_memory_BAR(IVShmemState *s, int fd, uint8_t attr,
355 ptr = mmap(0, s->ivshmem_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
356 if (ptr == MAP_FAILED) {
357 error_setg_errno(errp, errno, "Failed to mmap shared memory");
363 memory_region_init_ram_ptr(&s->ivshmem, OBJECT(s), "ivshmem.bar2",
364 s->ivshmem_size, ptr);
365 vmstate_register_ram(&s->ivshmem, DEVICE(s));
366 memory_region_add_subregion(&s->bar, 0, &s->ivshmem);
368 /* region for shared memory */
369 pci_register_bar(PCI_DEVICE(s), 2, attr, &s->bar);
374 static void ivshmem_add_eventfd(IVShmemState *s, int posn, int i)
376 memory_region_add_eventfd(&s->ivshmem_mmio,
381 &s->peers[posn].eventfds[i]);
384 static void ivshmem_del_eventfd(IVShmemState *s, int posn, int i)
386 memory_region_del_eventfd(&s->ivshmem_mmio,
391 &s->peers[posn].eventfds[i]);
394 static void close_guest_eventfds(IVShmemState *s, int posn)
396 int i, guest_curr_max;
398 if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
401 if (posn < 0 || posn >= s->nb_peers) {
402 error_report("invalid peer %d", posn);
406 guest_curr_max = s->peers[posn].nb_eventfds;
408 memory_region_transaction_begin();
409 for (i = 0; i < guest_curr_max; i++) {
410 ivshmem_del_eventfd(s, posn, i);
412 memory_region_transaction_commit();
413 for (i = 0; i < guest_curr_max; i++) {
414 event_notifier_cleanup(&s->peers[posn].eventfds[i]);
417 g_free(s->peers[posn].eventfds);
418 s->peers[posn].nb_eventfds = 0;
421 /* this function increase the dynamic storage need to store data about other
423 static int resize_peers(IVShmemState *s, int new_min_size)
428 /* limit number of max peers */
429 if (new_min_size <= 0 || new_min_size > IVSHMEM_MAX_PEERS) {
432 if (new_min_size <= s->nb_peers) {
436 old_size = s->nb_peers;
437 s->nb_peers = new_min_size;
439 IVSHMEM_DPRINTF("bumping storage to %d guests\n", s->nb_peers);
441 s->peers = g_realloc(s->peers, s->nb_peers * sizeof(Peer));
443 for (j = old_size; j < s->nb_peers; j++) {
444 s->peers[j].eventfds = g_new0(EventNotifier, s->vectors);
445 s->peers[j].nb_eventfds = 0;
451 static bool fifo_update_and_get(IVShmemState *s, const uint8_t *buf, int size,
452 void *data, size_t len)
457 assert(len <= sizeof(long)); /* limitation of the fifo */
458 if (fifo8_is_empty(&s->incoming_fifo) && size == len) {
459 memcpy(data, buf, size);
463 IVSHMEM_DPRINTF("short read of %d bytes\n", size);
465 num = MIN(size, sizeof(long) - fifo8_num_used(&s->incoming_fifo));
466 fifo8_push_all(&s->incoming_fifo, buf, num);
468 if (fifo8_num_used(&s->incoming_fifo) < len) {
475 p = fifo8_pop_buf(&s->incoming_fifo, len, &num);
478 memcpy(data, p, len);
481 fifo8_push_all(&s->incoming_fifo, buf, size);
487 static void ivshmem_read(void *opaque, const uint8_t *buf, int size)
489 IVShmemState *s = opaque;
496 if (!fifo_update_and_get(s, buf, size,
497 &incoming_posn, sizeof(incoming_posn))) {
501 if (incoming_posn < -1) {
502 IVSHMEM_DPRINTF("invalid incoming_posn %ld\n", incoming_posn);
506 /* pick off s->server_chr->msgfd and store it, posn should accompany msg */
507 incoming_fd = qemu_chr_fe_get_msgfd(s->server_chr);
508 IVSHMEM_DPRINTF("posn is %ld, fd is %d\n", incoming_posn, incoming_fd);
510 /* make sure we have enough space for this guest */
511 if (incoming_posn >= s->nb_peers) {
512 if (resize_peers(s, incoming_posn + 1) < 0) {
513 error_report("failed to resize peers array");
514 if (incoming_fd != -1) {
521 peer = &s->peers[incoming_posn];
523 if (incoming_fd == -1) {
524 /* if posn is positive and unseen before then this is our posn*/
525 if (incoming_posn >= 0 && s->vm_id == -1) {
526 /* receive our posn */
527 s->vm_id = incoming_posn;
530 /* otherwise an fd == -1 means an existing guest has gone away */
531 IVSHMEM_DPRINTF("posn %ld has gone away\n", incoming_posn);
532 close_guest_eventfds(s, incoming_posn);
537 /* if the position is -1, then it's shared memory region fd */
538 if (incoming_posn == -1) {
541 if (check_shm_size(s, incoming_fd, &err) == -1) {
542 error_report_err(err);
547 /* mmap the region and map into the BAR2 */
548 map_ptr = mmap(0, s->ivshmem_size, PROT_READ|PROT_WRITE, MAP_SHARED,
550 if (map_ptr == MAP_FAILED) {
551 error_report("Failed to mmap shared memory %s", strerror(errno));
555 memory_region_init_ram_ptr(&s->ivshmem, OBJECT(s),
556 "ivshmem.bar2", s->ivshmem_size, map_ptr);
557 vmstate_register_ram(&s->ivshmem, DEVICE(s));
559 IVSHMEM_DPRINTF("guest h/w addr = %p, size = %" PRIu64 "\n",
560 map_ptr, s->ivshmem_size);
562 memory_region_add_subregion(&s->bar, 0, &s->ivshmem);
564 /* only store the fd if it is successfully mapped */
565 s->shm_fd = incoming_fd;
570 /* each peer has an associated array of eventfds, and we keep
571 * track of how many eventfds received so far */
572 /* get a new eventfd: */
573 new_eventfd = peer->nb_eventfds++;
575 /* this is an eventfd for a particular guest VM */
576 IVSHMEM_DPRINTF("eventfds[%ld][%d] = %d\n", incoming_posn,
577 new_eventfd, incoming_fd);
578 event_notifier_init_fd(&peer->eventfds[new_eventfd], incoming_fd);
580 if (incoming_posn == s->vm_id) {
581 s->eventfd_chr[new_eventfd] = create_eventfd_chr_device(s,
582 &s->peers[s->vm_id].eventfds[new_eventfd],
586 if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
587 ivshmem_add_eventfd(s, incoming_posn, new_eventfd);
591 /* Select the MSI-X vectors used by device.
592 * ivshmem maps events to vectors statically, so
593 * we just enable all vectors on init and after reset. */
594 static void ivshmem_use_msix(IVShmemState * s)
596 PCIDevice *d = PCI_DEVICE(s);
599 IVSHMEM_DPRINTF("%s, msix present: %d\n", __func__, msix_present(d));
600 if (!msix_present(d)) {
604 for (i = 0; i < s->vectors; i++) {
605 msix_vector_use(d, i);
609 static void ivshmem_reset(DeviceState *d)
611 IVShmemState *s = IVSHMEM(d);
617 static uint64_t ivshmem_get_size(IVShmemState * s, Error **errp) {
622 value = strtoull(s->sizearg, &ptr, 10);
624 case 0: case 'M': case 'm':
631 error_setg(errp, "invalid ram size: %s", s->sizearg);
635 /* BARs must be a power of 2 */
636 if (!is_power_of_two(value)) {
637 error_setg(errp, "size must be power of 2");
644 static int ivshmem_setup_msi(IVShmemState * s)
646 if (msix_init_exclusive_bar(PCI_DEVICE(s), s->vectors, 1)) {
650 IVSHMEM_DPRINTF("msix initialized (%d vectors)\n", s->vectors);
652 /* allocate QEMU char devices for receiving interrupts */
653 s->eventfd_table = g_malloc0(s->vectors * sizeof(EventfdEntry));
659 static void ivshmem_save(QEMUFile* f, void *opaque)
661 IVShmemState *proxy = opaque;
662 PCIDevice *pci_dev = PCI_DEVICE(proxy);
664 IVSHMEM_DPRINTF("ivshmem_save\n");
665 pci_device_save(pci_dev, f);
667 if (ivshmem_has_feature(proxy, IVSHMEM_MSI)) {
668 msix_save(pci_dev, f);
670 qemu_put_be32(f, proxy->intrstatus);
671 qemu_put_be32(f, proxy->intrmask);
676 static int ivshmem_load(QEMUFile* f, void *opaque, int version_id)
678 IVSHMEM_DPRINTF("ivshmem_load\n");
680 IVShmemState *proxy = opaque;
681 PCIDevice *pci_dev = PCI_DEVICE(proxy);
684 if (version_id > 0) {
688 if (proxy->role_val == IVSHMEM_PEER) {
689 error_report("'peer' devices are not migratable");
693 ret = pci_device_load(pci_dev, f);
698 if (ivshmem_has_feature(proxy, IVSHMEM_MSI)) {
699 msix_load(pci_dev, f);
700 ivshmem_use_msix(proxy);
702 proxy->intrstatus = qemu_get_be32(f);
703 proxy->intrmask = qemu_get_be32(f);
709 static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address,
710 uint32_t val, int len)
712 pci_default_write_config(pci_dev, address, val, len);
715 static void pci_ivshmem_realize(PCIDevice *dev, Error **errp)
717 IVShmemState *s = IVSHMEM(dev);
719 uint8_t attr = PCI_BASE_ADDRESS_SPACE_MEMORY |
720 PCI_BASE_ADDRESS_MEM_PREFETCH;
721 Error *local_err = NULL;
723 if (s->sizearg == NULL) {
724 s->ivshmem_size = 4 << 20; /* 4 MB default */
726 s->ivshmem_size = ivshmem_get_size(s, &local_err);
728 error_propagate(errp, local_err);
733 fifo8_create(&s->incoming_fifo, sizeof(long));
734 register_savevm(DEVICE(dev), "ivshmem", 0, 0, ivshmem_save, ivshmem_load,
736 /* IRQFD requires MSI */
737 if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD) &&
738 !ivshmem_has_feature(s, IVSHMEM_MSI)) {
739 error_setg(errp, "ioeventfd/irqfd requires MSI");
743 /* check that role is reasonable */
745 if (strncmp(s->role, "peer", 5) == 0) {
746 s->role_val = IVSHMEM_PEER;
747 } else if (strncmp(s->role, "master", 7) == 0) {
748 s->role_val = IVSHMEM_MASTER;
750 error_setg(errp, "'role' must be 'peer' or 'master'");
754 s->role_val = IVSHMEM_MASTER; /* default */
757 if (s->role_val == IVSHMEM_PEER) {
758 error_setg(&s->migration_blocker,
759 "Migration is disabled when using feature 'peer mode' in device 'ivshmem'");
760 migrate_add_blocker(s->migration_blocker);
763 pci_conf = dev->config;
764 pci_conf[PCI_COMMAND] = PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
766 pci_config_set_interrupt_pin(pci_conf, 1);
770 memory_region_init_io(&s->ivshmem_mmio, OBJECT(s), &ivshmem_mmio_ops, s,
771 "ivshmem-mmio", IVSHMEM_REG_BAR_SIZE);
773 /* region for registers*/
774 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY,
777 memory_region_init(&s->bar, OBJECT(s), "ivshmem-bar2-container", s->ivshmem_size);
778 if (s->ivshmem_64bit) {
779 attr |= PCI_BASE_ADDRESS_MEM_TYPE_64;
782 if (s->server_chr != NULL) {
783 if (strncmp(s->server_chr->filename, "unix:", 5)) {
784 error_setg(errp, "chardev is not a unix client socket");
788 /* if we get a UNIX socket as the parameter we will talk
789 * to the ivshmem server to receive the memory region */
791 if (s->shmobj != NULL) {
792 error_setg(errp, "do not specify both 'chardev' "
793 "and 'shm' with ivshmem");
797 IVSHMEM_DPRINTF("using shared memory server (socket = %s)\n",
798 s->server_chr->filename);
800 if (ivshmem_has_feature(s, IVSHMEM_MSI) &&
801 ivshmem_setup_msi(s)) {
802 error_setg(errp, "msix initialization failed");
806 /* we allocate enough space for 16 guests and grow as needed */
810 pci_register_bar(dev, 2, attr, &s->bar);
812 s->eventfd_chr = g_malloc0(s->vectors * sizeof(CharDriverState *));
814 qemu_chr_add_handlers(s->server_chr, ivshmem_can_receive, ivshmem_read,
817 /* just map the file immediately, we're not using a server */
820 if (s->shmobj == NULL) {
821 error_setg(errp, "Must specify 'chardev' or 'shm' to ivshmem");
825 IVSHMEM_DPRINTF("using shm_open (shm object = %s)\n", s->shmobj);
827 /* try opening with O_EXCL and if it succeeds zero the memory
828 * by truncating to 0 */
829 if ((fd = shm_open(s->shmobj, O_CREAT|O_RDWR|O_EXCL,
830 S_IRWXU|S_IRWXG|S_IRWXO)) > 0) {
831 /* truncate file to length PCI device's memory */
832 if (ftruncate(fd, s->ivshmem_size) != 0) {
833 error_report("could not truncate shared file");
836 } else if ((fd = shm_open(s->shmobj, O_CREAT|O_RDWR,
837 S_IRWXU|S_IRWXG|S_IRWXO)) < 0) {
838 error_setg(errp, "could not open shared file");
842 if (check_shm_size(s, fd, errp) == -1) {
846 create_shared_memory_BAR(s, fd, attr, errp);
850 static void pci_ivshmem_exit(PCIDevice *dev)
852 IVShmemState *s = IVSHMEM(dev);
854 if (s->migration_blocker) {
855 migrate_del_blocker(s->migration_blocker);
856 error_free(s->migration_blocker);
859 memory_region_del_subregion(&s->bar, &s->ivshmem);
860 vmstate_unregister_ram(&s->ivshmem, DEVICE(dev));
861 unregister_savevm(DEVICE(dev), "ivshmem", s);
862 fifo8_destroy(&s->incoming_fifo);
865 static Property ivshmem_properties[] = {
866 DEFINE_PROP_CHR("chardev", IVShmemState, server_chr),
867 DEFINE_PROP_STRING("size", IVShmemState, sizearg),
868 DEFINE_PROP_UINT32("vectors", IVShmemState, vectors, 1),
869 DEFINE_PROP_BIT("ioeventfd", IVShmemState, features, IVSHMEM_IOEVENTFD, false),
870 DEFINE_PROP_BIT("msi", IVShmemState, features, IVSHMEM_MSI, true),
871 DEFINE_PROP_STRING("shm", IVShmemState, shmobj),
872 DEFINE_PROP_STRING("role", IVShmemState, role),
873 DEFINE_PROP_UINT32("use64", IVShmemState, ivshmem_64bit, 1),
874 DEFINE_PROP_END_OF_LIST(),
877 static void ivshmem_class_init(ObjectClass *klass, void *data)
879 DeviceClass *dc = DEVICE_CLASS(klass);
880 PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
882 k->realize = pci_ivshmem_realize;
883 k->exit = pci_ivshmem_exit;
884 k->config_write = ivshmem_write_config;
885 k->vendor_id = PCI_VENDOR_ID_IVSHMEM;
886 k->device_id = PCI_DEVICE_ID_IVSHMEM;
887 k->class_id = PCI_CLASS_MEMORY_RAM;
888 dc->reset = ivshmem_reset;
889 dc->props = ivshmem_properties;
890 set_bit(DEVICE_CATEGORY_MISC, dc->categories);
893 static const TypeInfo ivshmem_info = {
894 .name = TYPE_IVSHMEM,
895 .parent = TYPE_PCI_DEVICE,
896 .instance_size = sizeof(IVShmemState),
897 .class_init = ivshmem_class_init,
900 static void ivshmem_register_types(void)
902 type_register_static(&ivshmem_info);
905 type_init(ivshmem_register_types)