Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1934034rdh; Tue, 26 Sep 2023 07:44:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5ZNfn9Gz8AzUU1d4E5CQZGT3eLM+1MTKVrhJoIb+NrUwWgLvjnwO+Y/61uVSkQd6VwqMM X-Received: by 2002:a17:90b:118c:b0:277:501c:4393 with SMTP id gk12-20020a17090b118c00b00277501c4393mr5015584pjb.27.1695739483242; Tue, 26 Sep 2023 07:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695739483; cv=none; d=google.com; s=arc-20160816; b=rfnNdfrg2xwmHCXEwC1HVv0e8Tn+xFLcjsJhdzlN0ZI7e9GH9iCDYJ/rTRbczEKqxE /rtMBjgAXvNeH4qWjPG3ZQcZ8KDKAfYD3ZKUbJeVSC+UpjTz7R33LN73oAIDHEIMjajV s5SpVrMVfMfRbhW8nRzbMYKO/a7aDugVIEeLmtmEmAG4t809qtyQAQ/PJukH5kQFOs8+ ViR77Z+JHqpQY/OZ7lELpJNJafpHk22cdI/tHh7yRkG0BX+05W1U3Y8kUWRjsQJ2aGml +yjOMgRdnlyXwIANrwuQYbT5Jqai3L4bdoCHpKcCpS4mAcvf7FARjqNaZfC6Rn/ZKBhP W19A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=keS2H7IN75ND+Ce0jUF/zlm2Pu+HVyn4gEBDrigXgxs=; fh=UnSRlMEUdfVg1BkNeTc0fPAXImWWVCmn9a5/D/tLxfo=; b=AL7ci0UPc9mfR/E6yEiqL7O5C3X3ohLCFwMXKMMVehrT6M2mOoqzlocpSigZHgw1es xjjPiuqyyteMLHfrvXr12YfuvszpiFtFeqoUkD17bid1LnoZ2GfDtWHoMyF16MiMwbAm fVvKRPBTnTgS3V9ALUMk3v2Da4Rz6zwsqTavLSSDRImb7LR87LE37tyOjXyiLMdw8/0U 2MwEtnl8twM0XOIpAlqFGdNJJkDpAkaxjweCnG9wRkWVdDLJ9zOmYCcZ9yI0PtO/O9FC VGuXoGym0t/a611/8ligY973wBtj93d8OXd8Zve2m0qGtHT8X4poxZZAxZ8WK0SZupZ7 vOpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m9ULxA4L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t2-20020a17090aba8200b00273ce975beesi12892648pjr.114.2023.09.26.07.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 07:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m9ULxA4L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A28B2818ABC0; Tue, 26 Sep 2023 05:03:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234522AbjIZMDY (ORCPT + 99 others); Tue, 26 Sep 2023 08:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234511AbjIZMDW (ORCPT ); Tue, 26 Sep 2023 08:03:22 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29FCDE6; Tue, 26 Sep 2023 05:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695729796; x=1727265796; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FU0AhVxXd739OYSha2yCrO+3VahEjA1ikBLDvuNth4E=; b=m9ULxA4LjFjcnMkL9UFpUEDO+Ddm54ykG8+764geq/0TgQouIp4x0vBH xy2Rk4qzhPfBYKu3a+0///za/4FvO292EN9Yisq0POvQGCag24QGKhuWA sjcYiw5O0kr9Rhr2ZsUSA+g2+aq84jNHkLj65Y8uk7TbzTevUZ6Gf9JM2 9siwmaEnqeYzkDGkbeJeVKZfzpeUXJ/tg9Ja0xWZB8TakeQb1OxEdTKwU aRlV9bzSm9UCYJtIRb1IppZJLHfw9CsA96nR/J1kBx/qxYtEUys7WYmdG EUPEkKyfNYLFtYZn2g5uJR/z1MCrfoPjc1XTocVlSYaPJKrakFB1ybqn+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="378827450" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="378827450" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 05:02:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="864381703" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="864381703" Received: from lkp-server02.sh.intel.com (HELO 32c80313467c) ([10.239.97.151]) by fmsmga002.fm.intel.com with ESMTP; 26 Sep 2023 05:02:32 -0700 Received: from kbuild by 32c80313467c with local (Exim 4.96) (envelope-from ) id 1ql6lq-0002mu-2F; Tue, 26 Sep 2023 12:02:30 +0000 Date: Tue, 26 Sep 2023 20:02:14 +0800 From: kernel test robot To: Zack Rusin , dri-devel@lists.freedesktop.org Cc: oe-kbuild-all@lists.linux.dev, Thomas =?iso-8859-1?Q?Hellstr=F6m?= , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Huang Rui , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH] drm/ttm: Make sure the mapped tt pages are decrypted when needed Message-ID: <202309261923.XeaDU2Wg-lkp@intel.com> References: <20230926040359.3040017-1-zack@kde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230926040359.3040017-1-zack@kde.org> 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 05:03:25 -0700 (PDT) Hi Zack, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.6-rc3 next-20230926] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Zack-Rusin/drm-ttm-Make-sure-the-mapped-tt-pages-are-decrypted-when-needed/20230926-120619 base: linus/master patch link: https://lore.kernel.org/r/20230926040359.3040017-1-zack%40kde.org patch subject: [PATCH] drm/ttm: Make sure the mapped tt pages are decrypted when needed config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20230926/202309261923.XeaDU2Wg-lkp@intel.com/config) compiler: mips-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309261923.XeaDU2Wg-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/202309261923.XeaDU2Wg-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/ttm/ttm_tt.c: In function 'ttm_tt_create': >> drivers/gpu/drm/ttm/ttm_tt.c:89:41: error: implicit declaration of function 'cc_platform_has' [-Werror=implicit-function-declaration] 89 | if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT)) | ^~~~~~~~~~~~~~~ >> drivers/gpu/drm/ttm/ttm_tt.c:89:57: error: 'CC_ATTR_MEM_ENCRYPT' undeclared (first use in this function) 89 | if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT)) | ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/ttm/ttm_tt.c:89:57: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors vim +/cc_platform_has +89 drivers/gpu/drm/ttm/ttm_tt.c 56 57 /* 58 * Allocates a ttm structure for the given BO. 59 */ 60 int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) 61 { 62 struct ttm_device *bdev = bo->bdev; 63 uint32_t page_flags = 0; 64 65 dma_resv_assert_held(bo->base.resv); 66 67 if (bo->ttm) 68 return 0; 69 70 switch (bo->type) { 71 case ttm_bo_type_device: 72 if (zero_alloc) 73 page_flags |= TTM_TT_FLAG_ZERO_ALLOC; 74 break; 75 case ttm_bo_type_kernel: 76 break; 77 case ttm_bo_type_sg: 78 page_flags |= TTM_TT_FLAG_EXTERNAL; 79 break; 80 default: 81 pr_err("Illegal buffer object type\n"); 82 return -EINVAL; 83 } 84 /* 85 * When using dma_alloc_coherent with memory encryption the 86 * mapped TT pages need to be decrypted or otherwise the drivers 87 * will end up sending encrypted mem to the gpu. 88 */ > 89 if (bdev->pool.use_dma_alloc && cc_platform_has(CC_ATTR_MEM_ENCRYPT)) 90 page_flags |= TTM_TT_FLAG_DECRYPTED; 91 92 bo->ttm = bdev->funcs->ttm_tt_create(bo, page_flags); 93 if (unlikely(bo->ttm == NULL)) 94 return -ENOMEM; 95 96 WARN_ON(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL_MAPPABLE && 97 !(bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL)); 98 99 return 0; 100 } 101 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki