nbd: force read-only export for read-only devices
[qemu/opensuse.git] / target-i386 / hyperv.h
blobbacb1d43738df00e141c6a1cfaba5142e6015d7b
1 /*
2 * QEMU Hyper-V support
4 * Copyright Red Hat, Inc. 2011
6 * Author: Vadim Rozenfeld <vrozenfe@redhat.com>
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.
13 #ifndef QEMU_HW_HYPERV_H
14 #define QEMU_HW_HYPERV_H 1
16 #include "qemu-common.h"
17 #ifdef CONFIG_KVM
18 #include <asm/hyperv.h>
19 #endif
21 #ifndef HYPERV_SPINLOCK_NEVER_RETRY
22 #define HYPERV_SPINLOCK_NEVER_RETRY 0xFFFFFFFF
23 #endif
25 #ifndef KVM_CPUID_SIGNATURE_NEXT
26 #define KVM_CPUID_SIGNATURE_NEXT 0x40000100
27 #endif
29 #if !defined(CONFIG_USER_ONLY) && defined(CONFIG_KVM)
30 void hyperv_enable_vapic_recommended(bool val);
31 void hyperv_enable_relaxed_timing(bool val);
32 void hyperv_set_spinlock_retries(int val);
33 #else
34 static inline void hyperv_enable_vapic_recommended(bool val) { }
35 static inline void hyperv_enable_relaxed_timing(bool val) { }
36 static inline void hyperv_set_spinlock_retries(int val) { }
37 #endif
39 bool hyperv_enabled(void);
40 bool hyperv_hypercall_available(void);
41 bool hyperv_vapic_recommended(void);
42 bool hyperv_relaxed_timing_enabled(void);
43 int hyperv_get_spinlock_retries(void);
45 #endif /* QEMU_HW_HYPERV_H */