Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F81970723
D8410.id21877.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8410.id21877.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8410: hyperv/vmbus: add a new method to get vcpu_id
Attached
Detach File
Event Timeline
Log In to Comment