Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2793144rdb; Mon, 12 Feb 2024 17:48:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMWlSvXp4CnL45B4WFEGgMwDTmul0O182b40ibHtsEx4dAGDPUEKcX294f/SwL5yerydSl X-Received: by 2002:a05:620a:2449:b0:785:bd25:e5f9 with SMTP id h9-20020a05620a244900b00785bd25e5f9mr9729643qkn.57.1707788883994; Mon, 12 Feb 2024 17:48:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707788883; cv=pass; d=google.com; s=arc-20160816; b=AesGo4hhUqO0Sq8CUFf8lBW4on9U+6aQKmtgGG2UizViwfrrbT3AwRpfNap0Dxs2e8 8tIWLBVMRceec8+1otROapLBZCT0yakGrlCz0hYaRdb9kBWd0WbTbbpzMmGLom3Llyy7 UUKBB6P6M2Mjtg2XWKmBh+Y3/lNE7m6BeVYFvQWYONtSQ+Ae1lmTwBY4gwZT07JDctja CgmoITGMYqxy03BSUemDYM2p/VIwJwrTjOKZOaDnHIR+Z8jjMJdzA+KbR7QDYAz3RFCE TSUY0a5DKbypvqL5ZLaN78h7mwzi3Fm9+XjCaUE7IKoHnIzIx1QzygRDvPOCdAOnz0Up 3lTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=THEPuEw8ADiKdsDMLAjp8tkK7u2E9622esj7bciSi8s=; fh=dX/z/rVyOd18HkW0FcsjpawwP3+KiG/pYOsTPvoMbbo=; b=oe13ukw5G9aX0w8WuQJLr9uJpSUZqBumDgp5BcYG26C6rSK8JAca/wV9Szuvr6vZ2p GeAhlDKVcGvqojwS7xYvDFH8ApKHKLQJkvcb3c3wv/nSwzRL7Q2ASoD+JeDA2hxhIAip mki/ePju6sDAXd69FKQapR7Resvo3kBytFFTvO4yJeK43yTZKeIrmCICA4dt2eWd4tyz WRIA1J8JYtSy5F4/nU0lHQS4SWz9NNdWO6yasfe/Qy6Z9vqLAaoqwlXOJnUcPLpMRuGp ORlhN/Bl0gsuWk42/1U9qMcsDHYjERYOcyNr1lKqONWvYbsPqpc+ZUbFVv+eDNV2kuIw smPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E2la5CqQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-62859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUjkjavPi2JodzAvHSlEgWhpcgJoo7J4HSxtev0JPoSKdK8nLc0tWzo9WGM0OHql7+0SIrxVwYJKBlYy8HjlPtftHYu0I2SBHmFnW8dnw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e20-20020a05620a209400b007858e39cb76si6978680qka.589.2024.02.12.17.48.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 17:48:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E2la5CqQ; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-62859-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BE8081C2570F for ; Tue, 13 Feb 2024 01:48:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AF84F4E7; Tue, 13 Feb 2024 01:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E2la5CqQ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59AA6E543 for ; Tue, 13 Feb 2024 01:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707787453; cv=none; b=preF6XDsg5o/8bp8sRmOHAa5XuQziUPsBX+DFUPmQ6EwB3ub8BAAokDVZMcs0AIAw5WUDDG3nQ5JZWQtySxhCcMThYeXva7KDqN+UPjE8/QtcS8QwO6F030fuFUeXPQ1WbulEa7GrmULU/LBEOzU+XhYozZI1JA7C3nMSqXlM9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707787453; c=relaxed/simple; bh=sRF+gCs4sH/iPmHfvzjt9ga8h2QTVOthUP9QuuyfsdA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=aEe3B89grs6RpuNmowqbaeuS323FayRgaSXpV0tC8q6ZdxkeXfbVY3tgVaUaavf1MbaxWDytOu3muixKc6KnUSUjFIMy4xCZ/f2NxDiURd03q+QG0rj3x2ziaqC7ItjXeFo1pazuJHaPOrRwZuQ08EawVs+HC1WWE6DvGnAlHFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=E2la5CqQ; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707787451; x=1739323451; h=date:from:to:cc:subject:message-id:mime-version; bh=sRF+gCs4sH/iPmHfvzjt9ga8h2QTVOthUP9QuuyfsdA=; b=E2la5CqQXWAvFn4TyU9003/SURrojmGXXmCYaDL8DvUqbl76AUfWmhFX a/fGf5ndzOhm37LGFh/HiTg0xOkiDZ1HD6ItXDvLEgJ+B0PIg6yuipDfP gyZHjO+ZmQhLinLKfl0qDaLPzx5Feuc+9r9HFlll68VkHg80qMNFKqf3x Nki38FfIiO2wvjZkgGZjEqdFYGCBKE2CPPMPFrI69fkUJKDQxtIgpg36G usrO0jpEsl0JeiH9OcxZxk8QAHAoHJLrjFEAYynTW9WbrzLpbrzh6KroP jmZVazHyw/74qyxJNxfFWAJLA2xxRvgGy/2PhuPPXR1u/KhwJPzLNBx1h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="24255821" X-IronPort-AV: E=Sophos;i="6.06,155,1705392000"; d="scan'208";a="24255821" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 17:24:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,155,1705392000"; d="scan'208";a="2730754" Received: from lkp-server01.sh.intel.com (HELO 01f0647817ea) ([10.239.97.150]) by fmviesa009.fm.intel.com with ESMTP; 12 Feb 2024 17:24:09 -0800 Received: from kbuild by 01f0647817ea with local (Exim 4.96) (envelope-from ) id 1rZhWo-0007RW-1N; Tue, 13 Feb 2024 01:24:06 +0000 Date: Tue, 13 Feb 2024 09:23:56 +0800 From: kernel test robot To: Ashish Kalra Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, x86@kernel.org, "Borislav Petkov (AMD)" , Michael Roth Subject: [tip:x86/sev 22/33] drivers/crypto/ccp/sev-dev.c:1672: undefined reference to `amd_iommu_snp_disable' Message-ID: <202402130940.IHNXTMSN-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/sev head: 45ba5b3c0a02949a4da74ead6e11c43e9b88bdca commit: f366a8dac1b8fef28a470d4e67b9843ebb8e2a1f [22/33] iommu/amd: Clean up RMP entries for IOMMU pages during SNP shutdown config: x86_64-randconfig-072-20240212 (https://download.01.org/0day-ci/archive/20240213/202402130940.IHNXTMSN-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240213/202402130940.IHNXTMSN-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202402130940.IHNXTMSN-lkp@intel.com/ All errors (new ones prefixed by >>): ld: drivers/crypto/ccp/sev-dev.o: in function `__sev_snp_shutdown_locked': >> drivers/crypto/ccp/sev-dev.c:1672: undefined reference to `amd_iommu_snp_disable' vim +1672 drivers/crypto/ccp/sev-dev.c 1626 1627 static int __sev_snp_shutdown_locked(int *error) 1628 { 1629 struct sev_device *sev = psp_master->sev_data; 1630 struct sev_data_snp_shutdown_ex data; 1631 int ret; 1632 1633 if (!sev->snp_initialized) 1634 return 0; 1635 1636 memset(&data, 0, sizeof(data)); 1637 data.len = sizeof(data); 1638 data.iommu_snp_shutdown = 1; 1639 1640 wbinvd_on_all_cpus(); 1641 1642 ret = __sev_do_cmd_locked(SEV_CMD_SNP_SHUTDOWN_EX, &data, error); 1643 /* SHUTDOWN may require DF_FLUSH */ 1644 if (*error == SEV_RET_DFFLUSH_REQUIRED) { 1645 ret = __sev_do_cmd_locked(SEV_CMD_SNP_DF_FLUSH, NULL, NULL); 1646 if (ret) { 1647 dev_err(sev->dev, "SEV-SNP DF_FLUSH failed\n"); 1648 return ret; 1649 } 1650 /* reissue the shutdown command */ 1651 ret = __sev_do_cmd_locked(SEV_CMD_SNP_SHUTDOWN_EX, &data, 1652 error); 1653 } 1654 if (ret) { 1655 dev_err(sev->dev, "SEV-SNP firmware shutdown failed\n"); 1656 return ret; 1657 } 1658 1659 /* 1660 * SNP_SHUTDOWN_EX with IOMMU_SNP_SHUTDOWN set to 1 disables SNP 1661 * enforcement by the IOMMU and also transitions all pages 1662 * associated with the IOMMU to the Reclaim state. 1663 * Firmware was transitioning the IOMMU pages to Hypervisor state 1664 * before version 1.53. But, accounting for the number of assigned 1665 * 4kB pages in a 2M page was done incorrectly by not transitioning 1666 * to the Reclaim state. This resulted in RMP #PF when later accessing 1667 * the 2M page containing those pages during kexec boot. Hence, the 1668 * firmware now transitions these pages to Reclaim state and hypervisor 1669 * needs to transition these pages to shared state. SNP Firmware 1670 * version 1.53 and above are needed for kexec boot. 1671 */ > 1672 ret = amd_iommu_snp_disable(); 1673 if (ret) { 1674 dev_err(sev->dev, "SNP IOMMU shutdown failed\n"); 1675 return ret; 1676 } 1677 1678 sev->snp_initialized = false; 1679 dev_dbg(sev->dev, "SEV-SNP firmware shutdown\n"); 1680 1681 return ret; 1682 } 1683 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki