xref: /freebsd/sys/dev/hyperv/vmbus/vmbus_if.m (revision 031beb4e239bfce798af17f5fe8dba8bcaf13d99)
138d19df6SSepherosa Ziehau#-
238d19df6SSepherosa Ziehau# Copyright (c) 2016 Microsoft Corp.
338d19df6SSepherosa Ziehau# All rights reserved.
438d19df6SSepherosa Ziehau#
538d19df6SSepherosa Ziehau# Redistribution and use in source and binary forms, with or without
638d19df6SSepherosa Ziehau# modification, are permitted provided that the following conditions
738d19df6SSepherosa Ziehau# are met:
838d19df6SSepherosa Ziehau# 1. Redistributions of source code must retain the above copyright
938d19df6SSepherosa Ziehau#    notice unmodified, this list of conditions, and the following
1038d19df6SSepherosa Ziehau#    disclaimer.
1138d19df6SSepherosa Ziehau# 2. Redistributions in binary form must reproduce the above copyright
1238d19df6SSepherosa Ziehau#    notice, this list of conditions and the following disclaimer in the
1338d19df6SSepherosa Ziehau#    documentation and/or other materials provided with the distribution.
1438d19df6SSepherosa Ziehau#
1538d19df6SSepherosa Ziehau# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1638d19df6SSepherosa Ziehau# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1738d19df6SSepherosa Ziehau# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1838d19df6SSepherosa Ziehau# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1938d19df6SSepherosa Ziehau# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2038d19df6SSepherosa Ziehau# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2138d19df6SSepherosa Ziehau# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2238d19df6SSepherosa Ziehau# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2338d19df6SSepherosa Ziehau# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2438d19df6SSepherosa Ziehau# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2538d19df6SSepherosa Ziehau#
2638d19df6SSepherosa Ziehau#
2738d19df6SSepherosa Ziehau
2838d19df6SSepherosa Ziehau#include <sys/param.h>
2938d19df6SSepherosa Ziehau#include <sys/bus.h>
3038d19df6SSepherosa Ziehau
3138d19df6SSepherosa ZiehauINTERFACE vmbus;
3238d19df6SSepherosa Ziehau
33884d26c8SSepherosa ZiehauHEADER {
3471ac1309SSepherosa Ziehau	struct hyperv_guid;
35*b5c7e241SSepherosa Ziehau	struct taskqueue;
36884d26c8SSepherosa Ziehau};
37884d26c8SSepherosa Ziehau
3838d19df6SSepherosa ZiehauMETHOD uint32_t get_version {
3938d19df6SSepherosa Ziehau	device_t bus;
4038d19df6SSepherosa Ziehau	device_t dev;
4138d19df6SSepherosa Ziehau};
42884d26c8SSepherosa Ziehau
43884d26c8SSepherosa ZiehauMETHOD int probe_guid {
44884d26c8SSepherosa Ziehau	device_t bus;
45884d26c8SSepherosa Ziehau	device_t dev;
4671ac1309SSepherosa Ziehau	const struct hyperv_guid *guid;
47884d26c8SSepherosa Ziehau};
48c8b32f71SDexuan Cui
49c8b32f71SDexuan CuiMETHOD uint32_t get_vcpu_id {
50c8b32f71SDexuan Cui	device_t bus;
51c8b32f71SDexuan Cui	device_t dev;
52c8b32f71SDexuan Cui	int cpu;
53c8b32f71SDexuan Cui};
54*b5c7e241SSepherosa Ziehau
55*b5c7e241SSepherosa ZiehauMETHOD struct taskqueue * get_event_taskq {
56*b5c7e241SSepherosa Ziehau	device_t bus;
57*b5c7e241SSepherosa Ziehau	device_t dev;
58*b5c7e241SSepherosa Ziehau	int cpu;
59*b5c7e241SSepherosa Ziehau};
60