linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Juergen Gross <jgross@suse.com>,
	xen-devel@lists.xenproject.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Juergen Gross <jgross@suse.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v3 3/7] x86/xen: drop tests for highmem in pv code
Date: Fri, 7 Aug 2020 19:18:18 +0800	[thread overview]
Message-ID: <202008071923.cKhbPPhZ%lkp@intel.com> (raw)
In-Reply-To: <20200807083826.16794-4-jgross@suse.com>

[-- Attachment #1: Type: text/plain, Size: 6466 bytes --]

Hi Juergen,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tip/x86/core]
[also build test WARNING on tip/x86/asm v5.8 next-20200806]
[cannot apply to xen-tip/linux-next tip/x86/vdso]
[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]

url:    https://github.com/0day-ci/linux/commits/Juergen-Gross/Remove-32-bit-Xen-PV-guest-support/20200807-164058
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ef2ff0f5d6008d325c9a068e20981c0d0acc4d6b
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/x86/xen/enlighten_pv.c: In function 'set_aliased_prot':
>> arch/x86/xen/enlighten_pv.c:348:15: warning: variable 'page' set but not used [-Wunused-but-set-variable]
     348 |  struct page *page;
         |               ^~~~
   arch/x86/xen/enlighten_pv.c: At top level:
   arch/x86/xen/enlighten_pv.c:1198:34: warning: no previous prototype for 'xen_start_kernel' [-Wmissing-prototypes]
    1198 | asmlinkage __visible void __init xen_start_kernel(void)
         |                                  ^~~~~~~~~~~~~~~~

vim +/page +348 arch/x86/xen/enlighten_pv.c

e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  335  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  336  /*
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  337   * Set the page permissions for a particular virtual address.  If the
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  338   * address is a vmalloc mapping (or other non-linear mapping), then
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  339   * find the linear mapping of the page and also set its protections to
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  340   * match.
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  341   */
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  342  static void set_aliased_prot(void *v, pgprot_t prot)
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  343  {
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  344  	int level;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  345  	pte_t *ptep;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  346  	pte_t pte;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  347  	unsigned long pfn;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14 @348  	struct page *page;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  349  	unsigned char dummy;
64aef3716eab524 Juergen Gross     2020-08-07  350  	void *av;
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  351  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  352  	ptep = lookup_address((unsigned long)v, &level);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  353  	BUG_ON(ptep == NULL);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  354  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  355  	pfn = pte_pfn(*ptep);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  356  	page = pfn_to_page(pfn);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  357  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  358  	pte = pfn_pte(pfn, prot);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  359  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  360  	/*
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  361  	 * Careful: update_va_mapping() will fail if the virtual address
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  362  	 * we're poking isn't populated in the page tables.  We don't
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  363  	 * need to worry about the direct map (that's always in the page
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  364  	 * tables), but we need to be careful about vmap space.  In
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  365  	 * particular, the top level page table can lazily propagate
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  366  	 * entries between processes, so if we've switched mms since we
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  367  	 * vmapped the target in the first place, we might not have the
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  368  	 * top-level page table entry populated.
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  369  	 *
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  370  	 * We disable preemption because we want the same mm active when
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  371  	 * we probe the target and when we issue the hypercall.  We'll
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  372  	 * have the same nominal mm, but if we're a kernel thread, lazy
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  373  	 * mm dropping could change our pgd.
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  374  	 *
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  375  	 * Out of an abundance of caution, this uses __get_user() to fault
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  376  	 * in the target address just in case there's some obscure case
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  377  	 * in which the target address isn't readable.
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  378  	 */
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  379  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  380  	preempt_disable();
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  381  
fe557319aa06c23 Christoph Hellwig 2020-06-17  382  	copy_from_kernel_nofault(&dummy, v, 1);
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  383  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  384  	if (HYPERVISOR_update_va_mapping((unsigned long)v, pte, 0))
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  385  		BUG();
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  386  
64aef3716eab524 Juergen Gross     2020-08-07  387  	av = __va(PFN_PHYS(pfn));
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  388  
64aef3716eab524 Juergen Gross     2020-08-07  389  	if (av != v && HYPERVISOR_update_va_mapping((unsigned long)av, pte, 0))
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  390  		BUG();
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  391  
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  392  	preempt_enable();
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  393  }
e1dab14cf68d1e0 Vitaly Kuznetsov  2017-03-14  394  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75210 bytes --]

  reply	other threads:[~2020-08-07 12:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  8:38 [PATCH v3 0/7] Remove 32-bit Xen PV guest support Juergen Gross
2020-08-07  8:38 ` [PATCH v3 1/7] x86/xen: remove " Juergen Gross
2020-08-09  2:01   ` Boris Ostrovsky
2020-08-10  4:36     ` Jürgen Groß
2020-08-07  8:38 ` [PATCH v3 2/7] x86/xen: eliminate xen-asm_64.S Juergen Gross
2020-08-09  2:04   ` Boris Ostrovsky
2020-08-10  4:36     ` Jürgen Groß
2020-08-07  8:38 ` [PATCH v3 3/7] x86/xen: drop tests for highmem in pv code Juergen Gross
2020-08-07 11:18   ` kernel test robot [this message]
2020-08-09  2:22   ` Boris Ostrovsky
2020-08-10  4:37     ` Jürgen Groß
2020-08-07  8:38 ` [PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL Juergen Gross
2020-08-07  9:39   ` peterz
2020-08-07 10:02     ` Jürgen Groß
2020-08-07 10:21       ` peterz
2020-08-09  2:34   ` Boris Ostrovsky
2020-08-10  4:39     ` Jürgen Groß
2020-08-10 16:53       ` Boris Ostrovsky
2020-08-10 18:42         ` Jürgen Groß
2020-08-07  8:38 ` [PATCH v3 5/7] x86/paravirt: cleanup paravirt macros Juergen Gross
2020-08-07  8:38 ` [PATCH v3 6/7] x86/paravirt: use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT Juergen Gross
2020-08-07  8:38 ` [PATCH v3 7/7] x86/entry/32: revert "Fix XEN_PV build dependency" Juergen Gross

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=202008071923.cKhbPPhZ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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 NNTP newsgroup(s).