root / target-i386 / hyperv.h @ 28f52cc0
History | View | Annotate | Download (1.1 kB)
1 |
/*
|
---|---|
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" |
17 |
#include <asm/hyperv.h> |
18 |
|
19 |
#ifndef HYPERV_SPINLOCK_NEVER_RETRY
|
20 |
#define HYPERV_SPINLOCK_NEVER_RETRY 0xFFFFFFFF |
21 |
#endif
|
22 |
|
23 |
#ifndef KVM_CPUID_SIGNATURE_NEXT
|
24 |
#define KVM_CPUID_SIGNATURE_NEXT 0x40000100 |
25 |
#endif
|
26 |
|
27 |
#ifndef CONFIG_USER_ONLY
|
28 |
void hyperv_enable_vapic_recommended(bool val); |
29 |
void hyperv_enable_relaxed_timing(bool val); |
30 |
void hyperv_set_spinlock_retries(int val); |
31 |
#else
|
32 |
static inline void hyperv_enable_vapic_recommended(bool val) { } |
33 |
static inline void hyperv_enable_relaxed_timing(bool val) { } |
34 |
static inline void hyperv_set_spinlock_retries(int val) { } |
35 |
#endif
|
36 |
|
37 |
bool hyperv_enabled(void); |
38 |
bool hyperv_hypercall_available(void); |
39 |
bool hyperv_vapic_recommended(void); |
40 |
bool hyperv_relaxed_timing_enabled(void); |
41 |
int hyperv_get_spinlock_retries(void); |
42 |
|
43 |
#endif /* QEMU_HW_HYPERV_H */ |