Page MenuHomeFreeBSD

D8410.id21877.diff
No OneTemporary

D8410.id21877.diff

Index: sys/dev/hyperv/vmbus/vmbus.c
===================================================================
--- sys/dev/hyperv/vmbus/vmbus.c
+++ sys/dev/hyperv/vmbus/vmbus.c
@@ -77,6 +77,8 @@
static uint32_t vmbus_get_version_method(device_t, device_t);
static int vmbus_probe_guid_method(device_t, device_t,
const struct hyperv_guid *);
+static uint32_t vmbus_get_vcpu_id_method(device_t bus,
+ device_t dev, int cpu);
static int vmbus_init(struct vmbus_softc *);
static int vmbus_connect(struct vmbus_softc *, uint32_t);
@@ -135,6 +137,7 @@
/* Vmbus interface */
DEVMETHOD(vmbus_get_version, vmbus_get_version_method),
DEVMETHOD(vmbus_probe_guid, vmbus_probe_guid_method),
+ DEVMETHOD(vmbus_get_vcpu_id, vmbus_get_vcpu_id_method),
DEVMETHOD_END
};
@@ -990,6 +993,14 @@
return ENXIO;
}
+static uint32_t
+vmbus_get_vcpu_id_method(device_t bus, device_t dev, int cpu)
+{
+ const struct vmbus_channel *chan = vmbus_get_channel(dev);
+
+ return (VMBUS_PCPU_GET(chan->ch_vmbus, vcpuid, cpu));
+}
+
static int
vmbus_probe(device_t dev)
{
Index: sys/dev/hyperv/vmbus/vmbus_if.m
===================================================================
--- sys/dev/hyperv/vmbus/vmbus_if.m
+++ sys/dev/hyperv/vmbus/vmbus_if.m
@@ -45,3 +45,9 @@
device_t dev;
const struct hyperv_guid *guid;
};
+
+METHOD uint32_t get_vcpu_id {
+ device_t bus;
+ device_t dev;
+ int cpu;
+};

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 15, 8:50 PM (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9091968
Default Alt Text
D8410.id21877.diff (1 KB)

Event Timeline