blob: 00c9b454bb075d9e276638c2dc4923e6a52c8307 [file] [log] [blame]
Andrey Smetanin50efe822015-11-10 15:52:43 +03001/*
2 * QEMU KVM Hyper-V support
3 *
4 * Copyright (C) 2015 Andrey Smetanin <asmetanin@virtuozzo.com>
5 *
6 * Authors:
7 * Andrey Smetanin <asmetanin@virtuozzo.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 *
12 */
13
Markus Armbruster121d0712016-06-29 10:12:57 +020014#ifndef TARGET_I386_HYPERV_H
15#define TARGET_I386_HYPERV_H
Andrey Smetanin50efe822015-11-10 15:52:43 +030016
17#include "cpu.h"
18#include "sysemu/kvm.h"
19#include "qemu/event_notifier.h"
20
21typedef struct HvSintRoute HvSintRoute;
22typedef void (*HvSintAckClb)(HvSintRoute *sint_route);
23
24struct HvSintRoute {
25 uint32_t sint;
Roman Kagan1b2013e2018-07-02 16:41:55 +030026 uint32_t vp_index;
Andrey Smetanin50efe822015-11-10 15:52:43 +030027 int gsi;
28 EventNotifier sint_set_notifier;
29 EventNotifier sint_ack_notifier;
30 HvSintAckClb sint_ack_clb;
31};
32
33int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit);
34
Roman Kagan1b2013e2018-07-02 16:41:55 +030035HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
Andrey Smetanin50efe822015-11-10 15:52:43 +030036 HvSintAckClb sint_ack_clb);
37
38void kvm_hv_sint_route_destroy(HvSintRoute *sint_route);
39
40int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route);
41
Roman Kagane9688fa2018-07-02 16:41:56 +030042uint32_t hyperv_vp_index(X86CPU *cpu);
43X86CPU *hyperv_find_vcpu(uint32_t vp_index);
44
Andrey Smetanin50efe822015-11-10 15:52:43 +030045#endif