Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jun Miao <jun.miao@intel.com>,
	kirill.shutemov@linux.intel.com, dave.hansen@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev, jun.miao@intel.com,
	x86@kernel.org, linux-coco@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/tdx: Optimize try_accept_memory() to reduce 1GB page accepted failed times
Date: Wed, 10 Jan 2024 07:47:11 +0800	[thread overview]
Message-ID: <202401100747.8LTktRbX-lkp@intel.com> (raw)
In-Reply-To: <20240109054824.9023-1-jun.miao@intel.com>

Hi Jun,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/x86/tdx]
[also build test WARNING on next-20240109]
[cannot apply to linus/master v6.7]
[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/Jun-Miao/x86-tdx-Optimize-try_accept_memory-to-reduce-1GB-page-accepted-failed-times/20240109-134908
base:   tip/x86/tdx
patch link:    https://lore.kernel.org/r/20240109054824.9023-1-jun.miao%40intel.com
patch subject: [PATCH] x86/tdx: Optimize try_accept_memory() to reduce 1GB page accepted failed times
config: x86_64-rhel-8.3-bpf (https://download.01.org/0day-ci/archive/20240110/202401100747.8LTktRbX-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240110/202401100747.8LTktRbX-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401100747.8LTktRbX-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/coco/tdx/tdx-shared.c: In function 'tdx_accept_memory':
>> arch/x86/coco/tdx/tdx-shared.c:62:17: warning: "/*" within comment [-Wcomment]
      62 |                 /* The 4KB page case or accept 2MB page failed case. */
         |                  


vim +62 arch/x86/coco/tdx/tdx-shared.c

    40	
    41	bool tdx_accept_memory(phys_addr_t start, phys_addr_t end)
    42	{
    43		/*
    44		 * For shared->private conversion, accept the page using
    45		 * TDG_MEM_PAGE_ACCEPT TDX module call.
    46		 */
    47		while (start < end) {
    48			unsigned long len = end - start;
    49			unsigned long accept_size;
    50	
    51			/*
    52			 * Try larger accepts first. It gives chance to VMM to keep
    53			 * 1G/2M Secure EPT entries where possible and speeds up
    54			 * process by cutting number of hypercalls (if successful).
    55			 * Since per current TDX spec, only support for adding 4KB or
    56			 * 2MB page dynamically.
    57			 * /
    58	
    59			if (IS_ALIGNED(start, PMD_SIZE) && len >= PMD_SIZE)
    60				accept_size = try_accept_one(start, len, PG_LEVEL_2M);
    61	
  > 62			/* The 4KB page case or accept 2MB page failed case. */
    63			if (!accept_size)
    64				accept_size = try_accept_one(start, len, PG_LEVEL_4K);
    65			if (!accept_size)
    66				return false;
    67			start += accept_size;
    68		}
    69	
    70		return true;
    71	}
    72	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2024-01-09 23:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09  5:48 [PATCH] x86/tdx: Optimize try_accept_memory() to reduce 1GB page accepted failed times Jun Miao
2024-01-09 11:40 ` kirill.shutemov
2024-01-09 23:05 ` kernel test robot
2024-01-09 23:47 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202401100747.8LTktRbX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jun.miao@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).