Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbbGFAqT (ORCPT ); Sun, 5 Jul 2015 20:46:19 -0400 Received: from mga02.intel.com ([134.134.136.20]:59425 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbbGFAqL (ORCPT ); Sun, 5 Jul 2015 20:46:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,412,1432623600"; d="scan'208";a="741114670" Message-ID: <5599CFCF.7070301@intel.com> Date: Mon, 06 Jul 2015 08:46:07 +0800 From: "Chen, Tiejun" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paolo Bonzini , kvm@vger.kernel.org CC: linux-kernel@vger.kernel.org, Gleb Natapov Subject: Re: [[PATCH 2/2] kvm: enable preemption to register/unregister preempt notifier References: <1435913788-4300-1-git-send-email-tiejun.chen@intel.com> <1435913788-4300-2-git-send-email-tiejun.chen@intel.com> <559670B3.2000705@redhat.com> In-Reply-To: <559670B3.2000705@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 30 On 2015/7/3 19:23, Paolo Bonzini wrote: > On 03/07/2015 10:56, Tiejun Chen wrote: >> After commit 1cde2930e154 ("sched/preempt: Add static_key() to >> preempt_notifiers") is introduced, preempt_notifier_{register, unregister} >> always hold a mutex, jump_label_mutex. So in current case this shouldn't >> work further under the circumstance of disabled preemption, and its also >> safe since we're just handling a per-vcpu stuff with holding vcpu->mutex. >> Otherwise, some warning messages are posted like this, >> >> BUG: scheduling while atomic: qemu-system-x86/17177/0x00000002 >> 2 locks held by qemu-system-x86/17177: >> #0: (&vcpu->mutex){+.+.+.}, at: [] vcpu_load+0x28/0xf0 [kvm] >> #1: (jump_label_mutex){+.+.+.}, at: [] static_key_slow_inc+0xc4/0x140 >> Modules linked in: x86_pkg_temp_thermal kvm_intel kvm >> Preemption disabled at:[] kvm_vcpu_ioctl+0x7e/0xeb0 [kvm] > > Thanks for your work Tiejun. However, the original patch is crap. I've > asked to revert it. > Yeah, its better to revert that commit since finally this also trigger a bug 100671: vmwrite error in vmx_vcpu_run. Thanks Tiejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/