1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2012 VMware, Inc. All rights reserved.
8 #include <linux/vmw_vmci_defs.h>
9 #include <linux/vmw_vmci_api.h>
10 #include <linux/moduleparam.h>
11 #include <linux/interrupt.h>
12 #include <linux/highmem.h>
13 #include <linux/kernel.h>
15 #include <linux/module.h>
16 #include <linux/sched.h>
17 #include <linux/slab.h>
18 #include <linux/init.h>
19 #include <linux/pci.h>
20 #include <linux/smp.h>
22 #include <linux/vmalloc.h>
24 #include "vmci_datagram.h"
25 #include "vmci_doorbell.h"
26 #include "vmci_context.h"
27 #include "vmci_driver.h"
28 #include "vmci_event.h"
30 #define PCI_DEVICE_ID_VMWARE_VMCI 0x0740
32 #define VMCI_UTIL_NUM_RESOURCES 1
34 static bool vmci_disable_msi
;
35 module_param_named(disable_msi
, vmci_disable_msi
, bool, 0);
36 MODULE_PARM_DESC(disable_msi
, "Disable MSI use in driver - (default=0)");
38 static bool vmci_disable_msix
;
39 module_param_named(disable_msix
, vmci_disable_msix
, bool, 0);
40 MODULE_PARM_DESC(disable_msix
, "Disable MSI-X use in driver - (default=0)");
42 static u32 ctx_update_sub_id
= VMCI_INVALID_ID
;
43 static u32 vm_context_id
= VMCI_INVALID_ID
;
45 struct vmci_guest_device
{
46 struct device
*dev
; /* PCI device we are attached to */
49 bool exclusive_vectors
;
51 struct tasklet_struct datagram_tasklet
;
52 struct tasklet_struct bm_tasklet
;
55 void *notification_bitmap
;
56 dma_addr_t notification_base
;
59 static bool use_ppn64
;
61 bool vmci_use_ppn64(void)
66 /* vmci_dev singleton device and supporting data*/
67 struct pci_dev
*vmci_pdev
;
68 static struct vmci_guest_device
*vmci_dev_g
;
69 static DEFINE_SPINLOCK(vmci_dev_spinlock
);
71 static atomic_t vmci_num_guest_devices
= ATOMIC_INIT(0);
73 bool vmci_guest_code_active(void)
75 return atomic_read(&vmci_num_guest_devices
) != 0;
78 u32
vmci_get_vm_context_id(void)
80 if (vm_context_id
== VMCI_INVALID_ID
) {
81 struct vmci_datagram get_cid_msg
;
83 vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID
,
85 get_cid_msg
.src
= VMCI_ANON_SRC_HANDLE
;
86 get_cid_msg
.payload_size
= 0;
87 vm_context_id
= vmci_send_datagram(&get_cid_msg
);
93 * VM to hypervisor call mechanism. We use the standard VMware naming
94 * convention since shared code is calling this function as well.
96 int vmci_send_datagram(struct vmci_datagram
*dg
)
103 return VMCI_ERROR_INVALID_ARGS
;
106 * Need to acquire spinlock on the device because the datagram
107 * data may be spread over multiple pages and the monitor may
108 * interleave device user rpc calls from multiple
109 * VCPUs. Acquiring the spinlock precludes that
110 * possibility. Disabling interrupts to avoid incoming
111 * datagrams during a "rep out" and possibly landing up in
114 spin_lock_irqsave(&vmci_dev_spinlock
, flags
);
117 iowrite8_rep(vmci_dev_g
->iobase
+ VMCI_DATA_OUT_ADDR
,
118 dg
, VMCI_DG_SIZE(dg
));
119 result
= ioread32(vmci_dev_g
->iobase
+ VMCI_RESULT_LOW_ADDR
);
121 result
= VMCI_ERROR_UNAVAILABLE
;
124 spin_unlock_irqrestore(&vmci_dev_spinlock
, flags
);
128 EXPORT_SYMBOL_GPL(vmci_send_datagram
);
131 * Gets called with the new context id if updated or resumed.
134 static void vmci_guest_cid_update(u32 sub_id
,
135 const struct vmci_event_data
*event_data
,
138 const struct vmci_event_payld_ctx
*ev_payload
=
139 vmci_event_data_const_payload(event_data
);
141 if (sub_id
!= ctx_update_sub_id
) {
142 pr_devel("Invalid subscriber (ID=0x%x)\n", sub_id
);
146 if (!event_data
|| ev_payload
->context_id
== VMCI_INVALID_ID
) {
147 pr_devel("Invalid event data\n");
151 pr_devel("Updating context from (ID=0x%x) to (ID=0x%x) on event (type=%d)\n",
152 vm_context_id
, ev_payload
->context_id
, event_data
->event
);
154 vm_context_id
= ev_payload
->context_id
;
158 * Verify that the host supports the hypercalls we need. If it does not,
159 * try to find fallback hypercalls and use those instead. Returns
160 * true if required hypercalls (or fallback hypercalls) are
161 * supported by the host, false otherwise.
163 static int vmci_check_host_caps(struct pci_dev
*pdev
)
166 struct vmci_resource_query_msg
*msg
;
167 u32 msg_size
= sizeof(struct vmci_resource_query_hdr
) +
168 VMCI_UTIL_NUM_RESOURCES
* sizeof(u32
);
169 struct vmci_datagram
*check_msg
;
171 check_msg
= kmalloc(msg_size
, GFP_KERNEL
);
173 dev_err(&pdev
->dev
, "%s: Insufficient memory\n", __func__
);
177 check_msg
->dst
= vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID
,
178 VMCI_RESOURCES_QUERY
);
179 check_msg
->src
= VMCI_ANON_SRC_HANDLE
;
180 check_msg
->payload_size
= msg_size
- VMCI_DG_HEADERSIZE
;
181 msg
= (struct vmci_resource_query_msg
*)VMCI_DG_PAYLOAD(check_msg
);
183 msg
->num_resources
= VMCI_UTIL_NUM_RESOURCES
;
184 msg
->resources
[0] = VMCI_GET_CONTEXT_ID
;
186 /* Checks that hyper calls are supported */
187 result
= vmci_send_datagram(check_msg
) == 0x01;
190 dev_dbg(&pdev
->dev
, "%s: Host capability check: %s\n",
191 __func__
, result
? "PASSED" : "FAILED");
193 /* We need the vector. There are no fallbacks. */
194 return result
? 0 : -ENXIO
;
198 * Reads datagrams from the data in port and dispatches them. We
199 * always start reading datagrams into only the first page of the
200 * datagram buffer. If the datagrams don't fit into one page, we
201 * use the maximum datagram buffer size for the remainder of the
202 * invocation. This is a simple heuristic for not penalizing
205 * This function assumes that it has exclusive access to the data
206 * in port for the duration of the call.
208 static void vmci_dispatch_dgs(unsigned long data
)
210 struct vmci_guest_device
*vmci_dev
= (struct vmci_guest_device
*)data
;
211 u8
*dg_in_buffer
= vmci_dev
->data_buffer
;
212 struct vmci_datagram
*dg
;
213 size_t dg_in_buffer_size
= VMCI_MAX_DG_SIZE
;
214 size_t current_dg_in_buffer_size
= PAGE_SIZE
;
215 size_t remaining_bytes
;
217 BUILD_BUG_ON(VMCI_MAX_DG_SIZE
< PAGE_SIZE
);
219 ioread8_rep(vmci_dev
->iobase
+ VMCI_DATA_IN_ADDR
,
220 vmci_dev
->data_buffer
, current_dg_in_buffer_size
);
221 dg
= (struct vmci_datagram
*)dg_in_buffer
;
222 remaining_bytes
= current_dg_in_buffer_size
;
224 while (dg
->dst
.resource
!= VMCI_INVALID_ID
||
225 remaining_bytes
> PAGE_SIZE
) {
229 * When the input buffer spans multiple pages, a datagram can
230 * start on any page boundary in the buffer.
232 if (dg
->dst
.resource
== VMCI_INVALID_ID
) {
233 dg
= (struct vmci_datagram
*)roundup(
234 (uintptr_t)dg
+ 1, PAGE_SIZE
);
236 (size_t)(dg_in_buffer
+
237 current_dg_in_buffer_size
-
242 dg_in_size
= VMCI_DG_SIZE_ALIGNED(dg
);
244 if (dg_in_size
<= dg_in_buffer_size
) {
248 * If the remaining bytes in the datagram
249 * buffer doesn't contain the complete
250 * datagram, we first make sure we have enough
251 * room for it and then we read the reminder
252 * of the datagram and possibly any following
255 if (dg_in_size
> remaining_bytes
) {
256 if (remaining_bytes
!=
257 current_dg_in_buffer_size
) {
260 * We move the partial
261 * datagram to the front and
262 * read the reminder of the
263 * datagram and possibly
264 * following calls into the
267 memmove(dg_in_buffer
, dg_in_buffer
+
268 current_dg_in_buffer_size
-
271 dg
= (struct vmci_datagram
*)
275 if (current_dg_in_buffer_size
!=
277 current_dg_in_buffer_size
=
280 ioread8_rep(vmci_dev
->iobase
+
282 vmci_dev
->data_buffer
+
284 current_dg_in_buffer_size
-
289 * We special case event datagrams from the
292 if (dg
->src
.context
== VMCI_HYPERVISOR_CONTEXT_ID
&&
293 dg
->dst
.resource
== VMCI_EVENT_HANDLER
) {
294 result
= vmci_event_dispatch(dg
);
296 result
= vmci_datagram_invoke_guest_handler(dg
);
298 if (result
< VMCI_SUCCESS
)
299 dev_dbg(vmci_dev
->dev
,
300 "Datagram with resource (ID=0x%x) failed (err=%d)\n",
301 dg
->dst
.resource
, result
);
303 /* On to the next datagram. */
304 dg
= (struct vmci_datagram
*)((u8
*)dg
+
307 size_t bytes_to_skip
;
310 * Datagram doesn't fit in datagram buffer of maximal
313 dev_dbg(vmci_dev
->dev
,
314 "Failed to receive datagram (size=%u bytes)\n",
317 bytes_to_skip
= dg_in_size
- remaining_bytes
;
318 if (current_dg_in_buffer_size
!= dg_in_buffer_size
)
319 current_dg_in_buffer_size
= dg_in_buffer_size
;
322 ioread8_rep(vmci_dev
->iobase
+
324 vmci_dev
->data_buffer
,
325 current_dg_in_buffer_size
);
326 if (bytes_to_skip
<= current_dg_in_buffer_size
)
329 bytes_to_skip
-= current_dg_in_buffer_size
;
331 dg
= (struct vmci_datagram
*)(dg_in_buffer
+
336 (size_t) (dg_in_buffer
+ current_dg_in_buffer_size
-
339 if (remaining_bytes
< VMCI_DG_HEADERSIZE
) {
340 /* Get the next batch of datagrams. */
342 ioread8_rep(vmci_dev
->iobase
+ VMCI_DATA_IN_ADDR
,
343 vmci_dev
->data_buffer
,
344 current_dg_in_buffer_size
);
345 dg
= (struct vmci_datagram
*)dg_in_buffer
;
346 remaining_bytes
= current_dg_in_buffer_size
;
352 * Scans the notification bitmap for raised flags, clears them
353 * and handles the notifications.
355 static void vmci_process_bitmap(unsigned long data
)
357 struct vmci_guest_device
*dev
= (struct vmci_guest_device
*)data
;
359 if (!dev
->notification_bitmap
) {
360 dev_dbg(dev
->dev
, "No bitmap present in %s\n", __func__
);
364 vmci_dbell_scan_notification_entries(dev
->notification_bitmap
);
368 * Interrupt handler for legacy or MSI interrupt, or for first MSI-X
369 * interrupt (vector VMCI_INTR_DATAGRAM).
371 static irqreturn_t
vmci_interrupt(int irq
, void *_dev
)
373 struct vmci_guest_device
*dev
= _dev
;
376 * If we are using MSI-X with exclusive vectors then we simply schedule
377 * the datagram tasklet, since we know the interrupt was meant for us.
378 * Otherwise we must read the ICR to determine what to do.
381 if (dev
->exclusive_vectors
) {
382 tasklet_schedule(&dev
->datagram_tasklet
);
386 /* Acknowledge interrupt and determine what needs doing. */
387 icr
= ioread32(dev
->iobase
+ VMCI_ICR_ADDR
);
388 if (icr
== 0 || icr
== ~0)
391 if (icr
& VMCI_ICR_DATAGRAM
) {
392 tasklet_schedule(&dev
->datagram_tasklet
);
393 icr
&= ~VMCI_ICR_DATAGRAM
;
396 if (icr
& VMCI_ICR_NOTIFICATION
) {
397 tasklet_schedule(&dev
->bm_tasklet
);
398 icr
&= ~VMCI_ICR_NOTIFICATION
;
403 "Ignoring unknown interrupt cause (%d)\n",
411 * Interrupt handler for MSI-X interrupt vector VMCI_INTR_NOTIFICATION,
412 * which is for the notification bitmap. Will only get called if we are
413 * using MSI-X with exclusive vectors.
415 static irqreturn_t
vmci_interrupt_bm(int irq
, void *_dev
)
417 struct vmci_guest_device
*dev
= _dev
;
419 /* For MSI-X we can just assume it was meant for us. */
420 tasklet_schedule(&dev
->bm_tasklet
);
426 * Most of the initialization at module load time is done here.
428 static int vmci_guest_probe_device(struct pci_dev
*pdev
,
429 const struct pci_device_id
*id
)
431 struct vmci_guest_device
*vmci_dev
;
432 void __iomem
*iobase
;
433 unsigned int capabilities
;
434 unsigned int caps_in_use
;
439 dev_dbg(&pdev
->dev
, "Probing for vmci/PCI guest device\n");
441 error
= pcim_enable_device(pdev
);
444 "Failed to enable VMCI device: %d\n", error
);
448 error
= pcim_iomap_regions(pdev
, 1 << 0, KBUILD_MODNAME
);
450 dev_err(&pdev
->dev
, "Failed to reserve/map IO regions\n");
454 iobase
= pcim_iomap_table(pdev
)[0];
456 dev_info(&pdev
->dev
, "Found VMCI PCI device at %#lx, irq %u\n",
457 (unsigned long)iobase
, pdev
->irq
);
459 vmci_dev
= devm_kzalloc(&pdev
->dev
, sizeof(*vmci_dev
), GFP_KERNEL
);
462 "Can't allocate memory for VMCI device\n");
466 vmci_dev
->dev
= &pdev
->dev
;
467 vmci_dev
->exclusive_vectors
= false;
468 vmci_dev
->iobase
= iobase
;
470 tasklet_init(&vmci_dev
->datagram_tasklet
,
471 vmci_dispatch_dgs
, (unsigned long)vmci_dev
);
472 tasklet_init(&vmci_dev
->bm_tasklet
,
473 vmci_process_bitmap
, (unsigned long)vmci_dev
);
475 vmci_dev
->data_buffer
= vmalloc(VMCI_MAX_DG_SIZE
);
476 if (!vmci_dev
->data_buffer
) {
478 "Can't allocate memory for datagram buffer\n");
482 pci_set_master(pdev
); /* To enable queue_pair functionality. */
485 * Verify that the VMCI Device supports the capabilities that
486 * we need. If the device is missing capabilities that we would
487 * like to use, check for fallback capabilities and use those
488 * instead (so we can run a new VM on old hosts). Fail the load if
489 * a required capability is missing and there is no fallback.
491 * Right now, we need datagrams. There are no fallbacks.
493 capabilities
= ioread32(vmci_dev
->iobase
+ VMCI_CAPS_ADDR
);
494 if (!(capabilities
& VMCI_CAPS_DATAGRAM
)) {
495 dev_err(&pdev
->dev
, "Device does not support datagrams\n");
497 goto err_free_data_buffer
;
499 caps_in_use
= VMCI_CAPS_DATAGRAM
;
502 * Use 64-bit PPNs if the device supports.
504 * There is no check for the return value of dma_set_mask_and_coherent
505 * since this driver can handle the default mask values if
506 * dma_set_mask_and_coherent fails.
508 if (capabilities
& VMCI_CAPS_PPN64
) {
509 dma_set_mask_and_coherent(&pdev
->dev
, DMA_BIT_MASK(64));
511 caps_in_use
|= VMCI_CAPS_PPN64
;
513 dma_set_mask_and_coherent(&pdev
->dev
, DMA_BIT_MASK(44));
518 * If the hardware supports notifications, we will use that as
521 if (capabilities
& VMCI_CAPS_NOTIFICATIONS
) {
522 vmci_dev
->notification_bitmap
= dma_alloc_coherent(
523 &pdev
->dev
, PAGE_SIZE
, &vmci_dev
->notification_base
,
525 if (!vmci_dev
->notification_bitmap
) {
527 "Unable to allocate notification bitmap\n");
529 memset(vmci_dev
->notification_bitmap
, 0, PAGE_SIZE
);
530 caps_in_use
|= VMCI_CAPS_NOTIFICATIONS
;
534 dev_info(&pdev
->dev
, "Using capabilities 0x%x\n", caps_in_use
);
536 /* Let the host know which capabilities we intend to use. */
537 iowrite32(caps_in_use
, vmci_dev
->iobase
+ VMCI_CAPS_ADDR
);
539 /* Set up global device so that we can start sending datagrams */
540 spin_lock_irq(&vmci_dev_spinlock
);
541 vmci_dev_g
= vmci_dev
;
543 spin_unlock_irq(&vmci_dev_spinlock
);
546 * Register notification bitmap with device if that capability is
549 if (caps_in_use
& VMCI_CAPS_NOTIFICATIONS
) {
550 unsigned long bitmap_ppn
=
551 vmci_dev
->notification_base
>> PAGE_SHIFT
;
552 if (!vmci_dbell_register_notification_bitmap(bitmap_ppn
)) {
554 "VMCI device unable to register notification bitmap with PPN 0x%lx\n",
557 goto err_remove_vmci_dev_g
;
561 /* Check host capabilities. */
562 error
= vmci_check_host_caps(pdev
);
564 goto err_remove_bitmap
;
569 * We subscribe to the VMCI_EVENT_CTX_ID_UPDATE here so we can
570 * update the internal context id when needed.
572 vmci_err
= vmci_event_subscribe(VMCI_EVENT_CTX_ID_UPDATE
,
573 vmci_guest_cid_update
, NULL
,
575 if (vmci_err
< VMCI_SUCCESS
)
577 "Failed to subscribe to event (type=%d): %d\n",
578 VMCI_EVENT_CTX_ID_UPDATE
, vmci_err
);
581 * Enable interrupts. Try MSI-X first, then MSI, and then fallback on
584 error
= pci_alloc_irq_vectors(pdev
, VMCI_MAX_INTRS
, VMCI_MAX_INTRS
,
587 error
= pci_alloc_irq_vectors(pdev
, 1, 1,
588 PCI_IRQ_MSIX
| PCI_IRQ_MSI
| PCI_IRQ_LEGACY
);
590 goto err_remove_bitmap
;
592 vmci_dev
->exclusive_vectors
= true;
596 * Request IRQ for legacy or MSI interrupts, or for first
599 error
= request_irq(pci_irq_vector(pdev
, 0), vmci_interrupt
,
600 IRQF_SHARED
, KBUILD_MODNAME
, vmci_dev
);
602 dev_err(&pdev
->dev
, "Irq %u in use: %d\n",
603 pci_irq_vector(pdev
, 0), error
);
604 goto err_disable_msi
;
608 * For MSI-X with exclusive vectors we need to request an
609 * interrupt for each vector so that we get a separate
610 * interrupt handler routine. This allows us to distinguish
611 * between the vectors.
613 if (vmci_dev
->exclusive_vectors
) {
614 error
= request_irq(pci_irq_vector(pdev
, 1),
615 vmci_interrupt_bm
, 0, KBUILD_MODNAME
,
619 "Failed to allocate irq %u: %d\n",
620 pci_irq_vector(pdev
, 1), error
);
625 dev_dbg(&pdev
->dev
, "Registered device\n");
627 atomic_inc(&vmci_num_guest_devices
);
629 /* Enable specific interrupt bits. */
630 cmd
= VMCI_IMR_DATAGRAM
;
631 if (caps_in_use
& VMCI_CAPS_NOTIFICATIONS
)
632 cmd
|= VMCI_IMR_NOTIFICATION
;
633 iowrite32(cmd
, vmci_dev
->iobase
+ VMCI_IMR_ADDR
);
635 /* Enable interrupts. */
636 iowrite32(VMCI_CONTROL_INT_ENABLE
,
637 vmci_dev
->iobase
+ VMCI_CONTROL_ADDR
);
639 pci_set_drvdata(pdev
, vmci_dev
);
643 free_irq(pci_irq_vector(pdev
, 0), vmci_dev
);
644 tasklet_kill(&vmci_dev
->datagram_tasklet
);
645 tasklet_kill(&vmci_dev
->bm_tasklet
);
648 pci_free_irq_vectors(pdev
);
650 vmci_err
= vmci_event_unsubscribe(ctx_update_sub_id
);
651 if (vmci_err
< VMCI_SUCCESS
)
653 "Failed to unsubscribe from event (type=%d) with subscriber (ID=0x%x): %d\n",
654 VMCI_EVENT_CTX_ID_UPDATE
, ctx_update_sub_id
, vmci_err
);
657 if (vmci_dev
->notification_bitmap
) {
658 iowrite32(VMCI_CONTROL_RESET
,
659 vmci_dev
->iobase
+ VMCI_CONTROL_ADDR
);
660 dma_free_coherent(&pdev
->dev
, PAGE_SIZE
,
661 vmci_dev
->notification_bitmap
,
662 vmci_dev
->notification_base
);
665 err_remove_vmci_dev_g
:
666 spin_lock_irq(&vmci_dev_spinlock
);
669 spin_unlock_irq(&vmci_dev_spinlock
);
671 err_free_data_buffer
:
672 vfree(vmci_dev
->data_buffer
);
674 /* The rest are managed resources and will be freed by PCI core */
678 static void vmci_guest_remove_device(struct pci_dev
*pdev
)
680 struct vmci_guest_device
*vmci_dev
= pci_get_drvdata(pdev
);
683 dev_dbg(&pdev
->dev
, "Removing device\n");
685 atomic_dec(&vmci_num_guest_devices
);
687 vmci_qp_guest_endpoints_exit();
689 vmci_err
= vmci_event_unsubscribe(ctx_update_sub_id
);
690 if (vmci_err
< VMCI_SUCCESS
)
692 "Failed to unsubscribe from event (type=%d) with subscriber (ID=0x%x): %d\n",
693 VMCI_EVENT_CTX_ID_UPDATE
, ctx_update_sub_id
, vmci_err
);
695 spin_lock_irq(&vmci_dev_spinlock
);
698 spin_unlock_irq(&vmci_dev_spinlock
);
700 dev_dbg(&pdev
->dev
, "Resetting vmci device\n");
701 iowrite32(VMCI_CONTROL_RESET
, vmci_dev
->iobase
+ VMCI_CONTROL_ADDR
);
704 * Free IRQ and then disable MSI/MSI-X as appropriate. For
705 * MSI-X, we might have multiple vectors, each with their own
706 * IRQ, which we must free too.
708 if (vmci_dev
->exclusive_vectors
)
709 free_irq(pci_irq_vector(pdev
, 1), vmci_dev
);
710 free_irq(pci_irq_vector(pdev
, 0), vmci_dev
);
711 pci_free_irq_vectors(pdev
);
713 tasklet_kill(&vmci_dev
->datagram_tasklet
);
714 tasklet_kill(&vmci_dev
->bm_tasklet
);
716 if (vmci_dev
->notification_bitmap
) {
718 * The device reset above cleared the bitmap state of the
719 * device, so we can safely free it here.
722 dma_free_coherent(&pdev
->dev
, PAGE_SIZE
,
723 vmci_dev
->notification_bitmap
,
724 vmci_dev
->notification_base
);
727 vfree(vmci_dev
->data_buffer
);
729 /* The rest are managed resources and will be freed by PCI core */
732 static const struct pci_device_id vmci_ids
[] = {
733 { PCI_DEVICE(PCI_VENDOR_ID_VMWARE
, PCI_DEVICE_ID_VMWARE_VMCI
), },
736 MODULE_DEVICE_TABLE(pci
, vmci_ids
);
738 static struct pci_driver vmci_guest_driver
= {
739 .name
= KBUILD_MODNAME
,
740 .id_table
= vmci_ids
,
741 .probe
= vmci_guest_probe_device
,
742 .remove
= vmci_guest_remove_device
,
745 int __init
vmci_guest_init(void)
747 return pci_register_driver(&vmci_guest_driver
);
750 void __exit
vmci_guest_exit(void)
752 pci_unregister_driver(&vmci_guest_driver
);