From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voqvo-0002XS-J9 for qemu-devel@nongnu.org; Fri, 06 Dec 2013 03:38:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Voqvf-0006Vb-9l for qemu-devel@nongnu.org; Fri, 06 Dec 2013 03:38:40 -0500 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:33423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voqve-0006Uw-QM for qemu-devel@nongnu.org; Fri, 06 Dec 2013 03:38:31 -0500 Message-ID: <1386319104.20542.1.camel@nexus> From: Fernando Luis =?ISO-8859-1?Q?V=E1zquez?= Cao Date: Fri, 06 Dec 2013 17:38:24 +0900 In-Reply-To: <1386318781.20106.3.camel@nexus> References: <1386054500.25757.10.camel@nexus> <529D90A6.2080801@lab.ntt.co.jp> <52A0186A.2050207@lab.ntt.co.jp> <1386224104.3091.3.camel@nexus> <52A04732.4040105@redhat.com> <52A07C5A.9090105@lab.ntt.co.jp> <52A08541.6090702@redhat.com> <52A09EF4.5080800@lab.ntt.co.jp> <20131205161707.GB17277@amt.cnet> <52A0AC09.4090202@redhat.com> <52A189B2.4060305@lab.ntt.co.jp> <1386318781.20106.3.camel@nexus> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] target-i386: do not special case TSC writeback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Gleb Natapov , Will Auld , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Newer kernels are capable of synchronizing TSC values of multiple VCPUs on writeback, but we were excluding the power up case, which is not needed anymore. Signed-off-by: Fernando Luis Vazquez Cao --- diff -urNp qemu-orig/target-i386/kvm.c qemu/target-i386/kvm.c --- qemu-orig/target-i386/kvm.c 2013-12-06 16:12:03.201953736 +0900 +++ qemu/target-i386/kvm.c 2013-12-06 16:13:53.897955184 +0900 @@ -1144,15 +1144,7 @@ static int kvm_put_msrs(X86CPU *cpu, int * for normal writeback. Limit them to reset or full state updates. */ if (level >= KVM_PUT_RESET_STATE) { - /* - * KVM is yet unable to synchronize TSC values of multiple VCPUs on - * writeback. Until this is fixed, we only write the offset to SMP - * guests after migration, desynchronizing the VCPUs, but avoiding - * huge jump-backs that would occur without any writeback at all. - */ - if (smp_cpus == 1 || env->tsc != 0 || level == KVM_PUT_RESET_STATE) { - kvm_msr_entry_set(&msrs[n++], MSR_IA32_TSC, env->tsc); - } + kvm_msr_entry_set(&msrs[n++], MSR_IA32_TSC, env->tsc); kvm_msr_entry_set(&msrs[n++], MSR_KVM_SYSTEM_TIME, env->system_time_msr); kvm_msr_entry_set(&msrs[n++], MSR_KVM_WALL_CLOCK, env->wall_clock_msr);