summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/VMMAll/GIMAll.cpp
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2014-06-18 11:06:06 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2014-06-18 11:06:06 +0000
commit1a228472bb32bb176bb600091defd7754e77db66 (patch)
treec7f4af2dee8efd4ac933955f6b0d5804e95a84e9 /src/VBox/VMM/VMMAll/GIMAll.cpp
parente357bfc80052e3a34063729e7273a23fcc749278 (diff)
downloadVirtualBox-svn-1a228472bb32bb176bb600091defd7754e77db66.tar.gz
VMM/GIM: More bits for Hyper-V implementation.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@51643 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/VMM/VMMAll/GIMAll.cpp')
-rw-r--r--src/VBox/VMM/VMMAll/GIMAll.cpp46
1 files changed, 12 insertions, 34 deletions
diff --git a/src/VBox/VMM/VMMAll/GIMAll.cpp b/src/VBox/VMM/VMMAll/GIMAll.cpp
index 9d36babe738..c43d53d2cb7 100644
--- a/src/VBox/VMM/VMMAll/GIMAll.cpp
+++ b/src/VBox/VMM/VMMAll/GIMAll.cpp
@@ -44,6 +44,18 @@ VMMDECL(bool) GIMIsEnabled(PVM pVM)
/**
+ * Gets the GIM provider configured for this VM.
+ *
+ * @returns The GIM provider Id.
+ * @param pVM Pointer to the VM.
+ */
+VMMDECL(GIMPROVIDERID) GIMGetProvider(PVM pVM)
+{
+ return pVM->gim.s.enmProviderId;
+}
+
+
+/**
* Implements a GIM hypercall with the provider configured for the VM.
*
* @returns VBox status code.
@@ -67,40 +79,6 @@ VMM_INT_DECL(int) GIMHypercall(PVMCPU pVCpu, PCPUMCTX pCtx)
}
}
-
-/**
- * Updates the paravirtualized TSC supported by the GIM provider.
- *
- * @returns VBox status code.
- * @retval VINF_SUCCESS if the paravirt. TSC is setup and in use.
- * @retval VERR_GIM_NOT_ENABLED if no GIM provider is configured for this VM.
- * @retval VERR_GIM_PVTSC_NOT_AVAILABLE if the GIM provider does not support any
- * paravirt. TSC.
- * @retval VERR_GIM_PVTSC_NOT_IN_USE if the GIM provider supports paravirt. TSC
- * but the guest isn't currently using it.
- *
- * @param pVM Pointer to the VM.
- * @param u64Offset The computed TSC offset.
- *
- * @thread EMT(pVCpu)
- */
-VMMDECL(int) GIMUpdateParavirtTsc(PVM pVM, uint64_t u64Offset)
-{
- if (!pVM->gim.s.fEnabled)
- return VERR_GIM_NOT_ENABLED;
-
- switch (pVM->gim.s.enmProviderId)
- {
- case GIMPROVIDERID_HYPERV:
- return GIMHvUpdateParavirtTsc(pVM, u64Offset);
-
- default:
- break;
- }
- return VERR_GIM_PVTSC_NOT_AVAILABLE;
-}
-
-
VMMDECL(bool) GIMIsParavirtTscEnabled(PVM pVM)
{
if (!pVM->gim.s.fEnabled)