All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Woods <brian.woods@xilinx.com>
To: Julien Grall <Julien.Grall@arm.com>
Cc: Brian Woods <brian.woods@xilinx.com>, nd <nd@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] Errors with Loading Xen at a Certain Address
Date: Thu, 3 Oct 2019 13:24:58 -0700	[thread overview]
Message-ID: <20191003202457.GA4040@xilinx.com> (raw)
In-Reply-To: <c2ea24d9-6bd0-a5b2-9ea1-b3bfe5e30a02@arm.com>

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

On Thu, Oct 03, 2019 at 07:23:23PM +0000, Julien Grall wrote:
> Hi,
> 
> On 03/10/2019 19:15, Brian Woods wrote:
> > On Thu, Oct 03, 2019 at 06:08:45PM +0100, Julien Grall wrote:
> > (XEN) BW_DEBUG: .6 count_info=0x0000000000000000
> > (XEN) Domain heap initialised
> > (XEN) BW_DEBUG: 01 count_info=0x0180000000000000
> > 
> > Those debug messages sandwich end_boot_allocator() in start_xen().
> 
> hmmm, looking back at the thread, the WARN_ON() I suggested is actually 
> incorrect. :/ Sorry for that. It should be:
> 
> WARN_ON(mfn_x(page_to_mfn(pg + i)) == 0x01533);
> 
> Note the "i" instead of "1".
> 
> If the WARN_ON() is triggered between the two calls, then it would mean 
> we are giving page to the boot allocator.
> 
> This would imply that next_modules() or dt_unreserved_regions() is not 
> working as expected (i.e. carving out any modules).
> 
> Also, could you send your log with early printk enabled?
> 
> Cheers,
> 
> -- 
> Julien Grall

Attached are the log and diff.

There's a WARN_ON() between the two debug printks calls I shared above.

-- 
Brian Woods

[-- Attachment #2: xen-git_52633db2c5ed-p8-bad_addr.log --]
[-- Type: text/plain, Size: 23751 bytes --]

PMU Firmware 2019.1	May 25 2019   06:57:33
PMU_ROM Version: xpbr-v8.1.0-0
NOTICE:  ATF running on XCZUUNKN/QEMU v4/RTL0.0 at 0xfffea000
NOTICE:  BL31: Secure code at 0x60000000
NOTICE:  BL31: Non secure code at 0x10080000
NOTICE:  BL31: v2.0(release):xilinx-v2018.3-720-g80d1c790
NOTICE:  BL31: Built : 06:54:23, May 25 2019
PMUFW:	v1.1


U-Boot 2019.01 (May 25 2019 - 06:55:09 +0000)

Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
DRAM:  4 GiB
EL Level:	EL2
Chip ID:	unknown
MMC:   mmc@ff170000: 0
Loading Environment from SPI Flash... SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
*** Warning - bad CRC, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Bootmode: JTAG_MODE
Reset reason:	EXTERNAL 
Net:   ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
eth0: ethernet@ff0e0000
U-BOOT for xilinx-zcu102-2019_1

BOOTP broadcast 1
DHCP client bound to address 10.0.5.15 (2 ms)
Hit any key to stop autoboot:  4 \b\b\b 3 \b\b\b 0 
ZynqMP> setenv serverip 10.0.5.2; tftpb 1280000 xen-qemu-mod.dtb; tftpb 0x80000 yocto-Image; tftpb 1400000 xen-custom.ub; tftpb 9000000 yocto-rootfs.cpio.gz.ub; bootm 1400000 9000000 1280000 
Using ethernet@ff0e0000 device
TFTP from server 10.0.5.2; our IP address is 10.0.5.15
Filename 'xen-qemu-mod.dtb'.
Load address: 0x1280000
Loading: *\b###
	 6 MiB/s
done
Bytes transferred = 38019 (9483 hex)
Using ethernet@ff0e0000 device
TFTP from server 10.0.5.2; our IP address is 10.0.5.15
Filename 'yocto-Image'.
Load address: 0x80000
Loading: *\b#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #########################################
	 36.6 MiB/s
done
Bytes transferred = 18215424 (115f200 hex)
Using ethernet@ff0e0000 device
TFTP from server 10.0.5.2; our IP address is 10.0.5.15
Filename 'xen-custom.ub'.
Load address: 0x1400000
Loading: *\b#################################################################
	 ####
	 22.4 MiB/s
done
Bytes transferred = 984464 (f0590 hex)
Using ethernet@ff0e0000 device
TFTP from server 10.0.5.2; our IP address is 10.0.5.15
Filename 'yocto-rootfs.cpio.gz.ub'.
Load address: 0x9000000
Loading: *\b#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #####################
	 36.4 MiB/s
done
Bytes transferred = 9569188 (9203a4 hex)
## Booting kernel from Legacy Image at 01400000 ...
   Image Name:   
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    984400 Bytes = 961.3 KiB
   Load Address: 01400000
   Entry Point:  01400000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 09000000 ...
   Image Name:   
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    9569124 Bytes = 9.1 MiB
   Load Address: 09000000
   Entry Point:  09000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01280000
   Booting using the fdt blob at 0x1280000
   Loading Kernel Image ... OK
   Loading Ramdisk to 076df000, end 07fff364 ... OK
   Loading Device Tree to 00000000076d2000, end 00000000076de482 ... OK

Starting kernel ...

- UART enabled -
- Boot CPU booting -
- Current EL 00000008 -
- Initialize CPU -
- Turning on paging -
- Zero BSS -
- Ready -
(XEN) Checking for initrd in /chosen
(XEN) Initrd 00000000076df000-0000000007fff364
(XEN) RAM: 0000000000000000 - 000000007fefffff
(XEN) RAM: 0000000800000000 - 000000087fffffff
(XEN) 
(XEN) MODULE[0]: 0000000001400000 - 00000000015328f1 Xen         
(XEN) MODULE[1]: 00000000076d2000 - 00000000076dc080 Device Tree 
(XEN) MODULE[2]: 00000000076df000 - 0000000007fff364 Ramdisk     
(XEN) MODULE[3]: 0000000000080000 - 0000000003180000 Kernel      
(XEN)  RESVD[0]: 00000000076d2000 - 00000000076dc000
(XEN)  RESVD[1]: 00000000076df000 - 0000000007fff364
(XEN) 
(XEN) 
(XEN) Command line: console=dtuart dtuart=serial0 dom0_mem=1G bootscrub=0 timer_slop=0
(XEN) PFN compression on bits 19...22
(XEN) BW_DEBUG: 00 count_info=0x0000000000000000
(XEN) BW_DEBUG: .3 count_info=0x0000000000000000
(XEN) BW_DEBUG: .6 count_info=0x0000000000000000
(XEN) Xen WARN at page_alloc.c:1392
(XEN) ----[ Xen-4.13-unstable  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     000000000021c144 page_alloc.c#free_heap_pages+0x144/0x614
(XEN) LR:     0180000000000000
(XEN) SP:     00000000002efcc0
(XEN) CPSR:   600003c9 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 000000080004a328  X1: 0000000000000000  X2: 000000080004a328
(XEN)      X3: 0000000000001533  X4: 00000000002a34b8  X5: 00000000002a3000
(XEN)      X6: 00000000002a3000  X7: 00000000002a3000  X8: 0080000000000000
(XEN)      X9: 0000000000001533 X10: 6db6db6db6db6db7 X11: fffffff800000000
(XEN)     X12: 0000000000000001 X13: 0000000000001533 X14: 0000000000001533
(XEN)     X15: 000000000007ffff X16: 00000000002a3488 X17: 0000000000000001
(XEN)     X18: 000000007dda9de8 X19: 0000000000000000 X20: 0000000000000000
(XEN)     X21: 000000080004a328 X22: 0000000000000000 X23: 0000000047ffffff
(XEN)     X24: 00000000002a3000 X25: 3d3d3d3d3d3d3d3d X26: 00000000002a3000
(XEN)     X27: 00000000002a3000 X28: 00000000002a3000  FP: 00000000002efcc0
(XEN) 
(XEN)   VTCR_EL2: 00000000
(XEN)  VTTBR_EL2: 0000000000000000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 0000000000000038
(XEN)  TTBR0_EL2: 000000000152c000
(XEN) 
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000000000
(XEN)    FAR_EL2: 0000000000000000
(XEN) 
(XEN) Xen stack trace from sp=00000000002efcc0:
(XEN)    00000000002efd30 000000000021e900 000000080004a328 0000000000000000
(XEN)    00000000002fad40 000000000000619f 00000000002a3488 000000080004a328
(XEN)    0000000000000000 00000000000fff00 00000000002d03c0 6db6db6db6db6db7
(XEN)    00000000002a10f8 000000010000000d 00000000002efda0 00000000002a6dbc
(XEN)    0000000000000001 00000000002c8000 00000000002a34b8 00000000002a3000
(XEN)    00000000002a3000 00000000002a3000 0000000000000002 00000000000fff00
(XEN)    00000000002d03c0 ffffffffffffffff 00000000002efda0 00000000002fad90
(XEN)    00000000002efde0 00000000002b8e60 0000000000001533 0000000800000000
(XEN)    00000000002a3000 00000000002a3000 00000000002a3000 fefefefefefeff09
(XEN)    000000007dd9e890 00000000002001b4 0000000001400000 0000000001200000
(XEN)    00000000076d2000 0000000000000000 0000000000400000 0000000000000003
(XEN)    0000000000000001 0000000000000000 0000000001400000 0000000001400040
(XEN)    0000000000000000 00000000002a63b8 00000000002d03c0 00000000002d03d8
(XEN)    00000000076d2000 000000000000a080 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000300000000 0000000000000000 00000040ffffffff
(XEN)    0000000000000400 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<000000000021c144>] page_alloc.c#free_heap_pages+0x144/0x614 (PC)
(XEN)    [<0180000000000000>] 0180000000000000 (LR)
(XEN)    [<000000000021e900>] page_alloc.c#init_heap_pages+0x3d4/0x564
(XEN)    [<00000000002a6dbc>] end_boot_allocator+0x114/0x21c
(XEN)    [<00000000002b8e60>] start_xen+0x47c/0x108c
(XEN)    [<00000000002001b4>] arm64/head.o#primary_switched+0xc/0x2c
(XEN) 
(XEN) Domain heap initialised
(XEN) BW_DEBUG: 01 count_info=0x0180000000000000
(XEN) Booting using Device Tree
(XEN) Platform: Xilinx ZynqMP
(XEN) BW_DEBUG: 02 count_info=0x0180000000000000
(XEN) Looking for dtuart at "serial0", options ""
 Xen 4.13-unstable
(XEN) Xen version 4.13-unstable (woods@xilinx.com) (aarch64-unknown-linux-gnu-gcc (crosstool-NG 1.24.0.6-afaf7b9) 8.3.0) debug=y  Thu Oct  3 12:59:18 PDT 2019
(XEN) Latest ChangeSet: Thu Sep 26 11:03:08 2019 +0100 git:52633db-dirty
(XEN) build-id: 15b5303bb7014b2f2e5973278c679dac8b3bd1c8
(XEN) BW_DEBUG:2.5 count_info=0x0180000000000000
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN)   Processor Features: 1100000000002222 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: 00001231:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10101105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using SMC Calling Convention v1.1
(XEN) Using PSCI v1.1
(XEN) SMP: Allowing 4 CPUs
(XEN) BW_DEBUG: 03 count_info=0x0180000000000000
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 65000 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000f9010000
(XEN)         gic_cpu_addr=00000000f9020000
(XEN)         gic_hyp_addr=00000000f9040000
(XEN)         gic_vcpu_addr=00000000f9060000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: Adjusting CPU interface base to 0xf902f000
(XEN) GICv2: 192 lines, 4 cpus (IID 00000000).
(XEN) BW_DEBUG: 04 count_info=0x0180000000000000
(XEN) XSM Framework v1.0.0 initialized
(XEN) Initialising XSM SILO mode
(XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2)
(XEN) Initializing Credit2 scheduler
(XEN)  load_precision_shift: 18
(XEN)  load_window_shift: 30
(XEN)  underload_balance_tolerance: 0
(XEN)  overload_balance_tolerance: -3
(XEN)  runqueues arrangement: socket
(XEN)  cap enforcement granularity: 10ms
(XEN) load tracking window length 1073741824 ns
(XEN) BW_DEBUG: 05 count_info=0x0180000000000000
(XEN) Allocated console ring of 32 KiB.
(XEN) CPU0: Guest atomics will try 1 times before pausing the domain
(XEN) Bringing up CPU1
- CPU 00000001 booting -
- Current EL 00000008 -
- Initialize CPU -
- Turning on paging -
- Ready -
(XEN) CPU1: Guest atomics will try 1 times before pausing the domain
(XEN) Bringing up CPU2
(XEN) CPU 1 booted.
- CPU 00000002 booting -
- Current EL 00000008 -
- Initialize CPU -
- Turning on paging -
- Ready -
(XEN) CPU2: Guest atomics will try 1 times before pausing the domain
(XEN) Bringing up CPU3
(XEN) CPU 2 booted.
- CPU 00000003 booting -
- Current EL 00000008 -
- Initialize CPU -
- Turning on paging -
- Ready -
(XEN) CPU3: Guest atomics will try 1 times before pausing the domain
(XEN) Brought up 4 CPUs
(XEN) CPU 3 booted.
(XEN) BW_DEBUG: 06 count_info=0x0180000000000000
(XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) smmu: /smmu@fd800000: probing hardware configuration...
(XEN) smmu: /smmu@fd800000: SMMUv2 with:
(XEN) smmu: /smmu@fd800000: 	stage 2 translation
(XEN) smmu: /smmu@fd800000: 	stream matching with 48 register groups, mask 0x7fff
(XEN) smmu: /smmu@fd800000: 	16 context banks (0 stage-2 only)
(XEN) smmu: /smmu@fd800000: 	Stage-2: 40-bit IPA -> 48-bit PA
(XEN) smmu: /smmu@fd800000: registered 26 master devices
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Interrupt remapping enabled
(XEN) Adding cpu 0 to runqueue 0
(XEN)  First cpu on runqueue, activating
(XEN) Adding cpu 1 to runqueue 0
(XEN) Adding cpu 2 to runqueue 0
(XEN) Adding cpu 3 to runqueue 0
(XEN) alternatives: Patching with alt table 00000000002c3e78 -> 00000000002c4538
(XEN) BW_DEBUG: 07 count_info=0x0180000000000000
(XEN) BW_DEBUG: 08 count_info=0x0180000000000000
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading d0 kernel from boot module @ 0000000000080000
(XEN) Loading ramdisk from boot module @ 00000000076df000
(XEN) Allocating 1:1 mappings totalling 1024MB for dom0:
(XEN) BANK[0] 0x00000020000000-0x00000060000000 (1024MB)
(XEN) Grant table range: 0x00000001400000-0x00000001440000
(XEN) smmu: /smmu@fd800000: d0: p2maddr 0x000000087bf9a000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000000080000 to 0000000020080000-0000000023180000
(XEN) Loading dom0 initrd from 00000000076df000 to 0x0000000028200000-0x0000000028b20364
(XEN) Loading dom0 DTB to 0x0000000028000000-0x0000000028008db3
(XEN) BW_DEBUG: 09 count_info=0x0180000000000000
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) BW_DEBUG: 10 count_info=0x0180000000000000
(XEN) BW_DEBUG: 11 count_info=0x0180000000000000
(XEN) Xen WARN at page_alloc.c:1392
(XEN) ----[ Xen-4.13-unstable  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     000000000021c144 page_alloc.c#free_heap_pages+0x144/0x614
(XEN) LR:     0180000000000000
(XEN) SP:     00008000fbff7d10
(XEN) CPSR:   60000249 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 000000080004a328  X1: 0000000000000000  X2: 000000080004a328
(XEN)      X3: 0000000000001533  X4: 00000000002a34b8  X5: 00000000002a3000
(XEN)      X6: 00000000002a3000  X7: 00000000002a3000  X8: 0080000000000000
(XEN)      X9: 0000000000001533 X10: 6db6db6db6db6db7 X11: fffffff800000000
(XEN)     X12: 0000000000000001 X13: 0000000000001533 X14: 0000000000001533
(XEN)     X15: 000000000007ffff X16: 00000000002a3488 X17: 0000000000000001
(XEN)     X18: 000000007dda9de8 X19: 0000000000000000 X20: 0000000000000000
(XEN)     X21: 000000080004a328 X22: 0000000000000000 X23: 0000000047ffffff
(XEN)     X24: 00000000002a3000 X25: 3d3d3d3d3d3d3d3d X26: 00000000002a3000
(XEN)     X27: 00000000002a3000 X28: 00000000002a3000  FP: 00008000fbff7d10
(XEN) 
(XEN)   VTCR_EL2: 80023558
(XEN)  VTTBR_EL2: 0000000000000000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 0000000000000038
(XEN)  TTBR0_EL2: 000000000152c000
(XEN) 
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000000000
(XEN)    FAR_EL2: 0000000000000000
(XEN) 
(XEN) Xen stack trace from sp=00008000fbff7d10:
(XEN)    00008000fbff7d80 000000000021e900 000000080004a328 00000000000014b3
(XEN)    00000000002fad40 0000000000003100 00000000002a3488 0000000800001c00
(XEN)    0000000000000000 00000000000fff00 00000000002d03c0 6db6db6db6db6db7
(XEN)    00000000002a10f8 000000010000000d 00008000fbff7df0 000000000021eb24
(XEN)    0000000000000002 0000000000000002 0000000000080000 0000000003180000
(XEN)    000000000021ea90 00000000002fa000 0000000003180000 00000000000fff00
(XEN)    00000000002d03c0 ffffffffffffffff 0000000000000001 00000000002fad90
(XEN)    00008000fbff7e00 00000000002b83ec 00008000fbff7e50 00000000002b8904
(XEN)    00000000002d0408 0000000000000003 0000000000080000 00000000002a34b8
(XEN)    00000000002d03c0 000000000021ea90 00000000076df000 0000000007fff364
(XEN)    00008000fbff7ea0 0000000000260a3c 00000000002a2000 000000080004a328
(XEN)    00000000002a3000 00000000002a3000 00000000002a3000 00008000fbf9d000
(XEN)    00000000002a3000 0000000000260a38 00000000002efde0 00000000002b99ac
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<000000000021c144>] page_alloc.c#free_heap_pages+0x144/0x614 (PC)
(XEN)    [<0180000000000000>] 0180000000000000 (LR)
(XEN)    [<000000000021e900>] page_alloc.c#init_heap_pages+0x3d4/0x564
(XEN)    [<000000000021eb24>] init_domheap_pages+0x94/0x9c
(XEN)    [<00000000002b83ec>] 00000000002b83ec
(XEN)    [<00000000002b8904>] 00000000002b8904
(XEN)    [<0000000000260a3c>] setup.c#init_done+0x10/0x20
(XEN)    [<00000000002b99ac>] 00000000002b99ac
(XEN) 
(XEN) pg[0] MFN 01533 c=0x180000000000000 o=0 v=0x7ffff t=0
(XEN) Xen BUG at page_alloc.c:1424
(XEN) ----[ Xen-4.13-unstable  arm64  debug=y   Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     000000000021c1a8 page_alloc.c#free_heap_pages+0x1a8/0x614
(XEN) LR:     000000000021c1a8
(XEN) SP:     00008000fbff7d10
(XEN) CPSR:   60000249 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 00000000002a1558  X1: 00000000000001c1  X2: 0000000000000000
(XEN)      X3: 0000000000000000  X4: 0000000000000000  X5: 0000000000000012
(XEN)      X6: 0000000000000080  X7: fefefefefefeff09  X8: 7f7f7f7f7f7f7f7f
(XEN)      X9: 731f646b61606d54 X10: 7f7f7f7f7f7f7f7f X11: 0101010101010101
(XEN)     X12: 0000000000000008 X13: 000000000027c8c0 X14: 0000000000000020
(XEN)     X15: 0000000000000000 X16: 00000000002a3488 X17: 0000000000000001
(XEN)     X18: 000000007dda9de8 X19: 0000000000000000 X20: 0000000000000000
(XEN)     X21: 000000080004a328 X22: 0000000000000000 X23: 0000000047ffffff
(XEN)     X24: 00000000002a3000 X25: 3d3d3d3d3d3d3d3d X26: 00000000002a3000
(XEN)     X27: 00000000002a3000 X28: 00000000002a3000  FP: 00008000fbff7d10
(XEN) 
(XEN)   VTCR_EL2: 80023558
(XEN)  VTTBR_EL2: 0000000000000000
(XEN) 
(XEN)  SCTLR_EL2: 30cd183d
(XEN)    HCR_EL2: 0000000000000038
(XEN)  TTBR0_EL2: 000000000152c000
(XEN) 
(XEN)    ESR_EL2: f2000001
(XEN)  HPFAR_EL2: 0000000000000000
(XEN)    FAR_EL2: 0000000000000000
(XEN) 
(XEN) Xen stack trace from sp=00008000fbff7d10:
(XEN)    00008000fbff7d80 000000000021e900 000000080004a328 00000000000014b3
(XEN)    00000000002fad40 0000000000003100 00000000002a3488 0000000800001c00
(XEN)    0000000000000000 00000000000fff00 00000000002d03c0 6db6db6db6db6db7
(XEN)    00000000002a10f8 000000010000000d 00008000fbff7df0 000000000021eb24
(XEN)    0000000000000002 0000000000000002 0000000000080000 0000000003180000
(XEN)    000000000021ea90 00000000002fa000 0000000003180000 00000000000fff00
(XEN)    00000000002d03c0 ffffffffffffffff 0000000000000001 00000000002fad90
(XEN)    00008000fbff7e00 00000000002b83ec 00008000fbff7e50 00000000002b8904
(XEN)    00000000002d0408 0000000000000003 0000000000080000 00000000002a34b8
(XEN)    00000000002d03c0 000000000021ea90 00000000076df000 0000000007fff364
(XEN)    00008000fbff7ea0 0000000000260a3c 00000000002a2000 000000080004a328
(XEN)    00000000002a3000 00000000002a3000 00000000002a3000 00008000fbf9d000
(XEN)    00000000002a3000 0000000000260a38 00000000002efde0 00000000002b99ac
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<000000000021c1a8>] page_alloc.c#free_heap_pages+0x1a8/0x614 (PC)
(XEN)    [<000000000021c1a8>] page_alloc.c#free_heap_pages+0x1a8/0x614 (LR)
(XEN)    [<000000000021e900>] page_alloc.c#init_heap_pages+0x3d4/0x564
(XEN)    [<000000000021eb24>] init_domheap_pages+0x94/0x9c
(XEN)    [<00000000002b83ec>] 00000000002b83ec
(XEN)    [<00000000002b8904>] 00000000002b8904
(XEN)    [<0000000000260a3c>] setup.c#init_done+0x10/0x20
(XEN)    [<00000000002b99ac>] 00000000002b99ac
(XEN) 
(XEN) 
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Xen BUG at page_alloc.c:1424
(XEN) ****************************************
(XEN) 
(XEN) Reboot in five seconds...

[-- Attachment #3: debug.patch --]
[-- Type: text/x-diff, Size: 5145 bytes --]

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 65552da..4d27cc3 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -915,6 +915,8 @@ void __init setup_frametable_mappings(paddr_t ps, paddr_t pe)
            frametable_size - (nr_pdxs * sizeof(struct page_info)));
 
     frametable_virt_end = FRAMETABLE_VIRT_START + (nr_pdxs * sizeof(struct page_info));
+
+    printk("BW_DEBUG: 00 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
 }
 
 void *__init arch_vmap_virt_end(void)
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index fca7e68..c0ef166 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -829,11 +829,17 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     setup_mm();
 
+    printk("BW_DEBUG: .3 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /* Parse the ACPI tables for possible boot-time configuration */
     acpi_boot_table_init();
 
+    printk("BW_DEBUG: .6 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     end_boot_allocator();
 
+    printk("BW_DEBUG: 01 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /*
      * The memory subsystem has been initialized, we can now switch from
      * early_boot -> boot.
@@ -858,6 +864,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     platform_init();
 
+    printk("BW_DEBUG: 02 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     preinit_xen_time();
 
     gic_preinit();
@@ -866,6 +874,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     console_init_preirq();
     console_init_ring();
 
+    printk("BW_DEBUG:2.5 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
     processor_id();
 
     smp_init_cpus();
@@ -873,6 +882,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus);
     nr_cpu_ids = cpus;
 
+    printk("BW_DEBUG: 03 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /*
      * Some errata relies on SMCCC version which is detected by psci_init()
      * (called from smp_init_cpus()).
@@ -887,6 +898,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     tasklet_subsys_init();
 
+   printk("BW_DEBUG: 04 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     if ( xsm_dt_init() != 1 )
         warning_add("WARNING: SILO mode is not enabled.\n"
                     "It has implications on the security of the system,\n"
@@ -904,6 +917,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     setup_system_domains();
 
+    printk("BW_DEBUG: 05 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     local_irq_enable();
     local_abort_enable();
 
@@ -928,6 +943,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     printk("Brought up %ld CPUs\n", (long)num_online_cpus());
     /* TODO: smp_cpus_done(); */
 
+    printk("BW_DEBUG: 06 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     setup_virt_paging();
 
     rc = iommu_setup();
@@ -943,6 +960,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     apply_alternatives_all();
     enable_errata_workarounds();
 
+    printk("BW_DEBUG: 07 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /* Create initial domain 0. */
     /* The vGIC for DOM0 is exactly emulating the hardware GIC */
     dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE;
@@ -963,9 +982,13 @@ void __init start_xen(unsigned long boot_phys_offset,
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
         panic("Error creating domain 0\n");
 
+    printk("BW_DEBUG: 08 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     if ( construct_dom0(dom0) != 0)
         panic("Could not set up DOM0 guest OS\n");
 
+    printk("BW_DEBUG: 09 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     heap_init_late();
 
     init_trace_bufs();
@@ -974,6 +997,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     console_endboot();
 
+    printk("BW_DEBUG: 10 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /* Hide UART from DOM0 if we're using it */
     serial_endboot();
 
@@ -983,6 +1008,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     domain_unpause_by_systemcontroller(dom0);
 
+    printk("BW_DEBUG: 11 count_info=0x%016lx\n", mfn_to_page(_mfn(0x01533))->count_info);
+
     /* Switch on to the dynamically allocated stack for the idle vcpu
      * since the static one we're running on is about to be freed. */
     memcpy(idle_vcpu[0]->arch.cpu_info, get_cpu_info(),
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 7cb1bd3..95e874d 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1389,6 +1389,8 @@ static void free_heap_pages(
 
     for ( i = 0; i < (1 << order); i++ )
     {
+        WARN_ON(mfn_x(page_to_mfn(pg + i)) == 0x01533);
+
         /*
          * Cannot assume that count_info == 0, as there are some corner cases
          * where it isn't the case and yet it isn't a bug:

[-- Attachment #4: Type: text/plain, Size: 157 bytes --]

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

  reply	other threads:[~2019-10-03 20:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  0:32 [Xen-devel] Errors with Loading Xen at a Certain Address Brian Woods
     [not found] ` <48c9fc54-553e-3b6b-bad2-dbad35991df0@arm.com>
2019-10-02 16:52   ` Julien Grall
2019-10-02 18:56     ` Brian Woods
2019-10-02 19:59       ` Julien Grall
2019-10-02 21:22         ` Brian Woods
2019-10-02 23:20           ` Brian Woods
2019-10-03 17:08             ` Julien Grall
2019-10-03 18:15               ` Brian Woods
2019-10-03 19:23                 ` Julien Grall
2019-10-03 20:24                   ` Brian Woods [this message]
2019-10-03 21:20                     ` Julien Grall
2019-10-04  0:25                       ` Brian Woods
2019-10-04  9:49                         ` Julien Grall
2019-10-04 15:36                           ` Brian Woods

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20191003202457.GA4040@xilinx.com \
    --to=brian.woods@xilinx.com \
    --cc=Julien.Grall@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.