From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@bugzilla.kernel.org Subject: [Bug 116011] New: After hot plug vcpu, kvm_arch->use_master_clock will never be true. Date: Thu, 07 Apr 2016 07:42:14 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.136]:42898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509AbcDGHmS (ORCPT ); Thu, 7 Apr 2016 03:42:18 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDF662025A for ; Thu, 7 Apr 2016 07:42:16 +0000 (UTC) Received: from bugzilla2.web.kernel.org (bugzilla2.web.kernel.org [172.20.200.52]) by mail.kernel.org (Postfix) with ESMTP id D6430201D3 for ; Thu, 7 Apr 2016 07:42:14 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: https://bugzilla.kernel.org/show_bug.cgi?id=116011 Bug ID: 116011 Summary: After hot plug vcpu, kvm_arch->use_master_clock will never be true. Product: Virtualization Version: unspecified Kernel Version: 4.5 Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: kvm Assignee: virtualization_kvm@kernel-bugs.osdl.org Reporter: changlimin@h3c.com Regression: No 1. In function kvm_write_tsc, when tsc first matched, do kvm->arch.nr_vcpus_matched_tsc++; 2. In function pvclock_update_vm_gtod_copy, if vcpus_matched (also with other conditions meet), ka->use_master_clock will be true; 3. After hot plug vcpu, kvm_arch_vcpu_postcreate and Qemu will call kvm_write_tsc for the new vcpu. Because the tsc will not match, so do kvm->arch.nr_vcpus_matched_tsc = 0; 4. For other already existed vcpu will not call kvm_write_tsc, so will not do kvm->arch.nr_vcpus_matched_tsc++; 5. So vcpus_matched in function pvclock_update_vm_gtod_copy will be false forever, this cause ka->use_master_clock will never be true; -- You are receiving this mail because: You are watching the assignee of the bug.