drivers/hv: Move struct hv_timer_message_payload into UAPI Hyper-V x86 header
[deliverable/linux.git] / arch / x86 / kvm / hyperv.h
CommitLineData
e83d5887
AS
1/*
2 * KVM Microsoft Hyper-V emulation
3 *
4 * derived from arch/x86/kvm/x86.c
5 *
6 * Copyright (C) 2006 Qumranet, Inc.
7 * Copyright (C) 2008 Qumranet, Inc.
8 * Copyright IBM Corporation, 2008
9 * Copyright 2010 Red Hat, Inc. and/or its affiliates.
10 * Copyright (C) 2015 Andrey Smetanin <asmetanin@virtuozzo.com>
11 *
12 * Authors:
13 * Avi Kivity <avi@qumranet.com>
14 * Yaniv Kamay <yaniv@qumranet.com>
15 * Amit Shah <amit.shah@qumranet.com>
16 * Ben-Ami Yassour <benami@il.ibm.com>
17 * Andrey Smetanin <asmetanin@virtuozzo.com>
18 *
19 * This work is licensed under the terms of the GNU GPL, version 2. See
20 * the COPYING file in the top-level directory.
21 *
22 */
23
24#ifndef __ARCH_X86_KVM_HYPERV_H__
25#define __ARCH_X86_KVM_HYPERV_H__
26
e7d9513b 27int kvm_hv_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host);
e83d5887
AS
28int kvm_hv_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);
29bool kvm_hv_hypercall_enabled(struct kvm *kvm);
30int kvm_hv_hypercall(struct kvm_vcpu *vcpu);
31
5c919412
AS
32int kvm_hv_synic_set_irq(struct kvm *kvm, u32 vcpu_id, u32 sint);
33void kvm_hv_synic_send_eoi(struct kvm_vcpu *vcpu, int vector);
34
35static inline struct kvm_vcpu_hv_synic *vcpu_to_synic(struct kvm_vcpu *vcpu)
36{
37 return &vcpu->arch.hyperv.synic;
38}
39
40static inline struct kvm_vcpu *synic_to_vcpu(struct kvm_vcpu_hv_synic *synic)
41{
42 struct kvm_vcpu_hv *hv;
43 struct kvm_vcpu_arch *arch;
44
45 hv = container_of(synic, struct kvm_vcpu_hv, synic);
46 arch = container_of(hv, struct kvm_vcpu_arch, hyperv);
47 return container_of(arch, struct kvm_vcpu, arch);
48}
49void kvm_hv_irq_routing_update(struct kvm *kvm);
50
51void kvm_hv_vcpu_init(struct kvm_vcpu *vcpu);
52
53int kvm_hv_activate_synic(struct kvm_vcpu *vcpu);
54
e83d5887 55#endif
This page took 0.042152 seconds and 5 git commands to generate.