diff options
| author | Anthony Liguori <anthony@codemonkey.ws> | 2013-08-20 09:51:53 -0500 |
|---|---|---|
| committer | Anthony Liguori <anthony@codemonkey.ws> | 2013-08-20 09:51:53 -0500 |
| commit | 237e4f92a81696e5359766a7f19a77a9ff1d02e5 (patch) | |
| tree | ae60a299d73e3f0742bf4238c3c379466510d7ad /target-i386/hyperv.c | |
| parent | bc02fb304c6cc0f1dd0809545d226df2d6f5c093 (diff) | |
| parent | 321bc0b2b27aa2dd64bf12e0e2a0f323a4903ecf (diff) | |
| download | focaccia-qemu-237e4f92a81696e5359766a7f19a77a9ff1d02e5.tar.gz focaccia-qemu-237e4f92a81696e5359766a7f19a77a9ff1d02e5.zip | |
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU * gdbstub coprocessor register count bugfix * QOM instance_post_init infrastructure to override dynamic properties * X86CPU HyperV preparations for CPU subclasses # gpg: Signature made Fri 16 Aug 2013 11:49:02 AM CDT using RSA key ID 3E7E013F # gpg: Can't check signature: public key not found # By Eduardo Habkost (3) and others # Via Andreas Färber * afaerber/tags/qom-cpu-for-anthony: cpus: Use cpu_is_stopped() efficiently target-i386: Move hyperv_* static globals to X86CPU qdev: Set globals in instance_post_init function qom: Introduce instance_post_init hook tests: Unit tests for qdev global properties handling gdbstub: Fix gdb_register_coprocessor() register counting
Diffstat (limited to 'target-i386/hyperv.c')
| -rw-r--r-- | target-i386/hyperv.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/target-i386/hyperv.c b/target-i386/hyperv.c deleted file mode 100644 index f284e99772..0000000000 --- a/target-i386/hyperv.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * QEMU Hyper-V support - * - * Copyright Red Hat, Inc. 2011 - * - * Author: Vadim Rozenfeld <vrozenfe@redhat.com> - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * - */ - -#include "hyperv.h" - -static bool hyperv_vapic; -static bool hyperv_relaxed_timing; -static int hyperv_spinlock_attempts = HYPERV_SPINLOCK_NEVER_RETRY; - -void hyperv_enable_vapic_recommended(bool val) -{ - hyperv_vapic = val; -} - -void hyperv_enable_relaxed_timing(bool val) -{ - hyperv_relaxed_timing = val; -} - -void hyperv_set_spinlock_retries(int val) -{ - hyperv_spinlock_attempts = val; - if (hyperv_spinlock_attempts < 0xFFF) { - hyperv_spinlock_attempts = 0xFFF; - } -} - -bool hyperv_enabled(void) -{ - return hyperv_hypercall_available() || hyperv_relaxed_timing_enabled(); -} - -bool hyperv_hypercall_available(void) -{ - if (hyperv_vapic || - (hyperv_spinlock_attempts != HYPERV_SPINLOCK_NEVER_RETRY)) { - return true; - } - return false; -} - -bool hyperv_vapic_recommended(void) -{ - return hyperv_vapic; -} - -bool hyperv_relaxed_timing_enabled(void) -{ - return hyperv_relaxed_timing; -} - -int hyperv_get_spinlock_retries(void) -{ - return hyperv_spinlock_attempts; -} |