From 5b6fdc96fc1d9e7f6a00895cd6918930025b30f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 2 Nov 2015 14:06:27 +0100 Subject: [PATCH] vbox: disable rdtsc VM exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trapping rdtsc creates a huge load in some guests, e.g. Windows 8.1, that use this instruction very frequently. This influences audio playback/recording in a bad way (distorted sounds, …). As a interim solution disable the virtualization of rdtsc completely. As long as each guest VM runs on its own CPU core it should be fine as there should not be that much interference (TSC warping). That being said, TSC offsetting as well as adjusting within vbox have to be evaluated. Fixes #1768. --- repos/ports/src/virtualbox/spec/nova/vcpu_vmx.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/repos/ports/src/virtualbox/spec/nova/vcpu_vmx.h b/repos/ports/src/virtualbox/spec/nova/vcpu_vmx.h index ea89700a8..47f272525 100644 --- a/repos/ports/src/virtualbox/spec/nova/vcpu_vmx.h +++ b/repos/ports/src/virtualbox/spec/nova/vcpu_vmx.h @@ -63,10 +63,13 @@ class Vcpu_handler_vmx : public Vcpu_handler */ VMX_VMCS_CTRL_PROC_EXEC_CR8_LOAD_EXIT | VMX_VMCS_CTRL_PROC_EXEC_CR8_STORE_EXIT | - VMX_VMCS_CTRL_PROC_EXEC_RDPMC_EXIT | + VMX_VMCS_CTRL_PROC_EXEC_RDPMC_EXIT; /* VMX_VMCS_CTRL_PROC_EXEC_PAUSE_EXIT | */ - /* we don't support tsc offsetting for now - so let the rdtsc exit */ - VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT; + /* + * Disable trapping RDTSC for now as it creates a huge load with + * VM guests that execute it frequently. + */ + // VMX_VMCS_CTRL_PROC_EXEC_RDTSC_EXIT; next_utcb.ctrl[1] = VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC | VMX_VMCS_CTRL_PROC_EXEC2_WBINVD_EXIT |