Re: [PATCH v4 6/7] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI

From: kbuild test robot
Date: Mon Mar 05 2018 - 19:42:52 EST


Hi Jan,

I love your patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on v4.16-rc4 next-20180305]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Jan-Kiszka/jailhouse-Enhance-secondary-Jailhouse-guest-support-wrt-PCI/20180306-070138
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-randconfig-x079-201809 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

arch/x86/kernel/cpu/amd.c: In function 'init_amd_gh':
>> arch/x86/kernel/cpu/amd.c:722:3: error: implicit declaration of function 'check_enable_amd_mmconf_dmi' [-Werror=implicit-function-declaration]
check_enable_amd_mmconf_dmi();
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/amd.c:724:2: error: implicit declaration of function 'fam10h_check_enable_mmcfg' [-Werror=implicit-function-declaration]
fam10h_check_enable_mmcfg();
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/check_enable_amd_mmconf_dmi +722 arch/x86/kernel/cpu/amd.c

0d96b9ff7 Yinghai Lu 2009-08-29 716
26bfa5f89 Borislav Petkov 2014-06-24 717 static void init_amd_gh(struct cpuinfo_x86 *c)
26bfa5f89 Borislav Petkov 2014-06-24 718 {
377b0048c Jan Kiszka 2018-03-04 719 #ifdef CONFIG_MMCONF_FAM10H
26bfa5f89 Borislav Petkov 2014-06-24 720 /* do this for boot cpu */
26bfa5f89 Borislav Petkov 2014-06-24 721 if (c == &boot_cpu_data)
26bfa5f89 Borislav Petkov 2014-06-24 @722 check_enable_amd_mmconf_dmi();
26bfa5f89 Borislav Petkov 2014-06-24 723
26bfa5f89 Borislav Petkov 2014-06-24 @724 fam10h_check_enable_mmcfg();
26bfa5f89 Borislav Petkov 2014-06-24 725 #endif
6c62aa4a3 Yinghai Lu 2008-09-07 726
6c62aa4a3 Yinghai Lu 2008-09-07 727 /*
26bfa5f89 Borislav Petkov 2014-06-24 728 * Disable GART TLB Walk Errors on Fam10h. We do this here because this
26bfa5f89 Borislav Petkov 2014-06-24 729 * is always needed when GART is enabled, even in a kernel which has no
26bfa5f89 Borislav Petkov 2014-06-24 730 * MCE support built in. BIOS should disable GartTlbWlk Errors already.
26bfa5f89 Borislav Petkov 2014-06-24 731 * If it doesn't, we do it here as suggested by the BKDG.
26bfa5f89 Borislav Petkov 2014-06-24 732 *
26bfa5f89 Borislav Petkov 2014-06-24 733 * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012
6c62aa4a3 Yinghai Lu 2008-09-07 734 */
26bfa5f89 Borislav Petkov 2014-06-24 735 msr_set_bit(MSR_AMD64_MCx_MASK(4), 10);
6c62aa4a3 Yinghai Lu 2008-09-07 736
26bfa5f89 Borislav Petkov 2014-06-24 737 /*
26bfa5f89 Borislav Petkov 2014-06-24 738 * On family 10h BIOS may not have properly enabled WC+ support, causing
26bfa5f89 Borislav Petkov 2014-06-24 739 * it to be converted to CD memtype. This may result in performance
26bfa5f89 Borislav Petkov 2014-06-24 740 * degradation for certain nested-paging guests. Prevent this conversion
26bfa5f89 Borislav Petkov 2014-06-24 741 * by clearing bit 24 in MSR_AMD64_BU_CFG2.
26bfa5f89 Borislav Petkov 2014-06-24 742 *
26bfa5f89 Borislav Petkov 2014-06-24 743 * NOTE: we want to use the _safe accessors so as not to #GP kvm
26bfa5f89 Borislav Petkov 2014-06-24 744 * guests on older kvm hosts.
26bfa5f89 Borislav Petkov 2014-06-24 745 */
26bfa5f89 Borislav Petkov 2014-06-24 746 msr_clear_bit(MSR_AMD64_BU_CFG2, 24);
11fdd252b Yinghai Lu 2008-09-07 747
26bfa5f89 Borislav Petkov 2014-06-24 748 if (cpu_has_amd_erratum(c, amd_erratum_383))
26bfa5f89 Borislav Petkov 2014-06-24 749 set_cpu_bug(c, X86_BUG_AMD_TLB_MMATCH);
11fdd252b Yinghai Lu 2008-09-07 750 }
11fdd252b Yinghai Lu 2008-09-07 751

:::::: The code at line 722 was first introduced by commit
:::::: 26bfa5f89486a8926cd4d4ca81a04d3f0f174934 x86, amd: Cleanup init_amd

:::::: TO: Borislav Petkov <bp@xxxxxxx>
:::::: CC: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip