blob: bacb1d43738df00e141c6a1cfaba5142e6015d7b [file] [log] [blame]
Vadim Rozenfeld28f52cc2011-12-18 22:48:13 +02001/*
2 * QEMU Hyper-V support
3 *
4 * Copyright Red Hat, Inc. 2011
5 *
6 * Author: Vadim Rozenfeld <vrozenfe@redhat.com>
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
10 *
11 */
12
13#ifndef QEMU_HW_HYPERV_H
14#define QEMU_HW_HYPERV_H 1
15
16#include "qemu-common.h"
Blue Swirl61eb1f32012-01-23 19:59:14 +000017#ifdef CONFIG_KVM
Vadim Rozenfeld28f52cc2011-12-18 22:48:13 +020018#include <asm/hyperv.h>
Blue Swirl61eb1f32012-01-23 19:59:14 +000019#endif
Vadim Rozenfeld28f52cc2011-12-18 22:48:13 +020020
21#ifndef HYPERV_SPINLOCK_NEVER_RETRY
22#define HYPERV_SPINLOCK_NEVER_RETRY 0xFFFFFFFF
23#endif
24
25#ifndef KVM_CPUID_SIGNATURE_NEXT
26#define KVM_CPUID_SIGNATURE_NEXT 0x40000100
27#endif
28
Blue Swirl61eb1f32012-01-23 19:59:14 +000029#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_KVM)
Vadim Rozenfeld28f52cc2011-12-18 22:48:13 +020030void hyperv_enable_vapic_recommended(bool val);
31void hyperv_enable_relaxed_timing(bool val);
32void hyperv_set_spinlock_retries(int val);
33#else
34static inline void hyperv_enable_vapic_recommended(bool val) { }
35static inline void hyperv_enable_relaxed_timing(bool val) { }
36static inline void hyperv_set_spinlock_retries(int val) { }
37#endif
38
39bool hyperv_enabled(void);
40bool hyperv_hypercall_available(void);
41bool hyperv_vapic_recommended(void);
42bool hyperv_relaxed_timing_enabled(void);
43int hyperv_get_spinlock_retries(void);
44
45#endif /* QEMU_HW_HYPERV_H */