Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1229605rwb; Thu, 22 Sep 2022 11:56:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vuHTymHNYAj3x0fRox9M0sPFJ4LMDe1dq/dWARl9qtqMhGwochOaq2zIM8HiiRcjtMGBK X-Received: by 2002:aa7:c707:0:b0:44e:5193:1b0f with SMTP id i7-20020aa7c707000000b0044e51931b0fmr4782888edq.238.1663872971080; Thu, 22 Sep 2022 11:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663872971; cv=none; d=google.com; s=arc-20160816; b=yv23GJBW9cwtudJIVb428nNmsh8wAEbAI0OsgE8rBwsVoVMedp8ieWn37jTgU0XUvi MBKE0D3DWkWSM3Xdegs34u0GdrthdHRn94K/tC5XBiDDYsyH1HPfR8cv2sOkMKnRl+fS 6o/nsu7ZrtWP8bAYU8DY6npG1OpiIjHdX60/rnQaAGDNB0sIei9NY221BdkSnZwBv/X8 U1L5NGQkPe228qCgrctLRYHmR0aXB39c7UWcVxZj3nSHenPn9tNIiJIzafmbFTmYTZgY yCAY7GuB454sNlUE710x0H1YegnyOKeU0miEONXjOolpNKJreEy24AcEO8yz2o6UOOBq IbEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fDrOkU2oA9S+Kf/UHShKshsuHssHZqpSkLjswZFZlPU=; b=SwRngw7Qg8eYZ5m61W5u6MJrSOmnZWpigR5UAYJxtd7nvtzhBq6shQ16epzzHPa972 15T1nw+DEH8Ic3LUdtqeEwK6C7kt0bJCOFNYB20fFYLfKPRFLEL1/6CVG0GYFMFEISG+ 9hXNkE7Jt3K0ju1TDd8969SlVNnRgMFKNAy3V7QhECgDf7ZrzxtQR7MKQG1Rx+9rEEXR pm/ys5DgwLxykOgTslxAX/zAqYVZqLS3y252Z13giGREzQkfG67MvtqH806o4q7H/zW+ gUyL464hviBr8Hd5oAlzNWQE2dGovL3Rz9WE8ZFbwSd3MZJAIfLfj9B6CXzPzpSEw0Vg 017Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qcb3NpWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a170906974b00b0078239e3f85esi4772341ejy.314.2022.09.22.11.55.45; Thu, 22 Sep 2022 11:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qcb3NpWR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbiIVSVp (ORCPT + 99 others); Thu, 22 Sep 2022 14:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiIVSVY (ORCPT ); Thu, 22 Sep 2022 14:21:24 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A092A10AB0E; Thu, 22 Sep 2022 11:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663870883; x=1695406883; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xXzjDD2RfWE2U6k2WEiDMxRTTvA39oD3cMMwgQ6GMXc=; b=Qcb3NpWRyQhVgVDcss/itiY2oDFtFWNy+TL2azb/hpTbET0/xln/K1PU mXhPSjOfqugQ7/+0d14jiEFZKdY18k2YD2V7OBlWTOTx9r1yh3MqJ4Ngm tgkvSJZWOMmqCyQt2EB14E/SMx7DK57OQmkmwCeNDkYDhTUQA5wcNmXIE lhmUgc2B7Bu9V4NjapUuS5n2YlykKbB5bXzYrOe2JlSs2OPgwoUtAMrOV WDb/3iFRteWHrsGtQx8pDC1wVxPFpKBQbsSwN3QqnEhKFmYzyg9DQ3fqE oxFwqHVheZNx2REGGKEft3JaO/00Ly1yKzjx9r8FFvFg7BlNFBWTugxtY Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="386675950" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="386675950" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 11:21:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="653086658" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 11:21:15 -0700 From: isaku.yamahata@intel.com To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Thomas Gleixner , Marc Zyngier , Will Deacon Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Kai Huang , Chao Gao , Atish Patra , Shaokun Zhang , Daniel Lezcano , Huang Ying , Huacai Chen , Dave Hansen , Borislav Petkov Subject: [PATCH v5 05/30] KVM: Provide more information in kernel log if hardware enabling fails Date: Thu, 22 Sep 2022 11:20:34 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Isaku Yamahata Provide the name of the calling function to hardware_enable_nolock() and include it in the error message to provide additional information on exactly what path failed. Opportunistically bump the pr_info() to pr_warn(), failure to enable virtualization support is warn-worthy as _something_ is wrong with the system. Suggested-by: Chao Gao Signed-off-by: Isaku Yamahata --- virt/kvm/kvm_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4243a9541543..4f19c47aab1c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -5006,7 +5006,8 @@ static void hardware_enable_nolock(void *junk) if (r) { cpumask_clear_cpu(cpu, cpus_hardware_enabled); atomic_inc(&hardware_enable_failed); - pr_info("kvm: enabling virtualization on CPU%d failed\n", cpu); + pr_warn("kvm: enabling virtualization on CPU%d failed during %pSb\n", + cpu, __builtin_return_address(0)); } } -- 2.25.1