1298022Ssephe/*-
2298022Ssephe * Copyright (c) 2016 Microsoft Corp.
3298022Ssephe * All rights reserved.
4298022Ssephe *
5298022Ssephe * Redistribution and use in source and binary forms, with or without
6298022Ssephe * modification, are permitted provided that the following conditions
7298022Ssephe * are met:
8298022Ssephe * 1. Redistributions of source code must retain the above copyright
9298022Ssephe *    notice unmodified, this list of conditions, and the following
10298022Ssephe *    disclaimer.
11298022Ssephe * 2. Redistributions in binary form must reproduce the above copyright
12298022Ssephe *    notice, this list of conditions and the following disclaimer in the
13298022Ssephe *    documentation and/or other materials provided with the distribution.
14298022Ssephe *
15298022Ssephe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16298022Ssephe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17298022Ssephe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18298022Ssephe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19298022Ssephe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20298022Ssephe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21298022Ssephe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22298022Ssephe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23298022Ssephe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24298022Ssephe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25298022Ssephe *
26298022Ssephe * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/i386/vmbus_vector.S 329462 2018-02-17 18:00:01Z kib $
27298022Ssephe */
28298022Ssephe
29298022Ssephe#include <machine/asmacros.h>
30298022Ssephe#include <machine/specialreg.h>
31298022Ssephe
32298022Ssephe#include "assym.s"
33298022Ssephe
34298022Ssephe/*
35298022Ssephe * This is the Hyper-V vmbus channel direct callback interrupt.
36298022Ssephe * Only used when it is running on Hyper-V.
37298022Ssephe */
38301017Ssephe	.text
39301017Ssephe	SUPERALIGN_TEXT
40329462SkibIDTVEC(vmbus_isr_pti)
41301015SsepheIDTVEC(vmbus_isr)
42301017Ssephe	PUSH_FRAME
43301017Ssephe	SET_KERNEL_SREGS
44301017Ssephe	cld
45301017Ssephe	FAKE_MCOUNT(TF_EIP(%esp))
46301017Ssephe	pushl	%esp
47301017Ssephe	call	vmbus_handle_intr
48301017Ssephe	add	$4, %esp
49301017Ssephe	MEXITCOUNT
50301017Ssephe	jmp	doreti
51