vmbus.c (c2c014f24c10f90d85126ac5fbd4d8524de32b1c) | vmbus.c (bd50262f705c4fed70ea94d16a0f19b5f5497cf2) |
---|---|
1/*- 2 * Copyright (c) 2009-2012,2016-2017 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 32 unchanged lines hidden (view full) --- 41#include <sys/mutex.h> 42#include <sys/smp.h> 43#include <sys/sysctl.h> 44#include <sys/systm.h> 45#include <sys/taskqueue.h> 46 47#include <machine/bus.h> 48#include <machine/intr_machdep.h> | 1/*- 2 * Copyright (c) 2009-2012,2016-2017 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 32 unchanged lines hidden (view full) --- 41#include <sys/mutex.h> 42#include <sys/smp.h> 43#include <sys/sysctl.h> 44#include <sys/systm.h> 45#include <sys/taskqueue.h> 46 47#include <machine/bus.h> 48#include <machine/intr_machdep.h> |
49#include <machine/md_var.h> |
|
49#include <machine/resource.h> 50#include <x86/include/apicvar.h> 51 52#include <contrib/dev/acpica/include/acpi.h> 53#include <dev/acpica/acpivar.h> 54 55#include <dev/hyperv/include/hyperv.h> 56#include <dev/hyperv/include/vmbus_xact.h> --- 73 unchanged lines hidden (view full) --- 130 131SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 132 "Hyper-V vmbus"); 133 134static int vmbus_pin_evttask = 1; 135SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, 136 &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); 137 | 50#include <machine/resource.h> 51#include <x86/include/apicvar.h> 52 53#include <contrib/dev/acpica/include/acpi.h> 54#include <dev/acpica/acpivar.h> 55 56#include <dev/hyperv/include/hyperv.h> 57#include <dev/hyperv/include/vmbus_xact.h> --- 73 unchanged lines hidden (view full) --- 131 132SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 133 "Hyper-V vmbus"); 134 135static int vmbus_pin_evttask = 1; 136SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, 137 &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); 138 |
138extern inthand_t IDTVEC(vmbus_isr); | 139extern inthand_t IDTVEC(vmbus_isr), IDTVEC(vmbus_isr_pti); |
139 140static const uint32_t vmbus_version[] = { 141 VMBUS_VERSION_WIN8_1, 142 VMBUS_VERSION_WIN8, 143 VMBUS_VERSION_WIN7, 144 VMBUS_VERSION_WS2008 145}; 146 --- 789 unchanged lines hidden (view full) --- 936 TASK_INIT(VMBUS_PCPU_PTR(sc, message_task, cpu), 0, 937 vmbus_msg_task, sc); 938 } 939 940 /* 941 * All Hyper-V ISR required resources are setup, now let's find a 942 * free IDT vector for Hyper-V ISR and set it up. 943 */ | 140 141static const uint32_t vmbus_version[] = { 142 VMBUS_VERSION_WIN8_1, 143 VMBUS_VERSION_WIN8, 144 VMBUS_VERSION_WIN7, 145 VMBUS_VERSION_WS2008 146}; 147 --- 789 unchanged lines hidden (view full) --- 937 TASK_INIT(VMBUS_PCPU_PTR(sc, message_task, cpu), 0, 938 vmbus_msg_task, sc); 939 } 940 941 /* 942 * All Hyper-V ISR required resources are setup, now let's find a 943 * free IDT vector for Hyper-V ISR and set it up. 944 */ |
944 sc->vmbus_idtvec = lapic_ipi_alloc(IDTVEC(vmbus_isr)); | 945 sc->vmbus_idtvec = lapic_ipi_alloc(pti ? IDTVEC(vmbus_isr_pti) : 946 IDTVEC(vmbus_isr)); |
945 if (sc->vmbus_idtvec < 0) { 946 device_printf(sc->vmbus_dev, "cannot find free IDT vector\n"); 947 return ENXIO; 948 } 949 if (bootverbose) { 950 device_printf(sc->vmbus_dev, "vmbus IDT vector %d\n", 951 sc->vmbus_idtvec); 952 } --- 599 unchanged lines hidden --- | 947 if (sc->vmbus_idtvec < 0) { 948 device_printf(sc->vmbus_dev, "cannot find free IDT vector\n"); 949 return ENXIO; 950 } 951 if (bootverbose) { 952 device_printf(sc->vmbus_dev, "vmbus IDT vector %d\n", 953 sc->vmbus_idtvec); 954 } --- 599 unchanged lines hidden --- |