All of lore.kernel.org
 help / color / mirror / Atom feed
* CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
@ 2017-09-11 23:55 Konrad Rzeszutek Wilk
  2017-09-12  0:45 ` Boris Ostrovsky
  0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-11 23:55 UTC (permalink / raw)
  To: boris.ostrovsky, xen-devel; +Cc: julien.grall, sstabellini

Hey,

I've only been able to reproduce this on ARM64 (trying right now ARM32
as well), and not on x86.

If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
enable it and try to load a livepatch it blows up in page_alloc.c:738

This is with origin/staging (d0291f3391)

The test-case (livepatch_test.pl) is
http://xenbits.xen.org/gitweb/?p=xentesttools/bootstrap.git;a=blob;f=root_image/debugspace/livepatch_test.pl

The serial log:

oader use UART6
scsysstat_value[8].
clear reset source
last_keypoint0,reboot_type0
secdbg not DCU.
SecDbgVer exit

 xloader chipid is: 0x36600110, start at 481ms.
Build Date: Jun  1 2017, 16:54:45
[clock_init] ++
hi3660 [clk_setup]
[clock_init] --
storage type is UFS
ufs retry: 6 count v_tx:0 v_rx:0
ufs set v_tx:0 v_rx:0
Hikey960[5301] no need avs_init.
ddr ft:0xf20332a3,mode:1 target:4
UceLdOk
ch 0 gt_errfail, STATUS:0x00000060
ch 0 gdst_errfail, STATUS:0x00000040
ch 1 gt_errfail, STATUS:0x00000060
ch 1 gdst_errfail, STATUS:0x00000040
ch 2 gt_errfail, STATUS:0x00000060
ch 2 gdst_errfail, STATUS:0x00000040
ch 3 gt_errfail, STATUS:0x00000060
ch 3 gdst_errfail, STATUS:0x00000040
timeout
timeout
timeout
timeout
density: 0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000 
ddr info 0x00000306 
400M
685M
1067M
C0R,V0x0000002c e:113
C1R,V0x0000002d e:66
C2R,V0x0000002c e:66
C3R,V0x0000002d e:66
C0R,V0x0000002d e:66
C1R,V0x0000002e e:66
C2R,V0x0000002d e:66
C3R,V0x0000002e e:66
C0R,V0x0000002e e:66
C1R,V0x0000002f e:66
C2R,V0x0000002e e:66
C3R,V0x0000002f e:66
C0R,V0x0000002f e:66
C1R,V0x00000030 e:65
C2R,V0x0000002f e:65
C3R,V0x00000030 e:66
1244M
1866M
C0R,V0x00000015 e:66
C2R,V0x00000015 e:66
C0R,V0x00000016 e:66
C1R,V0x00000016 e:66
C2R,V0x00000016 e:66
C3R,V0x00000016 e:66
C0R,V0x00000017 e:66
C1R,V0x00000017 e:66
C2R,V0x00000017 e:66
C3R,V0x00000017 e:66
iomcu_subsys_init
boot_c0 PROFILE 4
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.4(release):v1.4-8-gca5ba394
NOTICE:  BL1: Built : 21:33:21, Jul 16 2017
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v1.4(release):v1.4-8-gca5ba394
NOTICE:  BL2: Built : 20:03:29, Jul 15 2017
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v1.4(release):v1.4-8-gca5ba394
NOTICE:  BL31: Built : 20:03:29, Jul 15 2017
UEFI firmware (version Alpha built at 20:02:58 on Jul 15 2017)
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0xBF251000
Loading DxeCore at 0x00BF250000 EntryPoint=0x00BF251000
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0xBF251000
HOBLIST address in DXE = 0xBF00D018
Memory Allocation 0x00000004 0xBFFE8000 - 0xBFFE8FFF
Memory Allocation 0x00000004 0xBFFE7000 - 0xBFFE7FFF
Memory Allocation 0x00000004 0xBFFE6000 - 0xBFFE6FFF
Memory Allocation 0x00000004 0xBFFE5000 - 0xBFFE5FFF
Memory Allocation 0x00000004 0xBFFE9000 - 0xBFFFFFFF
Memory Allocation 0x00000004 0xBFFD5000 - 0xBFFE4FFF
Memory Allocation 0x00000004 0xBF931000 - 0xBFFD4FFF
Memory Allocation 0x00000004 0xBF28D000 - 0xBF930FFF
Memory Allocation 0x00000004 0xBF250000 - 0xBF28CFFF
Memory Allocation 0x00000003 0xBF250000 - 0xBF28CFFF
FV Hob            0x1AC98000 - 0x1AD87FFF
FV Hob            0xBF28D000 - 0xBF92FD3F
FV2 Hob           0xBF28D000 - 0xBF92FD3F
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/PCD/Dxe/Pcd/DEBUG/PcdDxe.dll 0xBF192000
Loading driver at 0x000BF191000 EntryPoint=0x000BF192048 PcdDxe.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/DEBUG/ArmCpuDxe.dll 0xBF182000
Loading driver at 0x000BF181000 EntryPoint=0x000BF182048 ArmCpuDxe.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/DEBUG/RuntimeDxe.dll 0xBA190000
Loading driver at 0x000BA180000 EntryPoint=0x000BA190048 RuntimeDxe.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe/DEBUG/SecurityStubDxe.dll 0xBF172000
Loading driver at 0x000BF171000 EntryPoint=0x000BF172048 SecurityStubDxe.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter/DEBUG/EmbeddedMonotonicCounter.dll 0xBA0F0000
Loading driver at 0x000BA0E0000 EntryPoint=0x000BA0F0048 EmbeddedMonotonicCounter.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe/DEBUG/Reset.dll 0xBA050000
Loading driver at 0x000BA040000 EntryPoint=0x000BA050048 Reset.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe/DEBUG/RealTimeClock.dll 0xB9FB0000
Loading driver at 0x000B9FA0000 EntryPoint=0x000B9FB0048 RealTimeClock.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/EmbeddedPkg/MetronomeDxe/MetronomeDxe/DEBUG/MetronomeDxe.dll 0xBF16A000
Loading driver at 0x000BF169000 EntryPoint=0x000BF16A048 MetronomeDxe.efi
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/SerialDxe/SerialDxe/DEBUG/SerialDxe.dll 0xBF162000
Loading driver at 0x00......[Bds]Booting UEFI Shell
add-symbol-file /home/konrad/960/edk2/Build/HiKey960/DEBUG_GCC5/AARCH64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll 0xB9ACA000
Loading driver at 0x000B9AC9000 EntryPoint=0x000B9ACA000 Shell.efi
^[[2J^[[64DUEFI Interactive Shell v2.1
EDK II
UEFI v2.60 (EDK II, 0x00010000)
^[[1m^[[33m^[[40mMapping table^[[0m^[[37m^[[40m
^[[1m^[[33m^[[40m      FS0:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40mHD0h:;BLK15:
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)
^[[1m^[[33m^[[40m     BLK0:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x0)
^[[1m^[[33m^[[40m     BLK1:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x1)
^[[1m^[[33m^[[40m     BLK2:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x2)
^[[1m^[[33m^[[40m     BLK3:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x2)/HD(1,GPT,F9F21F00-A8D4-5F0E-9746-594869AEC34E,0x100,0x700)
^[[1m^[[33m^[[40m     BLK4:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)
^[[1m^[[33m^[[40m     BLK5:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(1,GPT,697C41E0-7A59-4DFA-A9A6-AA43AC5BE684,0x100,0x100)
^[[1m^[[33m^[[40m    BLK10:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(2,GPT,3F5F8C48-4402-4ACE-9058-30BFEA4FA53F,0x200,0xC00)
^[[1m^[[33m^[[40m    BLK11:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(3,GPT,E2F5E2A9-C9B7-4089-9859-4498F1D3EF7E,0xE00,0x600)
^[[1m^[[33m^[[40m    BLK12:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(4,GPT,DC1A888E-F17C-4964-92D6-F8FCC402ED8B,0x1400,0xC00)
^[[1m^[[33m^[[40m    BLK13:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(5,GPT,10CC3268-05F0-4DB2-AA00-707361427FC8,0x2000,0x10000)
^[[1m^[[33m^[[40m    BLK14:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(6,GPT,5D8481D4-C170-4AA8-9438-8743C73EA8F5,0x12000,0x100)
^[[1m^[[33m^[[40m    BLK16:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(8,GPT,6E53B0BB-FA7E-4206-B607-5AE699E9F066,0x16100,0x1000)
^[[1m^[[33m^[[40m    BLK17:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(9,GPT,F1E126A6-CEEF-45C1-AACE-29F33AC9CF13,0x17100,0x200)
^[[1m^[[33m^[[40m     BLK6:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(10,GPT,C3E50923-FB85-4153-B925-759614D4DFCD,0x17300,0x125000)
^[[1m^[[33m^[[40m     BLK7:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(11,GPT,919D7080-D71A-4AE1-9227-E4585210C837,0x13C300,0x31000)
^[[1m^[[33m^[[40m     BLK8:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(12,GPT,611EAC6B-BC42-4D72-90AC-418569C8E9B8,0x16D300,0x100)
^[[1m^[[33m^[[40m     BLK9:^[[0m^[[37m^[[40m ^[[1m^[[37m^[[40mAlias(s):^[[0m^[[37m^[[40m
          VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0
,0x3)/HD(13,GPT,049B9A32-A36A-483E-AB6F-9EF6644E6D47,0x16D400,0x6047FB)
Press ^[[1m^[[37m^[[40mESC^[[0m^[[37m^[[40m in 5 seconds to skip ^[[1m^[[33m^[[40mstartup.nsh^[[0m^[[37m^[[40m or any other key to continue.^[[72DPress ^[[1m^[[37m^[[40mESC^[[0m^[[37m^[[40m in 4 seconds to skip ^[[1m^[[33m^[[40mstartup.nsh^[[0m^[[37m^[[40m or any other key to continue.^[[72DPress ^[[1m^[[37m^[[40mESC^[[0m^[[37m^[[40m in 3 seconds to skip ^[[1m^[[33m^[[40mstartup.nsh^[[0m^[[37m^[[40m or any other key to continue.^[[72DPress ^[[1m^[[37m^[[40mESC^[[0m^[[37m^[[40m in 2 seconds to skip ^[[1m^[[33m^[[40mstartup.nsh^[[0m^[[37m^[[40m or any other key to continue.^[[72DPress ^[[1m^[[37m^[[40mESC^[[0m^[[37m^[[40m in 1 seconds to skip ^[[1m^[[33m^[[40mstartup.nsh^[[0m^[[37m^[[40m or any other key to continue.
^[[1m^[[33m^[[40mShell> ^[[0m^[[37m^[[40mFS0:
^[[1m^[[33m^[[40mFS0:\> ^[[0m^[[37m^[[40mcd EFI\BOOT
FS0:\EFI\BOOT
^[[1m^[[33m^[[40mFS0:\EFI\BOOT\> ^[[0m^[[37m^[[40mdir
Directory of: ^[[1m^[[37m^[[40mFS0:\EFI\BOOT\^[[0m^[[37m^[[40m
06/30/2017  06:33 <DIR>         1,024  ^[[0m^[[34m^[[40m.^[[0m^[[37m^[[40m
06/30/2017  06:33 <DIR>           512  ^[[0m^[[34m^[[40m..^[[0m^[[37m^[[40m
06/30/2017  06:33              26,176  ^[[0m^[[32m^[[40mfastboot.efi^[[0m^[[37m^[[40m
08/01/2017  17:19             885,072  ^[[0m^[[32m^[[40mxen.efi^[[0m^[[37m^[[40m
07/17/2017  00:40               1,313  grub.cfg
07/17/2017  00:40          20,066,816  Image
07/17/2017  00:40              43,471  Image-dtb
07/17/2017  16:57             847,872  ^[[0m^[[32m^[[40mgrub.efi^[[0m^[[37m^[[40m
08/01/2017  17:19                 237  xen.cfg
08/01/2017  17:19          16,501,248  Image-4.12
08/01/2017  17:19              35,966  Image-4.12.dtb
07/17/2017  16:57           2,723,192  livepatch.tgz
06/30/2017  06:33             871,424  ^[[0m^[[32m^[[40mgrub-2.02.efi^[[0m^[[37m^[[40m
08/01/2017  17:19             847,872  ^[[0m^[[32m^[[40mgrubaa64.efi^[[0m^[[37m^[[40m
         12 File(s)  42,850,659 bytes
          2 Dir(s)
^[[1m^[[33m^[[40mFS0:\EFI\BOOT\> ^[[0m^[[37m^[[40mgrubaa64.efi
Loading driver at 0x000B9991000 EntryPoint=0x000B9991400
Loading driver at 0x000B9991000 EntryPoint=0x000B9991400 
^[[0m^[[30m^[[47mWelcome to GRUB!

^[[0m^[[37m^[[40m^[[0m^[[30m^[[40m^[[2J^[[01;01H^[[0m^[[37m^[[40m^[[0m^[[30m^[[40m^[[2J^[[04D^[[0m^[[37m^[[40m^[[02;30HGNU GRUB  version 2.03

^[[01C/----------------------------------------------------------------------------\^[[05;02H|^[[76C|^[[06;02H|^[[76C|^[[07;02H|^[[76C|^[[08;02H|^[[76C|^[[09;02H|^[[76C|^[[10;02H|^[[76C|^[[11;02H|^[[76C|^[[12;02H|^[[76C|^[[13;02H|^[[76C|^[[14;02H|^[[76C|^[[15;02H|^[[76C|^[[16;02H|^[[76C|^[[17;02H\----------------------------------------------------------------------------/^[[18;02H^[[19;02H     Use the ^ and v keys to select which entry is highlighted.          
      Press enter to boot the selected OS, `e' to edit the commands       
      before booting or `c' for a command-line. ESC to return previous    
      menu.                                                               ^[[05;80H 
^[[0m^[[30m^[[47m^[[05;03H*Xen                                                                        ^[[0m^[[37m^[[40m^[[01D^[[06;03H Latest                                                                     ^[[01D^[[07;03H Fastboot                                                                   ^[[01D^[[08;03H                                                                            ^[[01D^[[09;03H                                                                            ^[[01D^[[10;03H                                                                            ^[[01D^[[11;03H                                                                            ^[[01D^[[12;03H                                                                            ^[[01D^[[13;03H                                                                            ^[[01D^[[14;03H                                                                            ^[[01D^[[15;03H                                                                            ^[[01D^[[16;03H                                                                            ^[[01D^[[02C 
^[[05;78H^[[23;01H   The highlighted entry will be executed automatically in 10s.                ^[[05;78H^[[23;01H                                                                               ^[[24;01H                                                                               ^[[05;78H^[[0m^[[30m^[[40m^[[2J^[[01;01H^[[0m^[[37m^[[40m^[[0m^[[30m^[[40m^[[2J^[[04D^[[0m^[[37m^[[40mLoading driver at 0x000B87CC000 EntryPoint=0x000B88798F4
Loading driver at 0x000B87CC000 EntryPoint=0x000B88798F4 
Using modules provided by bootloader in FDT
Xen 4.10-unstable (c/s Wed Aug 16 18:07:27 2017 +0100 git:d0291f3391) EFI loader

 Xen 4.10-unstable
(XEN) Xen version 4.10-unstable (root@) (gcc (Debian 6.3.0-18) 6.3.0 20170516) debug=y  Mon Sep 11 23:43:13 UTC 2017
(XEN) Latest ChangeSet: Wed Aug 16 18:07:27 2017 +0100 git:d0291f3391
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN)   Processor Features: 0000000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001122 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00000131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using PSCI-1.0 for SMP bringup
(XEN) SMP: Allowing 8 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 1920 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000e82b1000
(XEN)         gic_cpu_addr=00000000e82b2000
(XEN)         gic_hyp_addr=00000000e82b4000
(XEN)         gic_vcpu_addr=00000000e82b6000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: 384 lines, 8 cpus, secure (IID 0200143b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 64 KiB.
(XEN) Bringing up CPU1
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
(XEN) CPU 3 booted.
(XEN) Bringing up CPU4
(XEN) CPU 4 booted.
(XEN) Bringing up CPU5
(XEN) CPU 5 booted.
(XEN) Bringing up CPU6
(XEN) CPU 6 booted.
(XEN) Bringing up CPU7
(XEN) CPU 7 booted.
(XEN) Brought up 8 CPUs
(XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) I/O virtualisation disabled
(XEN) build-id: ce6199b9fac01491da92f8890af4dcf8c85a430e
(XEN) alternatives: Patching with alt table 00000000400c4dd8 -> 00000000400c52ac
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 00000000b88f9000
(XEN) Allocating 1:1 mappings totalling 1500MB for dom0:
(XEN) BANK[0] 0x00000010000000-0x00000018000000 (128MB)
(XEN) BANK[1] 0x00000020000000-0x00000030000000 (256MB)
(XEN) BANK[2] 0x00000038000000-0x0000003c000000 (64MB)
(XEN) BANK[3] 0x00000040000000-0x00000058000000 (384MB)
(XEN) BANK[4] 0x0000008c000000-0x000000b4000000 (640MB)
(XEN) BANK[5] 0x000000b8000000-0x000000b8400000 (4MB)
(XEN) BANK[6] 0x000000ba800000-0x000000bc000000 (24MB)
(XEN) Grant table range: 0x000000bfe00000-0x000000bfe6a000
(XEN) Loading zImage from 00000000b88f9000 to 0000000010080000-000000001103ca00
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading dom0 DTB to 0x0000000017e00000-0x0000000017e08265
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
(XEN) ...done.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 272kB init memory.
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER4
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER8
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER12
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER16
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER20
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER24
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER28
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER32
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER36
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER40
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER44
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER0
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.0-linaro-hikey960+ (konrad@localhost.localdomain) (gcc version 7.0.1 20170309 (Red Hat Cross 7.0.1-0.4) (GCC) ) #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: HiKey960
[    0.000000] Xen 4.10 support found
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 16 MiB at 0x00000000bb000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000bbffffff]
[    0.000000] NUMA: Adding memblock [0x10000000 - 0x17ffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x20000000 - 0x2fffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x38000000 - 0x3bffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x40000000 - 0x57ffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x8c000000 - 0xb3ffffff] on node 0
[    0.000000] NUMA: Adding memblock [0xb8000000 - 0xb83fffff] on node 0
[    0.000000] NUMA: Adding memblock [0xba800000 - 0xbbffffff] on node 0
[    0.000000] NUMA: Initmem setup node 0 [mem 0x10000000-0xbbffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xbafc4100-0xbafc5bff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000010000000-0x00000000bbffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000010000000-0x0000000017ffffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x000000002fffffff]
[    0.000000]   node   0: [mem 0x0000000038000000-0x000000003bffffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000057ffffff]
[    0.000000]   node   0: [mem 0x000000008c000000-0x00000000b3ffffff]
[    0.000000]   node   0: [mem 0x00000000b8000000-0x00000000b83fffff]
[    0.000000]   node   0: [mem 0x00000000ba800000-0x00000000bbffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000010000000-0x00000000bbffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 22 pages/cpu @ffff8000baf11000 s59160 r0 d30952 u90112
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 378000
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: console=tty0 console=hvc0 root=/dev/sdd10 rw efi=noruntime
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 1452900K/1536000K available (10172K kernel code, 1138K rwdata, 3648K rodata, 1088K init, 406K bss, 66716K reserved, 16384K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008a70000   ( 10176 KB)
[    0.000000]     .rodata : 0xffff000008a70000 - 0xffff000008e10000   (  3712 KB)
[    0.000000]       .init : 0xffff000008e10000 - 0xffff000008f20000   (  1088 KB)
[    0.000000]       .data : 0xffff000008f20000 - 0xffff00000903ca00   (  1139 KB)
[    0.000000]        .bss : 0xffff00000903ca00 - 0xffff0000090a2334   (   407 KB)
[    0.000000]     fixed   : 0xffff7dfffe7fd000 - 0xffff7dfffec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000400000 - 0xffff7e0002f00000   (    43 MB actual)
[    0.000000]     memory  : 0xffff800010000000 - 0xffff8000bc000000   (  2752 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=8.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] arch_timer: cp15 timer(s) running at 1.92MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1c570327e, max_idle_ns: 1763180809505 ns
[    0.000004] sched_clock: 56 bits at 1920kHz, resolution 520ns, wraps every 4398046510977ns
[    0.000082] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58334160866034 ns
[    0.000407] Console: colour dummy device 80x25
[    0.000928] console [tty0] enabled
[    0.430205] console [hvc0] enabled
[    0.433732] Calibrating delay loop (skipped), value calculated using timer frequency.. 3.84 BogoMIPS (lpj=7680)
[    0.443838] pid_max: default: 32768 minimum: 301
[    0.448565] Security Framework initialized
[    0.452967] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.461000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.468398] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.475005] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.498292] ASID allocator initialised with 65536 entries
[    0.503989] xen:grant_table: Grant tables using version 1 layout
[    0.509923] Grant table initialized
[    0.513486] xen:events: Using FIFO-based ABI
[    0.517844] Xen: initializing cpu0
[    0.534428] EFI services will not be available.
[    0.554913] smp: Bringing up secondary CPUs ...
(XEN) d0v1: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v2: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v3: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v4: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v5: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v6: vGICD: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v7: vGICD: unhandled word write 0xffffffff to ICACTIVER0
[    0.591511] Detected VIPT I-cache on CPU1
[    0.597168] Xen: initializing cpu1
[    0.597189] CPU1: Booted secondary processor [410fd034]
[    0.627574] Detected VIPT I-cache on CPU2
[    0.633175] Xen: initializing cpu2
[    0.633190] CPU2: Booted secondary processor [410fd034]
[    0.663656] Detected VIPT I-cache on CPU3
[    0.669245] Xen: initializing cpu3
[    0.669258] CPU3: Booted secondary processor [410fd034]
[    0.699756] Detected VIPT I-cache on CPU4
[    0.705362] Xen: initializing cpu4
[    0.705379] CPU4: Booted secondary processor [410fd034]
[    0.735840] Detected VIPT I-cache on CPU5
[    0.741425] Xen: initializing cpu5
[    0.741438] CPU5: Booted secondary processor [410fd034]
[    0.771938] Detected VIPT I-cache on CPU6
[    0.777521] Xen: initializing cpu6
[    0.777534] CPU6: Booted secondary processor [410fd034]
[    0.808032] Detected VIPT I-cache on CPU7
[    0.813620] Xen: initializing cpu7
[    0.813633] CPU7: Booted secondary processor [410fd034]
[    0.813689] smp: Brought up 1 node, 8 CPUs
[    0.907609] SMP: Total of 8 processors activated.
[    0.912379] CPU features: detected feature: 32-bit EL0 Support
[    0.919021] CPU: All CPU(s) started at EL1
[    0.923076] alternatives: patching kernel code
[    0.928225] devtmpfs: initialized
[    0.934788] DMI not present or invalid.
[    0.938780] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.948485] futex hash table entries: 2048 (order: 6, 262144 bytes)
[    0.955317] pinctrl core: initialized pinctrl subsystem
[    0.961764] NET: Registered protocol family 16
[    0.968109] vdso: 2 pages (1 code @ ffff000008a77000, 1 data @ ffff000008f25000)
[    0.975442] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.988221] DMA: preallocated 256 KiB pool for atomic allocations
[    0.994252] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB
[    1.002486] software IO TLB [mem 0xb0400000-0xb0800000] (4MB) mapped at [ffff8000b0400000-ffff8000b07fffff]
[    1.012369] Serial: AMBA PL011 UART driver
[    1.030067] hi3660-mbox e896b000.mailbox: Mailbox enabled
[    1.044616] uart-pl011 ffd74000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart3_pmx_func, deferring probe
[    1.055820] uart-pl011 fdf01000.serial: could not find pctldev for node /soc/pinmux@e896c000/uart4_pmx_func, deferring probe
[    1.083859] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    1.091076] ACPI: Interpreter disabled.
[    1.095136] xen:balloon: Initialising balloon driver
[    1.100041] xen_balloon: Initialising balloon driver
[    1.105473] vgaarb: loaded
[    1.108194] SCSI subsystem initialized
[    1.112103] ssp-pl022 ffd68000.spi: could not find pctldev for node /soc/pinmux@fff11000/spi2_pmx_func, deferring probe
[    1.122810] ssp-pl022 ff3b3000.spi: could not find pctldev for node /soc/pinmux@ff3b6000/spi3_pmx_func, deferring probe
[    1.133743] usbcore: registered new interface driver usbfs
[    1.139191] usbcore: registered new interface driver hub
[    1.144631] usbcore: registered new device driver usb
[    1.149677] tcpc_class_init_1.1.1_G
[    1.153221] TCPC class init OK
[    1.156341] Init Richtek RegMap
[    1.159618] i2c_designware ffd71000.i2c: could not find pctldev for node /soc/pinmux@fff11000/i2c0_pmx_func, deferring probe
[    1.170846] i2c_designware ffd72000.i2c: could not find pctldev for node /soc/pinmux@fff11000/i2c1_pmx_func, deferring probe
[    1.182112] i2c_designware fdf0b000.i2c: could not find pctldev for node /soc/pinmux@fff11000/i2c7_pmx_func, deferring probe
[    1.193630] pps_core: LinuxPPS API ver. 1 registered
[    1.198501] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.207706] PTP clock support registered
[    1.211749] dmi: Firmware registration failed.
[    1.216360] Advanced Linux Sound Architecture Driver Initialized.
[    1.223048] clocksource: Switched to clocksource arch_sys_counter
[    1.229141] VFS: Disk quotas dquot_6.6.0
[    1.233058] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.240065] pnp: PnP ACPI: disabled
[    1.248314] OF: /soc/thermal-zones/cls0/cooling-maps/map0: could not find phandle
[    1.255710] missing cooling_device property
[    1.259947] failed to build thermal zone cls0: -22
[    1.264883] NET: Registered protocol family 2
[    1.269500] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.276715] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.283385] TCP: Hash tables configured (established 16384 bind 16384)
[    1.289944] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.295984] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.302553] NET: Registered protocol family 1
[    1.307185] RPC: Registered named UNIX socket transport module.
[    1.313009] RPC: Registered udp transport module.
[    1.317775] RPC: Registered tcp transport module.
[    1.322544] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.329641] kvm [1]: HYP mode not available
[    1.335727] audit: initializing netlink subsys (disabled)
[    1.341120] audit: type=2000 audit(1.066:1): state=initialized audit_enabled=0 res=1
[    1.341273] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    1.344220] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.344556] NFS: Registering the id_resolver key type
[    1.344572] Key type id_resolver registered
[    1.344573] Key type id_legacy registered
[    1.344579] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.344581] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.344695] 9p: Installing v9fs 9p2000 file system support
[    1.347369] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.347374] io scheduler noop registered
[    1.347492] io scheduler cfq registered (default)
[    1.347495] io scheduler mq-deadline registered
[    1.347497] io scheduler kyber registered
[    1.350482] pinctrl-single e896c000.pinmux: 124 pins at pa ffff0000094b7000 size 496
[    1.350560] pinctrl-single ff37e000.pinmux: 6 pins at pa ffff0000094b9000 size 24
[    1.350621] pinctrl-single ff3b6000.pinmux: 12 pins at pa ffff0000094bb000 size 48
[    1.350679] pinctrl-single ff3fd000.pinmux: 6 pins at pa ffff0000094bd000 size 24
[    1.350773] pinctrl-single fff11000.pinmux: 42 pins at pa ffff0000094bf000 size 168
[    1.350949] pinctrl-single e896c800.pinmux: 128 pins at pa ffff0000094c1800 size 512
[    1.351003] pinctrl-single ff3b6800.pinmux: 6 pins at pa ffff0000094c3800 size 24
[    1.351095] pinctrl-single ff3fd800.pinmux: 6 pins at pa ffff0000094c5800 size 24
[    1.351169] pinctrl-single ff37e800.pinmux: 6 pins at pa ffff0000094c7800 size 24
[    1.351263] pinctrl-single fff11800.pinmux: 47 pins at pa ffff0000094c9800 size 188
[    1.352439] pl061_gpio e8a0b000.gpio: PL061 GPIO chip @0x00000000e8a0b000 registered
[    1.352706] pl061_gpio e8a0c000.gpio: PL061 GPIO chip @0x00000000e8a0c000 registered
[    1.352936] pl061_gpio e8a0d000.gpio: PL061 GPIO chip @0x00000000e8a0d000 registered
[    1.353161] pl061_gpio e8a0e000.gpio: PL061 GPIO chip @0x00000000e8a0e000 registered
[    1.353377] pl061_gpio e8a0f000.gpio: PL061 GPIO chip @0x00000000e8a0f000 registered
[    1.353600] pl061_gpio e8a10000.gpio: PL061 GPIO chip @0x00000000e8a10000 registered
[    1.353821] pl061_gpio e8a11000.gpio: PL061 GPIO chip @0x00000000e8a11000 registered
[    1.354044] pl061_gpio e8a12000.gpio: PL061 GPIO chip @0x00000000e8a12000 registered
[    1.354270] pl061_gpio e8a13000.gpio: PL061 GPIO chip @0x00000000e8a13000 registered
[    1.354503] pl061_gpio e8a14000.gpio: PL061 GPIO chip @0x00000000e8a14000 registered
[    1.354725] pl061_gpio e8a15000.gpio: PL061 GPIO chip @0x00000000e8a15000 registered
[    1.354950] pl061_gpio e8a16000.gpio: PL061 GPIO chip @0x00000000e8a16000 registered
[    1.355205] pl061_gpio e8a17000.gpio: PL061 GPIO chip @0x00000000e8a17000 registered
[    1.355434] pl061_gpio e8a18000.gpio: PL061 GPIO chip @0x00000000e8a18000 registered
[    1.355661] pl061_gpio e8a19000.gpio: PL061 GPIO chip @0x00000000e8a19000 registered
[    1.355891] pl061_gpio e8a1a000.gpio: PL061 GPIO chip @0x00000000e8a1a000 registered
[    1.356117] pl061_gpio e8a1b000.gpio: PL061 GPIO chip @0x00000000e8a1b000 registered
[    1.356339] pl061_gpio e8a1c000.gpio: PL061 GPIO chip @0x00000000e8a1c000 registered
[    1.356600] pl061_gpio ff3b4000.gpio: PL061 GPIO chip @0x00000000ff3b4000 registered
[    1.356830] pl061_gpio ff3b5000.gpio: PL061 GPIO chip @0x00000000ff3b5000 registered
[    1.357054] pl061_gpio e8a1f000.gpio: PL061 GPIO chip @0x00000000e8a1f000 registered
[    1.357276] pl061_gpio e8a20000.gpio: PL061 GPIO chip @0x00000000e8a20000 registered
[    1.357517] pl061_gpio fff0b000.gpio: PL061 GPIO chip @0x00000000fff0b000 registered
[    1.357777] pl061_gpio fff0c000.gpio: PL061 GPIO chip @0x00000000fff0c000 registered
[    1.358009] pl061_gpio fff0d000.gpio: PL061 GPIO chip @0x00000000fff0d000 registered
[    1.358249] pl061_gpio fff0e000.gpio: PL061 GPIO chip @0x00000000fff0e000 registered
[    1.358487] pl061_gpio fff0f000.gpio: PL061 GPIO chip @0x00000000fff0f000 registered
[    1.358726] pl061_gpio fff10000.gpio: PL061 GPIO chip @0x00000000fff10000 registered
[    1.358966] pl061_gpio fff1d000.gpio: PL061 GPIO chip @0x00000000fff1d000 registered
[    1.362933] xen:xen_evtchn: Event-channel device installed
[    1.366692] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    1.368220] SuperH (H)SCI(F) driver initialized
[    1.368435] msm_serial: driver initialized
[    1.370657] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.376065] loop: module loaded
[    1.376423] [I/GPIO_HUB] gpio_hub_init:gpio hub init status:0
[    1.378107] ufshcd-hi3660 ff3b0000.ufs: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled
[    1.378112] ufshcd-hi3660 ff3b0000.ufs: ufshcd_populate_vreg: Unable to find vcc-supply regulator, assuming enabled
[    1.378116] ufshcd-hi3660 ff3b0000.ufs: ufshcd_populate_vreg: Unable to find vccq-supply regulator, assuming enabled
[    1.378118] ufshcd-hi3660 ff3b0000.ufs: ufshcd_populate_vreg: Unable to find vccq2-supply regulator, assuming enabled
[    1.402227] scsi host0: ufshcd
[    1.411242] hisi_sas: driver version v1.6
[    1.413033] libphy: Fixed MDIO Bus: probed
[    1.413321] tun: Universal TUN/TAP device driver, 1.6
[    1.413960] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.413961] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.413989] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    1.413990] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.414011] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    1.414013] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.414183] sky2: driver version 1.30
[    1.414448] xen_netfront: Initialising Xen virtual ethernet driver
[    1.414504] usbcore: registered new interface driver asix
[    1.414524] usbcore: registered new interface driver ax88179_178a
[    1.414642] VFIO - User Level meta-driver version: 0.3
[    1.415133] [USB3][hisi_dwc3_probe]+
[    1.415211] [USB3][get_phy_param]eye diagram param: 0x1c466e3
[    1.415214] [USB3][get_phy_param]eye diagram host param: 0x1c466e3
[    1.415217] [USB3][get_phy_param]usb3_phy_cr_param: 0xb80
[    1.415218] [USB3][get_phy_param]usb3_phy_host_cr_param: 0x980
[    1.415219] [USB3][get_phy_param]usb3_phy_tx_vboost_lvl: 5
[    1.415234] [USB3][get_resource]this is asic platform (fpga flag 0)
[    1.415236] [USB3][create_attr_file]+
[    1.415280] [USB3][create_attr_file]-
[    1.415283] [USB3][hi3660_usb3phy_init]+
[    1.443178] [USB3][config_femtophy_param]set hs phy param 0x1c466e3 for device
[    1.443771] [USB3][config_femtophy_param]set ss phy rx equalization 0xb80
[    1.444619] [USB3][config_femtophy_param]set ss RX_SCOPE_VDCC 0x1
[    1.444621] [USB3][config_femtophy_param]set ss phy tx vboost lvl 0x5
[    1.444623] [USB3][set_hisi_dwc3_power_flag]set hisi_dwc3_power_flag 1
[    1.444624] [USB3][hi3660_usb3phy_init]-
[    1.445250] [dwc3_otg_init]+
[    1.445254] DWC3_OCFG:	0x0
[    1.445255] DWC3_OCTL:	0x40
[    1.445256] DWC3_OEVT:	0x80000000
[    1.445257] DWC3_OEVTEN:	0x0
[    1.445258] DWC3_OSTS:	0x19
[    1.445259] DWC3_BCFG:	0x0
[    1.445260] DWC3_BCEVT:	0x0
[    1.445262] DWC3_BCEVTEN:	0x0
[    1.445263] [dwc3_otg_init]-
[    1.445280] dwc3 ff100000.dwc3: dwc3_host_init if otg, otg will do device_add.
[    1.446568] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[    1.446572] [USB3][hisi_dwc3_probe]init state: OFF
[    1.446574] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[    1.446576] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[    1.446578] [USB3][hisi_usb_otg_event]event: 1
[    1.446583] [USB3][event_work]+
[    1.446585] [USB3][handle_event][handle_event] type: 1
[    1.446589] [USB3][handle_event]cancel bc_again_work sync:0
[    1.446591] [dwc3_otg_work]+
[    1.446591]  evt = 4
[    1.446593] [dwc3_otg_stop_peripheral]+
[    1.446594] [dwc3_otg_stop_peripheral]-
[    1.446595] [dwc3_otg_work]-
[    1.446596] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[    1.446598] [USB3][handle_event]hisi usb status: DEVICE -> OFF
[    1.446600] [USB3][event_work]-
[    1.446602] [USB3][hisi_dwc3_probe]-
[    1.446876] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.446878] ehci-pci: EHCI PCI platform driver
[    1.446894] ehci-platform: EHCI generic platform driver
[    1.446951] ehci-orion: EHCI orion driver
[    1.446993] ehci-exynos: EHCI EXYNOS driver
[    1.447046] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[    1.447084] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.447091] ohci-pci: OHCI PCI platform driver
[    1.447107] ohci-platform: OHCI generic platform driver
[    1.447149] ohci-exynos: OHCI EXYNOS driver
[    1.447346] usbcore: registered new interface driver usb-storage
[    1.447685] [I/hisi_pd] pd_dpm_init
[    1.447728] [I/hisi_pd] pd_dpm_probe : +++++++++
[    1.447752] [I/hisi_pd] pd_dpm_probe ++++
[    1.447752] 
[    1.447891] rt1711h_init (1.1.8_G): initializing...
[    1.447895] rt1711h node found...
[    1.448339] rtc-pl031 fff04000.rtc: rtc core: registered pl031 as rtc0
[    1.448590] i2c /dev entries driver
[    1.449546] hi3660_thermal fff30000.tsensor: failed to register thermal sensor0: -19
[    1.449553] hi3660_thermal fff30000.tsensor: failed to register thermal sensor1: -19
[    1.449558] hi3660_thermal fff30000.tsensor: failed to register thermal sensor2: -19
[    1.449564] hi3660_thermal fff30000.tsensor: failed to register thermal sensor3: -19
[    1.449569] hi3660_thermal fff30000.tsensor: failed to register thermal sensor4: -517
[    1.449575] hi3660_thermal fff30000.tsensor: failed to register thermal sensor5: -19
[    1.449576] hi3660_thermal fff30000.tsensor: Thermal Sensor Loaded
[    1.449954] cpu cpu0: failed to get clock: -2
[    1.449960] cpufreq-dt: probe of cpufreq-dt failed with error -2
[    1.450106] sdhci: Secure Digital Host Controller Interface driver
[    1.450107] sdhci: Copyright(c) Pierre Ossman
[    1.450246] Synopsys Designware Multimedia Card Interface Driver
[    1.450519] dwmmc_k3 ff37f000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default
[    1.452650] dwmmc_k3 ff37f000.dwmmc1: IDMAC supports 64-bit address mode.
[    1.452731] dwmmc_k3 ff37f000.dwmmc1: Using internal DMA controller.
[    1.452736] dwmmc_k3 ff37f000.dwmmc1: Version ID is 270a
[    1.452764] dwmmc_k3 ff37f000.dwmmc1: DW MMC controller at irq 46,32 bit host data width,256 deep fifo
[    1.452866] dwmmc_k3 ff37f000.dwmmc1: Got CD GPIO
[    1.473495] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    1.492176] dwmmc_k3 ff37f000.dwmmc1: 1 slots initialized
[    1.492280] dwmmc_k3 ff3ff000.dwmmc2: fifo-depth property not found, using value of FIFOTH register as default
[    1.494404] dwmmc_k3 ff3ff000.dwmmc2: IDMAC supports 64-bit address mode.
[    1.494458] dwmmc_k3 ff3ff000.dwmmc2: Using internal DMA controller.
[    1.494463] dwmmc_k3 ff3ff000.dwmmc2: Version ID is 270a
[    1.494488] dwmmc_k3 ff3ff000.dwmmc2: DW MMC controller at irq 47,32 bit host data width,256 deep fifo
[    1.494782] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.495999] ledtrig-cpu: registered to indicate activity on CPUs
[    1.496407] usbcore: registered new interface driver usbhid
[    1.496409] usbhid: USB HID core driver
[    1.497279] NET: Registered protocol family 17
[    1.497342] 9pnet: Installing 9P2000 support
[    1.497375] Key type dns_resolver registered
[    1.497712] registered taskstats version 1
[    1.502398] ffd74000.serial: ttyAMA3 at MMIO 0xffd74000 (irq = 12, base_baud = 0) is a PL011 rev2
[    1.504864] fdf01000.serial: ttyAMA4 at MMIO 0xfdf01000 (irq = 13, base_baud = 0) is a PL011 rev2
[    1.504927] serial serial0: tty port ttyAMA4 registered
[    1.505165] ssp-pl022 ffd68000.spi: ARM PL022 driver, device ID: 0x00041022
[    1.505194] ssp-pl022 ffd68000.spi: mapped registers from 0x00000000ffd68000 to ffff0000095cd000
[    1.514009] ssp-pl022 ffd68000.spi: Failed to work in dma mode, work without dma!
[    1.514205] ssp-pl022 ff3b3000.spi: ARM PL022 driver, device ID: 0x00041022
[    1.514226] ssp-pl022 ff3b3000.spi: mapped registers from 0x00000000ff3b3000 to ffff0000095cf000
[    1.514252] ssp-pl022 ff3b3000.spi: Failed to work in dma mode, work without dma!
[    1.565265] rt1711_i2c_probe
[    1.565266] I2C functionality : OK...
[    1.671704] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[1, 1], lane[1, 1], pwr[SLOWAUTO_MODE, SLOWAUTO_MODE], rate = 0
[    1.691435] rt_parse_dt
[    1.691440] rt1711h_chipID = 0x2171
[    1.691442] regmap_device_register: name = rt1711-4e
[    1.691458]  rt_regmap_rt1711-4e: rt register cache data init
[    1.691462]  rt_regmap_rt1711-4e: cache cata init successfully
[    1.691507] tcpc_device_register register tcpc device (type_c_port0)
[    1.691560] [I/hisi_pd] tcpc_device_register register_pd_wake_unlock_notifier OK
[    1.691562] PD Timer number = 37
[    1.691628] tcpci_timer_init : init OK
[    1.691667] pd_parse_pdata
[    1.691673] pd_parse_pdata src pdo data =
[    1.691675] pd_parse_pdata 0: 0x00019064
[    1.691677] pd_parse_pdata snk pdo data =
[    1.691678] pd_parse_pdata 0: 0x000190c8
[    1.691679] pd_parse_pdata 1: 0x0002d0c8
[    1.691681] pd_parse_pdata id vdos data =
[    1.691682] pd_parse_pdata 0: 0xd00029cf
[    1.691683] pd_parse_pdata 1: 0x00000000
[    1.691684] pd_parse_pdata 2: 0x00010000
[    1.691686] dpm_caps: local_dr_power
[    1.691688] dpm_caps: local_dr_data
[    1.691690] dpm_caps: local_ext_power
[    1.691691] dpm_caps: local_usb_comm
[    1.691692] dpm_caps: local_usb_suspend
[    1.691693] dpm_caps: local_high_cap
[    1.691694] dpm_caps: local_give_back
[    1.691696] dpm_caps: local_no_suspend
[    1.691696] dpm_caps: local_vconn_supply
[    1.691698] dpm_caps: attemp_discover_cable_dfp
[    1.691699] dpm_caps: attemp_enter_dp_mode
[    1.691700] dpm_caps: attemp_discover_cable
[    1.691701] dpm_caps: attemp_discover_id
[    1.691702] dpm_caps: pr_reject_as_source
[    1.691703] dpm_caps: pr_reject_as_sink
[    1.691704] dpm_caps: pr_check_gp_source
[    1.691705] dpm_caps: pr_check_gp_sink
[    1.691706] dpm_caps: dr_reject_as_dfp
[    1.691707] dpm_caps: dr_reject_as_ufp
[    1.691708] dpm_caps: snk_prefer_low_voltage
[    1.691709] dpm_caps: snk_ignore_mismatch_current
[    1.691710] dpm_caps = 0xc010c10b
[    1.691712] [I/hisi_pd] PE:pd_core_init
[    1.747592] rt1711_init_alert name = type_c_port0
[    1.747594] rt1711_init_alert gpio # = 291
[    1.747601] GPIO requested...
[    1.747604] rt1711_init_alert : IRQ number = 271
[    1.747605] rt1711_init_alert : irq initialized...
[    1.747659] IRQF_NO_THREAD Test
[    1.971927] [I/hisi_pd] [TCPC-I]SkipAlert:0x0000
[    2.027001] ufs final power mode: gear = 3, lane = 1, pwr = 1, rate = 2
[    2.027006] ufshcd-hi3660 ff3b0000.ufs: set TX_EQUALIZER 3.5db
[    2.184873] ufshcd-hi3660 ff3b0000.ufs: check TX_EQUALIZER DB value lane0 = 0x1
[    2.184878] ufshcd-hi3660 ff3b0000.ufs: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[1, 1], pwr[FAST MODE, FAST MODE], rate = 2
[    2.208824] ufshcd-hi3660 ff3b0000.ufs: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0
[    2.232164] scsi 0:0:0:49488: scsi_add_lun: correcting incorrect peripheral device type 0x0 for W-LUN 0x            c150hN
[    2.232170] scsi 0:0:0:49488: Well-known LUN    SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.286397] [I/hisi_pd] TPC-I:typec_init: DRP
[    2.313502] scsi 0:0:0:49456: scsi_add_lun: correcting incorrect peripheral device type 0x0 for W-LUN 0x            c130hN
[    2.313506] scsi 0:0:0:49456: Well-known LUN    SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.369474] [E/GPIO_HUB] gpio_hub_power_on: gpio hub hub vbus set err
[    2.369477] [E/GPIO_HUB] gpio_hub_change_typec_power: typec power gpio is err
[    2.369480] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:1
[    2.369481] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:1
[    2.369483] [E/GPIO_HUB] gpio_hub_switch_to_hub: otg_switch_gpio is err
[    2.369485] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:2
[    2.369486] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:2
[    2.369487] [USB3][hisi_usb_otg_event]event: 2
[    2.369491] [I/hisi_pd] TPC-I:** Unattached.SNK
[    2.369492] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[    2.369493] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[    2.379379] [USB3][event_work]+
[    2.379381] [USB3][handle_event][handle_event] type: 2
[    2.379383] [USB3][set_vbus_power]set port power 1
[    2.379385] [dwc3_otg_work]+
[    2.379385]  evt = 2
[    2.379387] [dwc3_otg_start_host]+
[    2.379581] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.379593] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    2.379936] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x00010010
[    2.379958] xhci-hcd xhci-hcd.0.auto: irq 285, io mem 0xff100000
[    2.380235] hub 1-0:1.0: USB hub found
[    2.380248] hub 1-0:1.0: 1 port detected
[    2.380344] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.380350] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    2.380383] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.380595] hub 2-0:1.0: USB hub found
[    2.380605] hub 2-0:1.0: 1 port detected
[    2.380683] [dwc3_otg_start_host]-
[    2.380684] [dwc3_otg_work]-
[    2.380686] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[    2.380690] [USB3][handle_event]hisi usb_status: OFF -> HOST
[    2.380691] [USB3][event_work]-
[    2.392980] scsi 0:0:0:49476: scsi_add_lun: correcting incorrect peripheral device type 0x0 for W-LUN 0x            c144hN
[    2.392984] scsi 0:0:0:49476: Well-known LUN    SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.417946] tcpc_device_irq_enable : tcpc irq enable OK!
[    2.417947] rt1711_i2c_probe probe OK!
[    2.418638] dwmmc_k3 ff3ff000.dwmmc2: fifo-depth property not found, using value of FIFOTH register as default
[    2.420746] dwmmc_k3 ff3ff000.dwmmc2: IDMAC supports 64-bit address mode.
[    2.420792] dwmmc_k3 ff3ff000.dwmmc2: Using internal DMA controller.
[    2.420798] dwmmc_k3 ff3ff000.dwmmc2: Version ID is 270a
[    2.420817] dwmmc_k3 ff3ff000.dwmmc2: DW MMC controller at irq 47,32 bit host data width,128 deep fifo
[    2.420894] mmc_host mmc1: card is non-removable.
[    2.451576] scsi 0:0:0:0: Direct-Access     SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.525143] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    2.533551] scsi 0:0:0:1: Direct-Access     SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.567071] dwmmc_k3 ff3ff000.dwmmc2: 1 slots initialized
[    2.567547] input: keys as /devices/platform/keys/input/input0
[    2.573857] rtc-pl031 fff04000.rtc: setting system clock to 1970-02-08 20:51:27 UTC (3358287)
[    2.592159] ALSA device list:
[    2.592161]   No soundcards found.
[    2.602644] sd 0:0:0:0: [sda] 1024 4096-byte logical blocks: (4.19 MB/4.00 MiB)
[    2.602647] sd 0:0:0:0: [sda] 16384-byte physical blocks
[    2.602695] scsi 0:0:0:2: Direct-Access     SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.602802] sd 0:0:0:0: [sda] Write Protect is off
[    2.609529] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[    2.628220] dwmmc_k3 ff3ff000.dwmmc2: card claims to support voltages below defined range
[    2.629268] [I/hisi_pd] TPC-I:[CC_Alert] 5/0
[    2.629271] [I/hisi_pd] TPC-I:** AttachWait.SNK
[    2.642039] scsi 0:0:0:3: Direct-Access     SAMSUNG  KLUBG4G1CE-B0B1  1000 PQ: 0 ANSI: 6
[    2.646232] sd 0:0:0:1: [sdb] 1024 4096-byte logical blocks: (4.19 MB/4.00 MiB)
[    2.646236] sd 0:0:0:1: [sdb] 16384-byte physical blocks
[    2.651872] sd 0:0:0:1: [sdb] Write Protect is off
[    2.662612] sd 0:0:0:1: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[    2.681772] sd 0:0:0:2: [sdc] 2048 4096-byte logical blocks: (8.39 MB/8.00 MiB)
[    2.681775] sd 0:0:0:2: [sdc] 16384-byte physical blocks
[    2.686452] sd 0:0:0:2: [sdc] Write Protect is off
[    2.697207] sd 0:0:0:2: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
[    2.707230] sd 0:0:0:3: [sdd] 7805952 4096-byte logical blocks: (32.0 GB/29.8 GiB)
[    2.707233] sd 0:0:0:3: [sdd] 16384-byte physical blocks
[    2.710747] sd 0:0:0:3: [sdd] Write Protect is off
[    2.726366] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
[    2.749311] [I/hisi_pd] TPC-I:[CC_Change] 5/0
[    2.749314] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[    2.749316] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[    2.749319] [E/GPIO_HUB] gpio_hub_power_off: gpio hub hub vbus no power set err
[    2.749321] [E/GPIO_HUB] gpio_hub_change_typec_power: typec power gpio is err
[    2.749323] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:3
[    2.749325] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:3
[    2.749327] [USB3][hisi_usb_otg_event]event: 3
[    2.749335] [E/GPIO_HUB] gpio_hub_switch_to_typec: otg_switch_gpio is err
[    2.749336] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:0
[    2.749338] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:0
[    2.749339] [USB3][hisi_usb_otg_event]event: 0
[    2.749340] [USB3][hisi_usb_otg_event]schedule event_work wait:0]
[    2.749342] [I/hisi_pd] TPC-I:** Attached.SNK
[    2.749343] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!+++++++++++
[    2.749344] [E/hisi_pd] typec_wait_ps_change: typec_wait_ps_change!!!-----------
[    2.758682] [USB3][event_work]+
[    2.758684] [USB3][handle_event][handle_event] type: 3
[    2.758686] [USB3][set_vbus_power]set port power 0
[    2.758689] [I/hisi_pd] pd_dpm_report_bc12 : PD_WAKE_UNLOCK
[    2.758692] [I/hisi_pd] pd_dpm_report_bc12 : event (4)
[    2.758694] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[    2.758695] [dwc3_otg_work]+
[    2.758695]  evt = 1
[    2.758697] [dwc3_otg_stop_host]+
[    2.758746] xhci-hcd xhci-hcd.0.auto: remove, state 4
[    2.758757] usb usb2: USB disconnect, device number 1
[    2.759116] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[    2.759127] xhci-hcd xhci-hcd.0.auto: remove, state 4
[    2.759136] usb usb1: USB disconnect, device number 1
[    2.759568] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[    2.759606] [dwc3_otg_stop_host]-
[    2.759607] [dwc3_otg_work]-
[    2.759610] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[    2.759613] [USB3][handle_event]hiusb_status: HOST -> OFF
[    2.759614] [USB3][handle_event][handle_event] type: 0
[    2.775514] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.796705] random: fast init done
[    2.856527] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[    2.856531] [I/hisi_pd] pd_dpm_report_pd_sink_vbus : Sink 5000 mV, 500 mA
[    2.856532] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[    2.856535] [I/hisi_pd] TPC-I:Attached-> SINK
[    2.856536] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=7,+++
[    2.856539] [I/hisi_pd] pd_dpm_set_typec_state = 2
[    2.856541] [I/hisi_pd] pd_dpm_set_cc_orientation cc_orientation =0
[    2.856547] [I/hisi_pd] [TCPC-I]usb_port_attached
[    2.856567] [I/hisi_pd] pd_dpm_report_device_attach 
[    2.881198] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[    2.914234] sd 0:0:0:1: [sdb] Attached SCSI disk
[    2.931666] Alternate GPT is invalid, using primary GPT.
[    2.931677]  sdc: sdc1
[    3.058176]  sdd: sdd1 sdd2 sdd3 sdd4 sdd5 sdd6 sdd7 sdd8 sdd9 sdd10 sdd11 sdd12 sdd13
[    3.063763] sd 0:0:0:2: [sdc] Attached SCSI disk
[    3.083061] [USB3][detect_charger_type]DCD done
[    3.111050] [USB3][detect_charger_type]Primary Detection done
[    3.111052] [USB3][detect_charger_type]Secondary Detection done
[    3.131563] sd 0:0:0:3: [sdd] Attached SCSI disk
[    3.139046] [USB3][detect_charger_type]type: 0
[    3.139050] [I/hisi_pd] pd_dpm_report_bc12 : event (0)
[    3.139052] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[    3.139056] [USB3][handle_event]schedule ret:1, run bc_again_work 8000ms later
[    3.139058] [dwc3_otg_work]+
[    3.139058]  evt = 3
[    3.139060] [dwc3_otg_start_peripheral]+
[    3.139064] [dwc3_otg_start_peripheral]-
[    3.139065] [dwc3_otg_work]-
[    3.139067] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[    3.139070] [USB3][handle_event]hisi usb status: OFF -> DEVICE
[    3.139072] [USB3][event_work]-
[    3.617106] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[    3.617108] [I/hisi_pd] pd_dpm_handle_pe_event  unkonw event 
[    3.673202] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[    3.673204] Pending event is same --> ignore this event 2
[    3.700365] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[    3.708177] mmc1: new SDIO card at address 0001
[    3.758715] wl18xx_driver wl18xx.0.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.758719] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.758721] wlcore: WARNING falling back to default config
[    4.331372] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.483612] wlcore: loaded
[    4.520856] EXT4-fs (sdd10): couldn't mount as ext3 due to feature incompatibilities
[    4.545654] EXT4-fs (sdd10): recovery complete
[    4.550413] EXT4-fs (sdd10): mounted filesystem with ordered data mode. Opts: (null)
[    4.558110] VFS: Mounted root (ext4 filesystem) on device 8:58.
[    4.564315] devtmpfs: mounted
[    4.567513] Freeing unused kernel memory: 1088K
[    4.626079] systemd[1]: System time before build time, advancing clock.

Welcome to ^[[1mDebian GNU/Linux 9 (stretch)^[[0m!

NetworkManager-wait-online.service: Cannot add dependency job, ignoring: Unit NetworkManager-wait-online.service is masked.
[^[[0;32m  OK  ^[[0m] Started Dispatch Password Requests to Console Directory Watch.
[^[[0;32m  OK  ^[[0m] Listening on Journal Socket.
[^[[0;32m  OK  ^[[0m] Listening on Syslog Socket.
[^[[0;32m  OK  ^[[0m] Created slice System Slice.
         Starting Remount Root and Kernel File Systems...
         Starting Load Kernel Modules...
[^[[0;32m  OK  ^[[0m] Created slice system-serial\x2dgetty.slice.
[^[[0;32m  OK  ^[[0m] Created slice system-getty.slice.
[^[[0;32m  OK  ^[[0m] Listening on Journal Audit Socket.
         Mounting Huge Pages File System...
[^[[0;32m  OK  ^[[0m] Listening on Network Service Netlink Socket.
[^[[0;32m  OK  ^[[0m] Reached target Remote File Systems.
[^[[0;32m  OK  ^[[0m] Listening on udev Kernel Socket.
         Starting Set the console keyboard layout...
[^[[0;32m  OK  ^[[0m] Created slice User and Session Slice.
[^[[0;32m  OK  ^[[0m] Reached target Slices.
[^[[0;32m  OK  ^[[0m] Listening on Journal Socket (/dev/log).
         Starting Nameserver information manager...
[^[[0;32m  OK  ^[[0m] Listening on udev Control Socket.
         Starting Journal Service...
[^[[0;32m  OK  ^[[0m] Started Forward Password Requests to Wall Directory Watch.
[^[[0;32m  OK  ^[[0m] Reached target Encrypted Volumes.
         Starting Create Static Device Nodes in /dev...
[^[[0;32m  OK  ^[[0m] Listening on /dev/initctl Compatibility Named Pipe.
         Mounting POSIX Message Queue File System...
         Mounting Debug File System...
[^[[0;32m  OK  ^[[0m] Mounted POSIX Message Queue File System.
[^[[0;32m  OK  ^[[0m] Mounted Debug File System.
[^[[0;32m  OK  ^[[0m] Mounted Huge Pages File System.
[^[[0;32m  OK  ^[[0m] Started Journal Service.
[^[[0;32m  OK  ^[[0m] Started Remount Root and Kernel File Systems.
[^[[0;32m  OK  ^[[0m] Started Load Kernel Modules.
[^[[0;32m  OK  ^[[0m] Started Create Static Device Nodes in /dev.
[^[[0;32m  OK  ^[[0m] Started Nameserver information manager.
         Starting udev Kernel Device Manager...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
[^[[0;32m  OK  ^[[0m] Mounted Configuration File System.
[^[[0;32m  OK  ^[[0m] Started Apply Kernel Variables.
[^[[0;32m  OK  ^[[0m] Started Set the console keyboard layout.
[^[[0;32m  OK  ^[[0m] Started Load/Save Random Seed.
[^[[0;32m  OK  ^[[0m] Started udev Kernel Device Manager.
[    5.054294] systemd-journald[1509]: Received request to flush runtime journal from PID 1
[^[[0;32m  OK  ^[[0m] Reached target Local File Systems (Pre).
         Starting Network Service...
[^[[0;32m  OK  ^[[0m] Started Flush Journal to Persistent Storage.
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Started udev Coldplug all Devices.
[^[[0;32m  OK  ^[[0m] Stopped Network Service.
         Starting Network Service...
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Found device /dev/hvc0.
[^[[0;32m  OK  ^[[0m] Found device KLUBG4G1CE-B0B1 userdata.
[^[[0;32m  OK  ^[[0m] Found device KLUBG4G1CE-B0B1 vendor.
         Activating swap /dev/sdd11...
         Mounting /home...
[^[[0;32m  OK  ^[[0m[    5.272875] A] dding 802812k swStopped Network Service.ap on /dev/sdd11
.  Priority:-1 extents:1 across:802812k SS
[    5.282079] EXT4-fs (sdd13): recovery complete
[    5.282086] EXT4-fs (sdd13): mounted filesystem with ordered data mode. Opts: (null)
         Starting Network Service...
[^[[0;32m  OK  ^[[0m] Mounted /home.
[^[[0;32m  OK  ^[[0m] Activated swap /dev/sdd11.
[^[[0;32m  OK  ^[[0m] Reached target Swap.
[^[[0;32m  OK  ^[[0m] Reached target Local File Systems.
         Starting Raise network interfaces...
         Starting Create Volatile Files and Directories...
         Starting Set console font and keymap...
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Started Create Volatile Files and Directories.
[^[[0;32m  OK  ^[[0m] Started Set console font and keymap.
[^[[0;32m  OK  ^[[0m] Stopped Network Service.
         Starting Network Service...
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[^[[0;32m  OK  ^[[0m] Started Update UTMP about System Boot/Shutdown.
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Stopped Network Service.
         Starting Network Service...
[^[[0;32m  OK  ^[[0m] Started Raise network interfaces.
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Stopped Network Service.
[^[[0;1;31mFAILED^[[0m] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[^[[0;32m  OK  ^[[0m] Started Network Time Synchronization.
[^[[0;32m  OK  ^[[0m] Reached target System Time Synchronized.
[^[[0;32m  OK  ^[[0m] Reached target System Initialization.
[^[[0;32m  OK  ^[[0m] Listening on ACPID Listen Socket.
[^[[0;32m  OK  ^[[0m] Started Daily Cleanup of Temporary Directories.
[^[[0;32m  OK  ^[[0m] Listening on D-Bus System Message Bus Socket.
[^[[0;32m  OK  ^[[0m] Started ACPI Events Check.
[^[[0;32m  OK  ^[[0m] Reached target Paths.
[^[[0;32m  OK  ^[[0m] Listening on OpenBSD Secure Shell server socket.
[^[[0;32m  OK  ^[[0m] Reached target Sockets.
[^[[0;32m  OK  ^[[0m] Reached target Basic System.
         Starting System Logging Service...
[^[[0;32m  OK  ^[[0m] Started Regular background program processing daemon.
         Starting Provide limited super user privileges to specific users...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting Restore /etc/resolv.conf i…fore the ppp link was shut down...
         Starting RealtimeKit Scheduling Policy Service...
[^[[0;32m  OK  ^[[0m] Started ACPI event daemon.
         Starting Login Service...
[^[[0;32m  OK  ^[[0m] Started D-Bus System Message Bus.
[^[[0;32m  OK  ^[[0m] Started RealtimeKit Scheduling Policy Service.
         Starting WPA supplicant...
         Starting Network Manager...
         Starting Modem Manager...
         Starting Initialize hardware monitoring sensors...
[^[[0;32m  OK  ^[[0m] Started System Logging Service.
[^[[0;32m  OK  ^[[0m] Started Provide limited super user privileges to specific users.
[^[[0;32m  OK  ^[[0m] Started Restore /etc/resolv.conf if…before the ppp link was shut down.
[^[[0;32m  OK  ^[[0m] Started Initialize hardware monitoring sensors.
[^[[0;32m  OK  ^[[0m] Started WPA supplicant.
[^[[0;32m  OK  ^[[0m] Started LSB: Load kernel modules needed to enable cpufreq scaling.
[^[[0;32m  OK  ^[[0m] Started Login Service.
         Starting Authorization Manager...
         Starting LSB: set CPUFreq kernel parameters...
[^[[0;32m  OK  ^[[0m] Started LSB: set CPUFreq kernel parameters.
[^[[0;32m  OK  ^[[0m] Started Authorization Manager.
[^[[0;32m  OK  ^[[0m] Started Network Manager.
         Starting Network Manager Script Dispatcher Service...
[^[[0;32m  OK  ^[[0m] Reached target Network.
         Starting Network Name Resolution...
         Starting Permit User Sessions...
[^[[0;32m  OK  ^[[0m] Reached target Network is Online.
         Starting LSB: Advanced IEEE 802.11 management daemon...
[^[[0;32m  OK  ^[[0m] Started Daily apt download activities.
[^[[0;32m  OK  ^[[0m] Started Daily apt upgrade and clean activities.
[^[[0;32m  OK  ^[[0m] Reached target Timers.
         Starting LSB: exim Mail Transport Agent...
         Starting /etc/rc.local Compatibility...
[^[[0;32m  OK  ^[[0m] Started Permit User Sessions.
[^[[0;32m  OK  ^[[0m] Started LSB: Advanced IEEE 802.11 management daemon.
[^[[0;32m  OK  ^[[0m] Started /etc/rc.local Compatibility.
[^[[0;32m  OK  ^[[0m] Started Modem Manager.
[^[[0;32m  OK  ^[[0m] Started Network Manager Script Dispatcher Service.
         Starting Hostname Service...
[^[[0;32m  OK  ^[[0m] Started Getty on tty1.
[^[[0;32m  OK  ^[[0m] Started Serial Getty on hvc0.
[^[[0;32m  OK  ^[[0m] Reached target Login Prompts.
[^[[0;32m  OK  ^[[0m] Started Hostname Service.
[^[[0;32m  OK  ^[[0m] Started Network Name Resolution.
[    6.333185] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    6.380747] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[^[[0;32m  OK  ^[[0m] Started LSB: exim Mail Transport Agent.
[^[[0;32m  OK  ^[[0m] Reached target Multi-User System.
[^[[0;32m  OK  ^[[0m] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[^[[0;32m  OK  ^[[0m] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 linaro-developer hvc0

linaro-developer login: root (automatic login)

Last login: Mon Sep 11 23:44:40 UTC 2017 on hvc0
Linux linaro-developer 4.12.0-linaro-hikey960+ #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017 aarch64

HiKey 960
root@linaro-developer:~# [    6.821000] wlcore: PHY firmware version: Rev 8.2.0.0.236
[    6.928961] wlcore: firmware booted (Rev 8.9.0.0.69)
[    6.953637] wlcore: down
[    7.085147] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[    7.129006] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[    7.538572] wlcore: PHY firmware version: Rev 8.2.0.0.236
[    7.648995] wlcore: firmware booted (Rev 8.9.0.0.69)
[    8.607090] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[    8.612841] [I/hisi_pd] pd_dpm_handle_pe_event  unkonw event 
[    8.668303] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[    8.674037] Pending event is same --> ignore this event 2
[    8.702064] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[   11.247098] [USB3][bc_again_work]+
[   11.250406] [USB3][bc_again_work]charger_type is  SDP, start bc_again_work
[   11.257373] [dwc3_otg_work]+
[   11.257373]  evt = 4
[   11.257383] [dwc3_otg_stop_peripheral]+
[   11.266467] [dwc3_otg_stop_peripheral]-
[   11.270372] [dwc3_otg_work]-

root@linaro-developer:~# [   11.583056] [USB3][detect_charger_type]DCD done
[   11.615057] [USB3][detect_charger_type]Primary Detection done
[   11.620710] [USB3][detect_charger_type]Secondary Detection done
[   11.651059] [USB3][detect_charger_type]type: 0
[   11.655411] [I/hisi_pd] pd_dpm_report_bc12 : event (0)
[   11.660631] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[   11.668444] [dwc3_otg_work]+
[   11.668444]  evt = 3
[   11.668446] [dwc3_otg_start_peripheral]+
[   11.677610] [dwc3_otg_start_peripheral]-
[   11.681615] [dwc3_otg_work]-
[   11.684557] [USB3][bc_again_work]-
[   11.926347] wlcore: down
[   12.001049] wlan0: authenticate with 70:3a:cb:23:d7:dc
[   12.016926] wlan0: send auth to 70:3a:cb:23:d7:dc (try 1/3)
[   12.055569] wlan0: authenticated
[   12.063081] wlan0: associate with 70:3a:cb:23:d7:dc (try 1/3)
[   12.073148] wlan0: RX AssocResp from 70:3a:cb:23:d7:dc (capab=0x11 status=0 aid=2)
[   12.092685] wlan0: associated
[   12.323140] wlcore: Association completed.

root@linaro-developer:~# xl inf[   13.613355] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[   13.619110] [I/hisi_pd] pd_dpm_handle_pe_event  unkonw event o
[   13.675194] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[   13.680929] Pending event is same --> ignore this event 2
[   13.708391] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++

host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Wed Aug 16 18:07:27 2017 +0100 git:d0291f3391
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Mon Sep 11 23:43:13 UTC 2017
build_id               : ce6199b9fac01491da92f8890af4dcf8c85a430e
xend_config_format     : 4
root@linaro-developer:~# /root/l[   18.414184] [I/hisi_pd] PE:TYPE-C Only Charger!
[   18.418716] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[   18.424621] [I/hisi_pd] pd_dpm_report_pd_sinki_vbus : Sink 5000 mV, 500 mA
[   18.431557] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[   18.439363] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=8,+++
\avepatch_test.pl
Have 37 test-cases
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch list)' .. ID                                     | status
----------------------------------------+------------
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch list)' .. ID                                     | status
----------------------------------------+------------
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Wed Aug 16 18:07:27 2017 +0100 git:d0291f3391
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Mon Sep 11 23:43:13 UTC 2017
build_id               : ce6199b9fac01491da92f8890af4dcf8c85a430e
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Wed Aug 16 18:07:27 2017 +0100 git:d0291f3391
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Mon Sep 11 23:43:13 UTC 2017
build_id               : ce6199b9fac01491da92f8890af4dcf8c85a430e
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch revert xen_hello_world)' ..Failed to get status of xen_hello_world.
Error 2: No such file or directory
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch load xen_hello_world.livepatch)' ..Uploading xen_hello_world.livepatch... (XEN) Xen BUG at page_alloc.c:738
(XEN) ----[ Xen-4.10-unstable  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     000000000021fcb4 page_alloc.c#alloc_heap_pages+0x5c8/0x6e0
(XEN) LR:     000000000021fb08
(XEN) SP:     00008000bf1d79f0
(XEN) CPSR:   00000249 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 09010219ffdb2387  X1: 0000800000000000  X2: 00008000b98b3000
(XEN)      X3: 00000000b98b3000  X4: ffffffffffffffff  X5: 0000000000000000
(XEN)      X6: 0000000000000014  X7: 00000000002e3e48  X8: 00000000000017c0
(XEN)      X9: 000000000007ffff X10: 00000000002e3da8 X11: 0000000000000000
(XEN)     X12: 0000000000000000 X13: 0000000802896680 X14: 00004c9800000000
(XEN)     X15: 000000000000051b X16: 0000000000000023 X17: 0000ffffa559d088
(XEN)     X18: 0000000000000000 X19: 0000000802896728 X20: 000000000007ffff
(XEN)     X21: 0000000000000000 X22: 0000000802896728 X23: 0000000802896728
(XEN)     X24: 0000000802896760 X25: 0000000000000000 X26: 0000000000000000
(XEN)     X27: c2c2c2c2c2c2c2c2 X28: 6db6db6db6db6db7  FP: 00008000bf1d79f0
(XEN) 
(XEN)   VTCR_EL2: 80023558
(XEN)  VTTBR_EL2: 00010000bff30000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 000000008038663f
(XEN)  TTBR0_EL2: 00000000bff0e000
(XEN) 
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000e82b10
(XEN)    FAR_EL2: ffff000008000f00
(XEN) 
(XEN) Xen stack trace from sp=00008000bf1d79f0:
(XEN)    00008000bf1d7a70 000000000021fe70 0000000000000000 0000000000000000
(XEN)    0000000000000000 000000000029ae18 0000000000000024 6db6db6db6db6db7
(XEN)    fffffff800000000 0000000000000001 0000000000000005 00000000ffffffff
(XEN)    0000000000000005 000000000029ae18 00008000bf1d7ab0 000000000023bca4
(XEN)    00008000bf1d7ab0 000000000023bce4 0000000000000000 0000000000000003
(XEN)    00008000b87c3f20 000000000029ae18 000000000029b000 000000000000001d
(XEN)    00008000bf1d7b00 000000000023be20 0000000000000024 0000000000000000
(XEN)    00008000bfe9e440 0000000040015000 00008000b87c3e80 00008000bfe9e468
(XEN)    0000000000000003 00008000bfe9e488 00008000bf1d7b10 0000000000217524
(XEN)    00008000bf1d7c70 00000000002367a4 0000000000000000 0000000000000000
(XEN)    0000ffffa5757004 0000000000322c98 00000000002991a0 00000000002e3000
(XEN)    0000000000000124 000000000000001d ffff000008a72000 ffff8000a7478d00
(XEN)    000000000031c020 00000000000000a0 0000000000000000 0000000000295bb8
(XEN)    0000000000000000 ffff8000a7478d00 00008000bf1d7bc0 00008000bfe9e570
(XEN)    0000000000005720 0000000040015000 00008000bfe9e600 00008000bfe9ea90
(XEN)    0000000000000039 00008000bfe9ea20 00008000bfe9ea40 0000000000000021
(XEN)    6c6c65685f6e6578 00646c726f775f6f 00008000bf1d7c70 0000000000235ee8
(XEN)    00008000bf1d7eb0 00008000bf1d7f30 0000ffffa5757004 0000000020000145
(XEN)    000000005a000ea1 0000fffffdebef70 0000000000000124 000000000000001d
(XEN)    00008000bf1d7c70 0000000000235f58 0000000000000000 0000ffffa5757004
(XEN)    00008000bf1d7dd0 000000000025d728 00008000bf1d7eb0 00008000bf1d7f30
(XEN)    000000005a000ea1 0000000020000145 000000005a000ea1 0000fffffdebef70
(XEN)    0000000000000124 000000000000001d ffff000008a72000 ffff8000a7478d00
(XEN)    0000000000321c08 0000000000254ae8 00008000bf1d7d50 0000000000251b14
(XEN)    00008000bf1dbcd0 00008000bf1de000 00008000bf1dee70 0000000000000004
(XEN)    00008000bf1dbce8 00000000000000a0 0000000000000136 0000000000001d4c
(XEN)    00008000bf1d7d50 0000000000251c18 0000000000000000 0000000f0000001b
(XEN)    0000000000000000 0000ffffa577a004 0000000000000010 0000000000005720
(XEN)    0000ffffa5758004 0000000000000000 ffffffffffffffff ffff000000000000
(XEN)    0000000000000000 0000000000100000 4010040140100401 4010000000000000
(XEN)    4010040140100401 4010040140100401 0000aaaadb240010 0000aaaadb22eb50
(XEN)    00008000bf1d7e20 000000000025fd1c 0000000000000ea1 00008000bf1d7eb0
(XEN)    00008000bf1d7e70 0000000000252124 0000000000321c00 0000000000007003
(XEN)    00008000bf1d7fb8 00000000200001c5 ffff8000a74dbd50 000000000026739c
(XEN)    ffff8000b01b95e8 ffff8000ac8a3400 00008000bf1d7fb8 0000000020000145
(XEN)    000000005a000ea1 0000fffffdebef70 0000000000000124 000000000000001d
(XEN)    ffff000008a72000 ffff8000a7478d00 ffff8000b01fb800 0000000000000000
(XEN)    ffff8000baf14db0 000000000026746c ffff8000b01fb800 0000000000007003
(XEN)    0000ffffa5757004 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 ffff8000a74dbe00 0000000000000000
(XEN) Xen call trace:
(XEN)    [<000000000021fcb4>] page_alloc.c#alloc_heap_pages+0x5c8/0x6e0 (PC)
(XEN)    [<000000000021fb08>] page_alloc.c#alloc_heap_pages+0x41c/0x6e0 (LR)
(XEN)    [<000000000021fe70>] alloc_domheap_pages+0xa4/0x150
(XEN)    [<000000000023bce4>] vmap.c#vmalloc_type+0xa4/0x1b8
(XEN)    [<000000000023be20>] vmalloc_xen+0x10/0x18
(XEN)    [<0000000000217524>] livepatch_op+0x2c0/0x14a0
(XEN)    [<00000000002367a4>] do_sysctl+0x8ec/0xa30
(XEN)    [<000000000025d728>] traps.c#do_trap_hypercall+0x6c/0x164
(XEN)    [<000000000025fd1c>] do_trap_guest_sync+0xd50/0x1bd4
(XEN)    [<000000000026739c>] entry.o#guest_sync+0x9c/0xcc
(XEN) 
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at page_alloc.c:738
(XEN) ****************************************
(XEN) 
(XEN) Reboot in five seconds...

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-11 23:55 CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738 Konrad Rzeszutek Wilk
@ 2017-09-12  0:45 ` Boris Ostrovsky
  2017-09-13  0:01   ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-12  0:45 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, xen-devel; +Cc: julien.grall, sstabellini



On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
> Hey,
> 
> I've only been able to reproduce this on ARM64 (trying right now ARM32
> as well), and not on x86.
> 
> If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
> enable it and try to load a livepatch it blows up in page_alloc.c:738
> 
> This is with origin/staging (d0291f3391)

Can you still reproduce this if you revert 307c3be?


-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-12  0:45 ` Boris Ostrovsky
@ 2017-09-13  0:01   ` Konrad Rzeszutek Wilk
  2017-09-13  1:19     ` Boris Ostrovsky
  2017-09-13  7:56     ` Dario Faggioli
  0 siblings, 2 replies; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-13  0:01 UTC (permalink / raw)
  To: Boris Ostrovsky, dario.faggioli; +Cc: xen-devel, julien.grall, sstabellini

On Mon, Sep 11, 2017 at 08:45:02PM -0400, Boris Ostrovsky wrote:
> 
> 
> On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
> > Hey,
> > 
> > I've only been able to reproduce this on ARM64 (trying right now ARM32
> > as well), and not on x86.
> > 
> > If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
> > enable it and try to load a livepatch it blows up in page_alloc.c:738
> > 
> > This is with origin/staging (d0291f3391)
> 
> Can you still reproduce this if you revert 307c3be?

Sadly yes - it still crashes. I didn't capture the serial output.

I honestly think the issue is that on ARM64 the "sleep" loop does not
wake up as often as on x86 (CC-ing Dariof who I believe observed this
with Credit2 and the wakeup.. something) - maybe he remembers the
details. Anyhow my theory is that the pages are not scrubbed at all
when they go in the idle loop as once it goes to sleep - it stays there.

Ah, see commit 05c52278a7c92bc753d9fe32017e4961012b9f23 

Maybe this is related?
> 
> 
> -boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13  0:01   ` Konrad Rzeszutek Wilk
@ 2017-09-13  1:19     ` Boris Ostrovsky
  2017-09-13 15:32       ` Konrad Rzeszutek Wilk
  2017-09-13  7:56     ` Dario Faggioli
  1 sibling, 1 reply; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-13  1:19 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, dario.faggioli
  Cc: xen-devel, julien.grall, sstabellini



On 09/12/2017 08:01 PM, Konrad Rzeszutek Wilk wrote:
> On Mon, Sep 11, 2017 at 08:45:02PM -0400, Boris Ostrovsky wrote:
>>
>>
>> On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
>>> Hey,
>>>
>>> I've only been able to reproduce this on ARM64 (trying right now ARM32
>>> as well), and not on x86.
>>>
>>> If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
>>> enable it and try to load a livepatch it blows up in page_alloc.c:738
>>>
>>> This is with origin/staging (d0291f3391)
>>
>> Can you still reproduce this if you revert 307c3be?
> 
> Sadly yes - it still crashes. I didn't capture the serial output.
> 
> I honestly think the issue is that on ARM64 the "sleep" loop does not
> wake up as often as on x86 (CC-ing Dariof who I believe observed this
> with Credit2 and the wakeup.. something) - maybe he remembers the
> details. Anyhow my theory is that the pages are not scrubbed at all
> when they go in the idle loop as once it goes to sleep - it stays there.


There is no (well, should not be) any timing dependencies in how/whether 
pages are scrubbed. If a page doesn't get scrubbed because someone 
didn't wake up then it should be scrubbed in alloc_heap_pages(). So in 
this case the page is thought to be clean (_PGC_need_scrub is not set), 
but it is not.

Have you tried running a guest (or two), rebooting in a loop?

Another thing to try is to set need_scrub to true in free_heap_pages().

-boris


> 
> Ah, see commit 05c52278a7c92bc753d9fe32017e4961012b9f23
> 
> Maybe this is related?
>>
>>
>> -boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13  0:01   ` Konrad Rzeszutek Wilk
  2017-09-13  1:19     ` Boris Ostrovsky
@ 2017-09-13  7:56     ` Dario Faggioli
  1 sibling, 0 replies; 15+ messages in thread
From: Dario Faggioli @ 2017-09-13  7:56 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Boris Ostrovsky
  Cc: xen-devel, julien.grall, sstabellini


[-- Attachment #1.1: Type: text/plain, Size: 1691 bytes --]

On Tue, 2017-09-12 at 20:01 -0400, Konrad Rzeszutek Wilk wrote:
> > On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
> > > I've only been able to reproduce this on ARM64 (trying right now
> > > ARM32
> > > as well), and not on x86.
> > > 
> > > If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But
> > > if
> > > enable it and try to load a livepatch it blows up in
> > > page_alloc.c:738
> > > 
> I honestly think the issue is that on ARM64 the "sleep" loop does not
> wake up as often as on x86 (CC-ing Dariof who I believe observed this
> with Credit2 and the wakeup.. something) - maybe he remembers the
> details. Anyhow my theory is that the pages are not scrubbed at all
> when they go in the idle loop as once it goes to sleep - it stays
> there.
> 
> Ah, see commit 05c52278a7c92bc753d9fe32017e4961012b9f23 
> 
> Maybe this is related?
>
As Boris is saying, it really should not. In fact, having pages that
needs scrubbing _prevents_ the CPU from becoming idle (and stopping the
tick, if any).

What we observed is that x86 periodically wakes up, even on a totally
idle system, while ARM doesn't. But this should not be a problem as, in
both cases, if there's pages to scrub, the CPU just won't go to sleep.

If frequent wakeups is what causes the scrubbing to work ok on the x86,
and not on ARM, it IMO means that there's something like a race
somewhere.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13  1:19     ` Boris Ostrovsky
@ 2017-09-13 15:32       ` Konrad Rzeszutek Wilk
  2017-09-13 18:05         ` Boris Ostrovsky
  0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-13 15:32 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: dario.faggioli, sstabellini, julien.grall, xen-devel

On Tue, Sep 12, 2017 at 09:19:23PM -0400, Boris Ostrovsky wrote:
> 
> 
> On 09/12/2017 08:01 PM, Konrad Rzeszutek Wilk wrote:
> > On Mon, Sep 11, 2017 at 08:45:02PM -0400, Boris Ostrovsky wrote:
> > > 
> > > 
> > > On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
> > > > Hey,
> > > > 
> > > > I've only been able to reproduce this on ARM64 (trying right now ARM32
> > > > as well), and not on x86.
> > > > 
> > > > If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
> > > > enable it and try to load a livepatch it blows up in page_alloc.c:738
> > > > 
> > > > This is with origin/staging (d0291f3391)
> > > 
> > > Can you still reproduce this if you revert 307c3be?
> > 
> > Sadly yes - it still crashes. I didn't capture the serial output.
> > 
> > I honestly think the issue is that on ARM64 the "sleep" loop does not
> > wake up as often as on x86 (CC-ing Dariof who I believe observed this
> > with Credit2 and the wakeup.. something) - maybe he remembers the
> > details. Anyhow my theory is that the pages are not scrubbed at all
> > when they go in the idle loop as once it goes to sleep - it stays there.
> 
> 
> There is no (well, should not be) any timing dependencies in how/whether
> pages are scrubbed. If a page doesn't get scrubbed because someone didn't
> wake up then it should be scrubbed in alloc_heap_pages(). So in this case
> the page is thought to be clean (_PGC_need_scrub is not set), but it is not.
> 
> Have you tried running a guest (or two), rebooting in a loop?

No. I just cold-booted it and tried to livepatch.
> 
> Another thing to try is to set need_scrub to true in free_heap_pages().

Magic!

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index dbad1e1ca0..9303eb4517 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1308,6 +1308,7 @@ static void free_heap_pages(
     ASSERT(node >= 0);
 
     spin_lock(&heap_lock);
+    need_scrub = true;
 
     for ( i = 0; i < (1 << order); i++ )
     {

Fixes it ! :-)


> 
> -boris
> 
> 
> > 
> > Ah, see commit 05c52278a7c92bc753d9fe32017e4961012b9f23
> > 
> > Maybe this is related?
> > > 
> > > 
> > > -boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13 15:32       ` Konrad Rzeszutek Wilk
@ 2017-09-13 18:05         ` Boris Ostrovsky
  2017-09-13 18:25           ` Julien Grall
  0 siblings, 1 reply; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-13 18:05 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: dario.faggioli, sstabellini, julien.grall, xen-devel

On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
> On Tue, Sep 12, 2017 at 09:19:23PM -0400, Boris Ostrovsky wrote:
>>
>> On 09/12/2017 08:01 PM, Konrad Rzeszutek Wilk wrote:
>>> On Mon, Sep 11, 2017 at 08:45:02PM -0400, Boris Ostrovsky wrote:
>>>>
>>>> On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
>>>>> Hey,
>>>>>
>>>>> I've only been able to reproduce this on ARM64 (trying right now ARM32
>>>>> as well), and not on x86.
>>>>>
>>>>> If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But if
>>>>> enable it and try to load a livepatch it blows up in page_alloc.c:738
>>>>>
>>>>> This is with origin/staging (d0291f3391)
>>>> Can you still reproduce this if you revert 307c3be?
>>> Sadly yes - it still crashes. I didn't capture the serial output.
>>>
>>> I honestly think the issue is that on ARM64 the "sleep" loop does not
>>> wake up as often as on x86 (CC-ing Dariof who I believe observed this
>>> with Credit2 and the wakeup.. something) - maybe he remembers the
>>> details. Anyhow my theory is that the pages are not scrubbed at all
>>> when they go in the idle loop as once it goes to sleep - it stays there.
>>
>> There is no (well, should not be) any timing dependencies in how/whether
>> pages are scrubbed. If a page doesn't get scrubbed because someone didn't
>> wake up then it should be scrubbed in alloc_heap_pages(). So in this case
>> the page is thought to be clean (_PGC_need_scrub is not set), but it is not.
>>
>> Have you tried running a guest (or two), rebooting in a loop?
> No. I just cold-booted it and tried to livepatch.
>> Another thing to try is to set need_scrub to true in free_heap_pages().
> Magic!
>
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index dbad1e1ca0..9303eb4517 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -1308,6 +1308,7 @@ static void free_heap_pages(
>      ASSERT(node >= 0);
>  
>      spin_lock(&heap_lock);
> +    need_scrub = true;
>  
>      for ( i = 0; i < (1 << order); i++ )
>      {
>
> Fixes it ! :-)


Well, that's not a fix. This eliminates the case that something in
ARM-specific code (which I haven't tested) accidentally clears
_PGC_need_scrub.

OK, I think I know what the problem is. You are using
CONFIG_SEPARATE_XENHEAP, are you?


-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13 18:05         ` Boris Ostrovsky
@ 2017-09-13 18:25           ` Julien Grall
  2017-09-13 18:49             ` Boris Ostrovsky
  0 siblings, 1 reply; 15+ messages in thread
From: Julien Grall @ 2017-09-13 18:25 UTC (permalink / raw)
  To: Boris Ostrovsky, Konrad Rzeszutek Wilk
  Cc: dario.faggioli, sstabellini, xen-devel

Hi,

On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
> Well, that's not a fix. This eliminates the case that something in
> ARM-specific code (which I haven't tested) accidentally clears
> _PGC_need_scrub.
> 
> OK, I think I know what the problem is. You are using
> CONFIG_SEPARATE_XENHEAP, are you?

It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.

Note that Arm32 is using separate heap.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13 18:25           ` Julien Grall
@ 2017-09-13 18:49             ` Boris Ostrovsky
  2017-09-14 21:26               ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-13 18:49 UTC (permalink / raw)
  To: Julien Grall, Konrad Rzeszutek Wilk
  Cc: dario.faggioli, sstabellini, xen-devel

On 09/13/2017 02:25 PM, Julien Grall wrote:
> Hi,
> 
> On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
>> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
>> Well, that's not a fix. This eliminates the case that something in
>> ARM-specific code (which I haven't tested) accidentally clears
>> _PGC_need_scrub.
>>
>> OK, I think I know what the problem is. You are using
>> CONFIG_SEPARATE_XENHEAP, are you?
> 
> It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.
> 
> Note that Arm32 is using separate heap.


For separate heap we will need


diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index b5243fc..9f62ea2 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2059,7 +2059,7 @@ void free_xenheap_pages(void *v, unsigned int order)

     memguard_guard_range(v, 1 << (order + PAGE_SHIFT));

-    free_heap_pages(virt_to_page(v), order, false);
+    free_heap_pages(virt_to_page(v), order, scrub_debug);
 }

 #else


If that doesn't help then there are two cases where free_heap_pages is
called with 'false' --- one in alloc_domheap_pages() and the other in
online_page().

Setting one and then the other would further narrow it down.


-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-13 18:49             ` Boris Ostrovsky
@ 2017-09-14 21:26               ` Konrad Rzeszutek Wilk
  2017-09-14 21:39                 ` Boris Ostrovsky
  0 siblings, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-14 21:26 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: Julien Grall, sstabellini, dario.faggioli, xen-devel

On Wed, Sep 13, 2017 at 02:49:41PM -0400, Boris Ostrovsky wrote:
> On 09/13/2017 02:25 PM, Julien Grall wrote:
> > Hi,
> > 
> > On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
> >> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
> >> Well, that's not a fix. This eliminates the case that something in
> >> ARM-specific code (which I haven't tested) accidentally clears
> >> _PGC_need_scrub.
> >>
> >> OK, I think I know what the problem is. You are using
> >> CONFIG_SEPARATE_XENHEAP, are you?
> > 
> > It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.
> > 
> > Note that Arm32 is using separate heap.
> 
> 
> For separate heap we will need
> 
> 
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index b5243fc..9f62ea2 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -2059,7 +2059,7 @@ void free_xenheap_pages(void *v, unsigned int order)
> 
>      memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
> 
> -    free_heap_pages(virt_to_page(v), order, false);
> +    free_heap_pages(virt_to_page(v), order, scrub_debug);
>  }
> 
>  #else
> 
> 
> If that doesn't help then there are two cases where free_heap_pages is
> called with 'false' --- one in alloc_domheap_pages() and the other in
> online_page().
> 
> Setting one and then the other would further narrow it down.

It went further. See the serial log:

root@linaro-developer:~# xl info
host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
root@linaro-developer:~# cd /home/xen.git
root@linaro-developer:/home/xen.git# git diff .
^[[1mdiff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c^[[m^[[m
^[[1mindex b5243fca3c..9f62ea257d 100644^[[m^[[m
^[[1m--- a/xen/common/page_alloc.c^[[m^[[m
^[[1m+++ b/xen/common/page_alloc.c^[[m^[[m
^[[36m@@ -2059,7 +2059,7 @@^[[m ^[[mvoid free_xenheap_pages(void *v, unsigned int order)^[[m^[[m
 ^[[m^[[m
     memguard_guard_range(v, 1 << (order + PAGE_SHIFT));^[[m^[[m
 ^[[m^[[m
^[[31m-    free_heap_pages(virt_to_page(v), order, false);^[[m^[[m
^[[32m+^[[m^[[32m    free_heap_pages(virt_to_page(v), order, scrub_debug);^[[m^[[m
 }^[[m^[[m
 ^[[m^[[m
 #else^[[m^[[m
^[[Kroot@linaro-developer:/home/xen.git# /r\b\b^[[Kcd /root
root@linaro-developer:~# ./live\apatch_test.pl
Have 37 test-cases
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch list)' .. ID                                     | status
----------------------------------------+------------
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch list)' .. ID                                     | status
----------------------------------------+------------
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch revert xen_hello_world)' ..Failed to get status of xen_hello_world.
Error 2: No such file or directory
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch load xen_hello_world.livepatch)' ..Uploading xen_hello_world.livepatch... (XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .note.gnu.build-id at 0000000000a04000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .text at 0000000000a02000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata at 0000000000a04028
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .altinstructions at 0000000000a04054
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .altinstr_replacement at 0000000000a04060
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata.str1.8 at 0000000000a04068
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata.str at 0000000000a040e8
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .bug_frames.1 at 0000000000a040fc
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.depends at 0000000000a04110
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.funcs at 0000000000a04138
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.hooks.load at 0000000000a03000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.hooks.unload at 0000000000a03010
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa02000 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04060 (.altinstr_replacement)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04068 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa02000 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04054 (.altinstructions)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa04060 (.altinstr_replacement)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04068 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa02010 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: apply_hook => 0xa02010 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: revert_hook => 0xa0202c (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: hi_func => 0xa02048 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: check_fnc => 0xa0207c (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa040fc (.bug_frames.1)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: __func__.7462 => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: __func__.7466 => 0xa04030 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: hello_world_patch_this_fnc => 0xa04040 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: cnt => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04110 (.livepatch.depends)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04078 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: .L2\x021 => 0xa040e8 (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: .L3\x021 => 0xa040fa (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04000 (.note.gnu.build-id)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04054 (.altinstructions)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa040e8 (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa040fc (.bug_frames.1)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04110 (.livepatch.depends)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_load_data_hi_func => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: xen_hello_world => 0xa02000 (.text)
(XEN) livepatch_elf.c:314: livepatch: xen_hello_world: Undefined symbol resolved: xen_extra_version => 0x23aac8
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_check_fnc => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_load_data_apply_hook => 0xa03008 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_revert_hook => 0xa03020 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:314: livepatch: xen_hello_world: Undefined symbol resolved: printk => 0x248a7c
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_xen_hello_world => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_hi_func => 0xa03018 (.livepatch.hooks.unload)
(XEN) alternatives: Patching with alt table 0000000000a04054 -> 0000000000a04060
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol apply_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol revert_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol hi_func
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol check_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol __func__.7462
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol __func__.7466
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol hello_world_patch_this_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol cnt
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_load_data_hi_func
(XEN) livepatch.c:852: livepatch: xen_hello_world: overriding global symbol xen_hello_world
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_check_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_load_data_apply_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_revert_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new global symbol livepatch_xen_hello_world
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_hi_func
completed(XEN) livepatch.c:1343: livepatch: xen_hello_world: timeout is 30000000ns

(XEN) livepatch.c:1450: livepatch: xen_hello_world: CPU0 - IPIing the other 7 CPUs
Applying xen_hello_world... (XEN) livepatch: xen_hello_world: Applying 1 functions
(XEN) hi_func: Hi! (called 1 times)
(XEN) Hook executing.
(XEN) livepatch: xen_hello_world finished APPLY with rc=0
completed
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch load xen_hello_world.livepatch)' ..Uploading xen_hello_world.livepatch... failed
Error 17: File exists
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch list)' .. ID                                     | status
----------------------------------------+------------
xen_hello_world                         | APPLIED
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : Hello World
xen_version            : 4.10Hello World
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch revert xen_hello_world)' ..(XEN) livepatch.c:1343: livepatch: xen_hello_world: timeout is 30000000ns
Reverting xen_hello_world... (XEN) livepatch.c:1450: livepatch: xen_hello_world: CPU1 - IPIing the other 7 CPUs
(XEN) livepatch: xen_hello_world: Reverting
(XEN) check_fnc: Hi func called 1 times
(XEN) hi_func: Hi! (called 2 times)
(XEN) Hook unloaded.
(XEN) livepatch: xen_hello_world finished REVERT with rc=0
completed
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch unload xen_hello_world)' ..Unloading xen_hello_world... completed
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch unload xen_hello_world)' ..Failed to get status of xen_hello_world.
Error 2: No such file or directory
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : -unstable
xen_version            : 4.10-unstable
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch load xen_hello_world.livepatch)' ..Uploading xen_hello_world.livepatch... (XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .note.gnu.build-id at 0000000000a04000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .text at 0000000000a02000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata at 0000000000a04028
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .altinstructions at 0000000000a04054
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .altinstr_replacement at 0000000000a04060
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata.str1.8 at 0000000000a04068
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .rodata.str at 0000000000a040e8
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .bug_frames.1 at 0000000000a040fc
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.depends at 0000000000a04110
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.funcs at 0000000000a04138
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.hooks.load at 0000000000a03000
(XEN) livepatch.c:422: livepatch: xen_hello_world: Loaded .livepatch.hooks.unload at 0000000000a03010
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa02000 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04060 (.altinstr_replacement)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04068 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa02000 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04054 (.altinstructions)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa04060 (.altinstr_replacement)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04068 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $x => 0xa02010 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: apply_hook => 0xa02010 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: revert_hook => 0xa0202c (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: hi_func => 0xa02048 (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: check_fnc => 0xa0207c (.text)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa040fc (.bug_frames.1)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: __func__.7462 => 0xa04028 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: __func__.7466 => 0xa04030 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: hello_world_patch_this_fnc => 0xa04040 (.rodata)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: cnt => 0xa03028 (.bss)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04110 (.livepatch.depends)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: $d => 0xa04078 (.rodata.str1.8)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: .L2\x021 => 0xa040e8 (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: .L3\x021 => 0xa040fa (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04000 (.note.gnu.build-id)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04054 (.altinstructions)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa040e8 (.rodata.str)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa040fc (.bug_frames.1)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04110 (.livepatch.depends)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved:  => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_load_data_hi_func => 0xa03000 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: xen_hello_world => 0xa02000 (.text)
(XEN) livepatch_elf.c:314: livepatch: xen_hello_world: Undefined symbol resolved: xen_extra_version => 0x23aac8
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_check_fnc => 0xa03010 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_load_data_apply_hook => 0xa03008 (.livepatch.hooks.load)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_revert_hook => 0xa03020 (.livepatch.hooks.unload)
(XEN) livepatch_elf.c:314: livepatch: xen_hello_world: Undefined symbol resolved: printk => 0x248a7c
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_xen_hello_world => 0xa04138 (.livepatch.funcs)
(XEN) livepatch_elf.c:343: livepatch: xen_hello_world: Symbol resolved: livepatch_unload_data_hi_func => 0xa03018 (.livepatch.hooks.unload)
(XEN) alternatives: Patching with alt table 0000000000a04054 -> 0000000000a04060
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol apply_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol revert_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol hi_func
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol check_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol __func__.7462
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol __func__.7466
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol hello_world_patch_this_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol cnt
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_load_data_hi_func
(XEN) livepatch.c:852: livepatch: xen_hello_world: overriding global symbol xen_hello_world
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_check_fnc
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_load_data_apply_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_revert_hook
(XEN) livepatch.c:845: livepatch: xen_hello_world: new global symbol livepatch_xen_hello_world
(XEN) livepatch.c:845: livepatch: xen_hello_world: new local symbol livepatch_unload_data_hi_func
completed(XEN) livepatch.c:1343: livepatch: xen_hello_world: timeout is 30000000ns

(XEN) livepatch.c:1450: livepatch: xen_hello_world: CPU3 - IPIing the other 7 CPUs
Applying xen_hello_world... (XEN) livepatch: xen_hello_world: Applying 1 functions
(XEN) hi_func: Hi! (called 1 times)
(XEN) Hook executing.
(XEN) livepatch: xen_hello_world finished APPLY with rc=0
completed
Executing: '(set -e;cd /root/test/livepatch;xl info)' ..host                   : linaro-developer
release                : 4.12.0-linaro-hikey960+
version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
machine                : aarch64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 1
threads_per_core       : 1
cpu_mhz                : 1
hw_caps                : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
virt_caps              :
total_memory           : 2262
free_memory            : 712
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 10
xen_extra              : Hello World
xen_version            : 4.10Hello World
xen_caps               : xen-3.0-aarch64 xen-3.0-armv7l 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0x200000
xen_changeset          : Mon Jun 19 17:11:06 2017 -0400 git:b819b1ec24-dirty
xen_commandline        : loglvl=all console=dtuart dtuart=/soc/serial@fff32000 efi=no-rs dom0_mem=1500M
cc_compiler            : gcc (Debian 6.3.0-18) 6.3.0 20170516
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Wed Sep 13 20:42:42 UTC 2017
build_id               : 48fbef3c27a9d845faba3aea7e7d24063997815c
xend_config_format     : 4
Executing: '(set -e;cd /root/test/livepatch;xen-livepatch load xen_bye_world.livepatch)' ..Uploading xen_bye_world.livepatch... (XEN) Xen BUG at page_alloc.c:738
(XEN) ----[ Xen-4.10Hello World  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     00000000002200d8 page_alloc.c#alloc_heap_pages+0x5c8/0x6e0
(XEN) LR:     000000000021ff2c
(XEN) SP:     00008000ba1ff9e0
(XEN) CPSR:   00000249 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 09010219ffdb2387  X1: 0000800000000000  X2: 00008000b98ab000
(XEN)      X3: 00000000b98ab000  X4: ffffffffffffffff  X5: 0000000000000000
(XEN)      X6: 0000000000000014  X7: 00000000002ebe68  X8: 00000000000017c0
(XEN)      X9: 000000000007ffff X10: 00000000002ebdc8 X11: 0000000000000000
(XEN)     X12: 0000000000000000 X13: 00000008028964c0 X14: 0000000100000000
(XEN)     X15: 000000000000051b X16: 0000000000000023 X17: 0000ffffa3c81088
(XEN)     X18: 0000000000000000 X19: 0000000802896568 X20: 000000000007ffff
(XEN)     X21: 0000000000000000 X22: 0000000802896568 X23: 0000000802896568
(XEN)     X24: 00000008028965a0 X25: 0000000000000000 X26: 0000000000000000
(XEN)     X27: c2c2c2c2c2c2c2c2 X28: 6db6db6db6db6db7  FP: 00008000ba1ff9e0
(XEN) 
(XEN)   VTCR_EL2: 80023558
(XEN)  VTTBR_EL2: 00010000bff38000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 000000008038663f
(XEN)  TTBR0_EL2: 00000000bff16000
(XEN) 
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000e82b10
(XEN)    FAR_EL2: ffff000008000f00
(XEN) 
(XEN) Xen stack trace from sp=00008000ba1ff9e0:
(XEN)    00008000ba1ffa60 0000000000220294 0000000000000000 0000000000000000
(XEN)    0000000000000000 000000000029be18 0000000000000024 6db6db6db6db6db7
(XEN)    fffffff800000000 0000000000000001 00008000bfe9fdd8 00000000ffffffff
(XEN)    00008000bfe9fdd8 000000000029be18 00008000ba1ffaa0 000000000023c0c8
(XEN)    00008000ba1ffaa0 000000000023c108 0000000000000001 0000000000000002
(XEN)    00008000ba1edfe0 000000000029be18 000000000029c000 000000000000001d
(XEN)    00008000ba1ffaf0 000000000023c244 0000000000000010 0000000000000000
(XEN)    00008000bfe9fdb0 0000000040015000 00008000bfe9ff70 00008000bfe9fde8
(XEN)    0000000000000002 0000000000000005 00008000ba1ffb00 0000000000217850
(XEN)    00008000ba1ffc70 0000000000236bc8 0000000000000000 0000000000000000
(XEN)    0000ffffa3e61004 000000000032ac98 000000000029a1a0 00000000002eb000
(XEN)    0000000000000124 000000000000001d ffff000008a72000 ffff8000ad210000
(XEN)    00008000bff2e110 0000000000000240 0000000000324020 00000000000000a0
(XEN)    0000000000000000 0000000000000000 ffff000008a72000 ffff8000a87e8000
(XEN)    00008000ba1ffbc0 00008000bfe9fee0 0000000000000898 0000000040015000
(XEN)    00008000bfe9f600 00008000bfe9f810 0000000000000014 00008000bfe9f7a0
(XEN)    00008000bfe9f7c0 000000000000000d 5f6579625f6e6578 000000646c726f77
(XEN)    00008000ba1ffc70 000000000023630c 00008000ba1ffeb0 00008000ba1fff30
(XEN)    0000ffffa3e61004 0000000020000145 000000005a000ea1 0000ffffed7449f0
(XEN)    0000000000000124 000000000000001d 00008000ba1ffc70 000000000023637c
(XEN)    0000000000000000 0000ffffa3e61004 00008000ba1ffdd0 000000000025ddfc
(XEN)    00008000ba1ffeb0 00008000ba1fff30 000000005a000ea1 0000000020000145
(XEN)    000000005a000ea1 0000ffffed7449f0 0000000000000124 000000000000001d
(XEN)    ffff000008a72000 ffff8000ad210000 00008000ba1ffd40 00000000002552e8
(XEN)    00008000bff36000 ffff8000baf1bd27 00008000bff360d7 0000000000000000
(XEN)    00004f1d38c5bfd7 0000000000329a10 0000000000329a28 ffffffffffffffff
(XEN)    0000000000000000 0000000010e10018 00008000ba1ffd50 0000000000252418
(XEN)    0000000000000000 0000000f0000001b 0000000000000000 0000ffffa3e63004
(XEN)    000000000000000e 0000000000000898 0000ffffa3e62004 0000000000000000
(XEN)    ffffffffffffffff ffff000000000000 0000000000000000 0000000000100000
(XEN)    4010040140100401 4010000000000000 4010040140100401 4010040140100401
(XEN)    0000aaaaad72a010 0000aaaaad718b50 00008000ba1ffe20 00000000002603f0
(XEN)    0000000000000ea1 00008000ba1ffeb0 00008000ba1ffe70 0000000000252924
(XEN)    0000000000329c00 00000000002ebf80 00008000ba1fffb8 00000000000001c5
(XEN)    ffff8000a5a83d50 0000000000267b9c ffff8000b01ed088 ffff8000afb22400
(XEN)    00008000ba1fffb8 0000000020000145 000000005a000ea1 0000ffffed7449f0
(XEN)    0000000000000124 000000000000001d ffff000008a72000 ffff8000ad210000
(XEN)    000000000032ac98 ffff000008f32500 ffff000008f23f00 0000000000267ba0
(XEN)    ffff000008f0e000 ffff000008f29000 0000ffffa3e61004 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<00000000002200d8>] page_alloc.c#alloc_heap_pages+0x5c8/0x6e0 (PC)
(XEN)    [<000000000021ff2c>] page_alloc.c#alloc_heap_pages+0x41c/0x6e0 (LR)
(XEN)    [<0000000000220294>] alloc_domheap_pages+0xa4/0x150
(XEN)    [<000000000023c108>] vmap.c#vmalloc_type+0xa4/0x1b8
(XEN)    [<000000000023c244>] vmalloc_xen+0x10/0x18
(XEN)    [<0000000000217850>] livepatch_op+0x2c4/0x1518
(XEN)    [<0000000000236bc8>] do_sysctl+0x8ec/0xa30
(XEN)    [<000000000025ddfc>] traps.c#do_trap_hypercall+0x6c/0x164
(XEN)    [<00000000002603f0>] do_trap_guest_sync+0xd50/0x1bd4
(XEN)    [<0000000000267b9c>] entry.o#guest_sync+0x9c/0xcc
(XEN) 
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at page_alloc.c:738
(XEN) ****************************************
(XEN) 
(XEN) Reboot in five seconds...
> 
> 
> -boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-14 21:26               ` Konrad Rzeszutek Wilk
@ 2017-09-14 21:39                 ` Boris Ostrovsky
  2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-14 21:39 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Julien Grall, sstabellini, dario.faggioli, xen-devel

On 09/14/2017 05:26 PM, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 13, 2017 at 02:49:41PM -0400, Boris Ostrovsky wrote:
>> On 09/13/2017 02:25 PM, Julien Grall wrote:
>>> Hi,
>>>
>>> On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
>>>> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
>>>> Well, that's not a fix. This eliminates the case that something in
>>>> ARM-specific code (which I haven't tested) accidentally clears
>>>> _PGC_need_scrub.
>>>>
>>>> OK, I think I know what the problem is. You are using
>>>> CONFIG_SEPARATE_XENHEAP, are you?
>>> It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.
>>>
>>> Note that Arm32 is using separate heap.
>>
>> For separate heap we will need
>>
>>
>> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
>> index b5243fc..9f62ea2 100644
>> --- a/xen/common/page_alloc.c
>> +++ b/xen/common/page_alloc.c
>> @@ -2059,7 +2059,7 @@ void free_xenheap_pages(void *v, unsigned int order)
>>
>>      memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
>>
>> -    free_heap_pages(virt_to_page(v), order, false);
>> +    free_heap_pages(virt_to_page(v), order, scrub_debug);
>>  }
>>
>>  #else
>>
>>
>> If that doesn't help then there are two cases where free_heap_pages is
>> called with 'false' --- one in alloc_domheap_pages() and the other in
>> online_page().
>>
>> Setting one and then the other would further narrow it down.
> It went further. See the serial log:

Hmm. As Julien said, this is ARM64 so this patch should not have any effect.

Have you tried flipping false to true in the two alloc_domheap_pages()
invocations that I mentioned?


-boris


>
> root@linaro-developer:~# xl info
> host                   : linaro-developer
> release                : 4.12.0-linaro-hikey960+
> version                : #3 SMP PREEMPT Mon Jul 17 13:26:13 EDT 2017
> machine                : aarch64
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-14 21:39                 ` Boris Ostrovsky
@ 2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
  2017-09-15 19:20                     ` Boris Ostrovsky
  2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-15 18:48 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: Julien Grall, sstabellini, dario.faggioli, xen-devel

On Thu, Sep 14, 2017 at 05:39:23PM -0400, Boris Ostrovsky wrote:
> On 09/14/2017 05:26 PM, Konrad Rzeszutek Wilk wrote:
> > On Wed, Sep 13, 2017 at 02:49:41PM -0400, Boris Ostrovsky wrote:
> >> On 09/13/2017 02:25 PM, Julien Grall wrote:
> >>> Hi,
> >>>
> >>> On 09/13/2017 07:05 PM, Boris Ostrovsky wrote:
> >>>> On 09/13/2017 11:32 AM, Konrad Rzeszutek Wilk wrote:
> >>>> Well, that's not a fix. This eliminates the case that something in
> >>>> ARM-specific code (which I haven't tested) accidentally clears
> >>>> _PGC_need_scrub.
> >>>>
> >>>> OK, I think I know what the problem is. You are using
> >>>> CONFIG_SEPARATE_XENHEAP, are you?
> >>> It seems the bug appear on Arm64, so CONFIG_SEPARATE_XENHEAP is not set.
> >>>
> >>> Note that Arm32 is using separate heap.
> >>
> >> For separate heap we will need
> >>
> >>
> >> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> >> index b5243fc..9f62ea2 100644
> >> --- a/xen/common/page_alloc.c
> >> +++ b/xen/common/page_alloc.c
> >> @@ -2059,7 +2059,7 @@ void free_xenheap_pages(void *v, unsigned int order)
> >>
> >>      memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
> >>
> >> -    free_heap_pages(virt_to_page(v), order, false);
> >> +    free_heap_pages(virt_to_page(v), order, scrub_debug);
> >>  }
> >>
> >>  #else
> >>
> >>
> >> If that doesn't help then there are two cases where free_heap_pages is
> >> called with 'false' --- one in alloc_domheap_pages() and the other in
> >> online_page().
> >>
> >> Setting one and then the other would further narrow it down.
> > It went further. See the serial log:
> 
> Hmm. As Julien said, this is ARM64 so this patch should not have any effect.
> 
> Have you tried flipping false to true in the two alloc_domheap_pages()
> invocations that I mentioned?

Yeah, it didn't help. But I decided during a certain call to debug this.


@@ -1705,6 +1711,7 @@ static void init_heap_pages(
 {
     unsigned long i;
 
+    printk("%s: 0x%lx -> 0x%lx %s\n", __func__, page_to_mfn(pg), page_to_mfn(pg) + nr_pages, scrub_debug ? "scrub" : "");
     for ( i = 0; i < nr_pages; i++ )
     {
         unsigned int nid = phys_to_nid(page_to_maddr(pg+i));
@@ -1000,7 +1001,12 @@ if ( memflags & MEMF_debug ) {
                 spin_unlock(&heap_lock);
             }
             else if ( !(memflags & MEMF_no_scrub) )
+            {
+
+       printk("%s:%d %d scrub mfn=0%lx\n", __func__, __LINE__, i, page_to_mfn(&pg[i]));
+
                 check_one_page(&pg[i]);
+               }
         }
 
         if ( dirty_cnt )
@@ -1836,6 +1843,7 @@ static void __init smp_scrub_heap_pages(void *data)
     else
         end = start + chunk_size;
 
+    printk("CPU%d: MFN=0x%lx -> 0x%lx\n", cpu, start, end);
     for ( mfn = start; mfn < end; mfn++ )
     {
         pg = mfn_to_page(mfn);

Shows:

(XEN) Loading dom0 DTB to 0x0000000017e00000-0x0000000017e08265
(XEN) init_domheap_pages: 0xb87b1->0xb87bc
(XEN) init_heap_pages: 0xb87b1 -> 0xb87bc
(XEN) init_domheap_pages: 0xb88f1->0xb98ae
(XEN) init_heap_pages: 0xb88f1 -> 0xb98ae	<- so the memory is from here

(XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
(XEN) CPU0: MFN=0x0 -> 0x8000
(XEN) CPU6: MFN=0x6a12e -> 0x7212e
(XEN) CPU5: MFN=0x58651 -> 0x60651
(XEN) CPU2: MFN=0x235ba -> 0x2b5ba
(XEN) CPU1: MFN=0x11add -> 0x19add
(XEN) CPU3: MFN=0x35097 -> 0x3d097
(XEN) CPU4: MFN=0x46b74 -> 0x4eb74
(XEN) CPU7: MFN=0x7bc0b -> 0x83c0b
(XEN) .(XEN) CPU6: MFN=0x7212e -> 0x7a12e
(XEN) CPU5: MFN=0x60651 -> 0x68651
(XEN) CPU4: MFN=0x4eb74 -> 0x56b74
(XEN) CPU1: MFN=0x19add -> 0x21add
CPU0: MFN=0x8000 -> 0x10000
(XEN) CPU7: MFN=0x83c0b -> 0x8bc0b
(XEN) CPU2: MFN=0x2b5ba -> 0x335ba
(XEN) CPU3: MFN=0x3d097 -> 0x45097
(XEN) .(XEN) CPU1: MFN=0x21add -> 0x235ba
(XEN) CPU2: MFN=0x335ba -> 0x35097
CPU0: MFN=0x10000 -> 0x11add
(XEN) CPU3: MFN=0x45097 -> 0x46b74
(XEN) CPU6: MFN=0x7a12e -> 0x7bc0b
(XEN) CPU4: MFN=0x56b74 -> 0x58651
(XEN) CPU5: MFN=0x68651 -> 0x6a12e
(XEN) CPU7: MFN=0x8bc0b -> 0x8d6ea
(XEN) .done.
..snip..

(XEN) alloc_heap_pages:1006 0 scrub mfn=0b98ab
(XEN) Xen BUG at page_alloc.c:738

So in other words, it looks like scrub_heap_pages is somehow not
including this MFN.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
@ 2017-09-15 19:20                     ` Boris Ostrovsky
  2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 15+ messages in thread
From: Boris Ostrovsky @ 2017-09-15 19:20 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Julien Grall, sstabellini, dario.faggioli, xen-devel


> So in other words, it looks like scrub_heap_pages is somehow not
> including this MFN.

That would be a problem. How does NUMA info look like?

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
  2017-09-15 19:20                     ` Boris Ostrovsky
@ 2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
  2017-09-15 20:28                       ` Julien Grall
  1 sibling, 1 reply; 15+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-09-15 19:50 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: Julien Grall, sstabellini, dario.faggioli, xen-devel

.snip..
> (XEN) Loading dom0 DTB to 0x0000000017e00000-0x0000000017e08265
> (XEN) init_domheap_pages: 0xb87b1->0xb87bc
> (XEN) init_heap_pages: 0xb87b1 -> 0xb87bc
> (XEN) init_domheap_pages: 0xb88f1->0xb98ae
> (XEN) init_heap_pages: 0xb88f1 -> 0xb98ae	<- so the memory is from here
> 
> (XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
> (XEN) Initial low memory virq threshold set at 0x4000 pages.
> (XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs

I expanded this a bit to include:

(XEN) Initial low memory virq threshold set at 0x4000 pages.                    
(XEN) NODE0 start=0x0 pages=579306, max_page=0xc0000                            
(XEN) NODE0:  #0  #1  #2  #3  #4  #5  #6  #7  (total=8)                         
(XEN) NODE0 start=0x0, per_cpu=72413, rem=2, end=0x8d6ea
                                                 ^^^^^^^^  that is the end of memory, but
0xb98ae > 0x8d6ae.

end = min(node_start_pfn(i) + node_spanned_pages(i), max_page);         
          0                   0x8D6EA                0xc0000


Oh:

/* XXX: implement NUMA support */
#define node_spanned_pages(nid) (total_pages)

<facepalm>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
  2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
@ 2017-09-15 20:28                       ` Julien Grall
  0 siblings, 0 replies; 15+ messages in thread
From: Julien Grall @ 2017-09-15 20:28 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Boris Ostrovsky
  Cc: dario.faggioli, nd, sstabellini, xen-devel

Hi,

On 15/09/2017 20:50, Konrad Rzeszutek Wilk wrote:
> .snip..
>> (XEN) Loading dom0 DTB to 0x0000000017e00000-0x0000000017e08265
>> (XEN) init_domheap_pages: 0xb87b1->0xb87bc
>> (XEN) init_heap_pages: 0xb87b1 -> 0xb87bc
>> (XEN) init_domheap_pages: 0xb88f1->0xb98ae
>> (XEN) init_heap_pages: 0xb88f1 -> 0xb98ae	<- so the memory is from here
>>
>> (XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
>> (XEN) Initial low memory virq threshold set at 0x4000 pages.
>> (XEN) Scrubbing Free RAM on 1 nodes using 8 CPUs
>
> I expanded this a bit to include:
>
> (XEN) Initial low memory virq threshold set at 0x4000 pages.
> (XEN) NODE0 start=0x0 pages=579306, max_page=0xc0000
> (XEN) NODE0:  #0  #1  #2  #3  #4  #5  #6  #7  (total=8)
> (XEN) NODE0 start=0x0, per_cpu=72413, rem=2, end=0x8d6ea
>                                                  ^^^^^^^^  that is the end of memory, but
> 0xb98ae > 0x8d6ae.
>
> end = min(node_start_pfn(i) + node_spanned_pages(i), max_page);
>           0                   0x8D6EA                0xc0000
>
>
> Oh:
>
> /* XXX: implement NUMA support */
> #define node_spanned_pages(nid) (total_pages)

If I understand correctly, this would be wrong here because the memory 
could be in multiple banks.

So, I think, what we would want to return here is bank[n]->end - 
bank[0]->start where n is the last bank.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-09-15 20:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 23:55 CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738 Konrad Rzeszutek Wilk
2017-09-12  0:45 ` Boris Ostrovsky
2017-09-13  0:01   ` Konrad Rzeszutek Wilk
2017-09-13  1:19     ` Boris Ostrovsky
2017-09-13 15:32       ` Konrad Rzeszutek Wilk
2017-09-13 18:05         ` Boris Ostrovsky
2017-09-13 18:25           ` Julien Grall
2017-09-13 18:49             ` Boris Ostrovsky
2017-09-14 21:26               ` Konrad Rzeszutek Wilk
2017-09-14 21:39                 ` Boris Ostrovsky
2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
2017-09-15 19:20                     ` Boris Ostrovsky
2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
2017-09-15 20:28                       ` Julien Grall
2017-09-13  7:56     ` Dario Faggioli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.