Deleted Added
full compact
33c33
< __FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_hv.c 256425 2013-10-13 02:41:30Z gibbs $");
---
> __FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_hv.c 282212 2015-04-29 10:12:34Z whu $");
70,71d69
< .signal_event_param = NULL,
< .signal_event_buffer = NULL,
259,280d256
< /*
< * Setup the global signal event param for the signal event hypercall
< */
< hv_vmbus_g_context.signal_event_buffer =
< malloc(sizeof(hv_vmbus_input_signal_event_buffer), M_DEVBUF,
< M_ZERO | M_NOWAIT);
< KASSERT(hv_vmbus_g_context.signal_event_buffer != NULL,
< ("Error VMBUS: Failed to allocate signal_event_buffer\n"));
< if (hv_vmbus_g_context.signal_event_buffer == NULL)
< goto cleanup;
<
< hv_vmbus_g_context.signal_event_param =
< (hv_vmbus_input_signal_event*)
< (HV_ALIGN_UP((unsigned long)
< hv_vmbus_g_context.signal_event_buffer,
< HV_HYPERCALL_PARAM_ALIGN));
< hv_vmbus_g_context.signal_event_param->connection_id.as_uint32_t = 0;
< hv_vmbus_g_context.signal_event_param->connection_id.u.id =
< HV_VMBUS_EVENT_CONNECTION_ID;
< hv_vmbus_g_context.signal_event_param->flag_number = 0;
< hv_vmbus_g_context.signal_event_param->rsvd_z = 0;
<
306,311d281
< if (hv_vmbus_g_context.signal_event_buffer != NULL) {
< free(hv_vmbus_g_context.signal_event_buffer, M_DEVBUF);
< hv_vmbus_g_context.signal_event_buffer = NULL;
< hv_vmbus_g_context.signal_event_param = NULL;
< }
<
373c343
< hv_vmbus_signal_event()
---
> hv_vmbus_signal_event(void *con_id)
379c349
< hv_vmbus_g_context.signal_event_param,
---
> con_id,
392a363
> uint64_t hv_vcpu_index;
406,415d376
< * KYS: Looks like we can only initialize on cpu0; don't we support
< * SMP guests?
< *
< * TODO: Need to add SMP support for FreeBSD V9
< */
<
< if (cpu != 0)
< return;
<
< /*
419d379
<
421,422c381,384
< hv_vmbus_g_context.syn_ic_msg_page[cpu] = setup_args->page_buffers[0];
< hv_vmbus_g_context.syn_ic_event_page[cpu] = setup_args->page_buffers[1];
---
> hv_vmbus_g_context.syn_ic_msg_page[cpu] =
> setup_args->page_buffers[2 * cpu];
> hv_vmbus_g_context.syn_ic_event_page[cpu] =
> setup_args->page_buffers[2 * cpu + 1];
445a408
> shared_sint.as_uint64_t = 0;
448c411
< shared_sint.u.auto_eoi = FALSE;
---
> shared_sint.u.auto_eoi = TRUE;
460a424,430
> /*
> * Set up the cpuid mapping from Hyper-V to FreeBSD.
> * The array is indexed using FreeBSD cpuid.
> */
> hv_vcpu_index = rdmsr(HV_X64_MSR_VP_INDEX);
> hv_vmbus_g_context.hv_vcpu_index[cpu] = (uint32_t)hv_vcpu_index;
>
472d441
< int cpu = PCPU_GET(cpuid);
477,479d445
< if (cpu != 0)
< return; /* TODO: XXXKYS: SMP? */
<