Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-07-09 Thread Julien Grall



On 09/07/18 09:59, moin anjnawala wrote:

Hi Julien,


Hello,

[...]


[   18.746774] PC is at safe_copy_page+0x1c/0x38
[   18.746774] LR is at safe_copy_page+0x20/0x38
[   18.746774] pc : []lr : []psr: a00300d3
[   18.746774] sp : d62b3d14  ip : d62b3d14  fp : d62b3d28
[   18.746774] r10: c0c9f000  r9 : d779dd64  r8 : d770dc68
[   18.746774] r7 : 5137  r6 : c0f9b260  r5 : c0fc7ec0  r4 : d2cca000
[   18.746774] r3 :   r2 : d2ccb000  r1 : d7469000  r0 : d6cd1000
[   18.746774] Flags: NzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM
Segment none
[   18.746774] Control: 10c5387d  Table: 560c006a  DAC: 0051
[   18.746774] Process bash (pid: 283, stack limit = 0x(ptrval))
[   18.746774] Stack: (0xd62b3d14 to 0xd62b4000)
[   18.746774] 3d00:
 c0f09504 d62b3d60
[   18.746774] 3d20: d62b3d2c c018da0c c018b7f0 0001 d62b3d7c
d6ccb900 0030 d62b3dac
[   18.746774] 3d40:  0008 0010 d61f5890 c0c9f000
d62b3d78 d62b3d64 c0110ad4
[   18.746774] 3d60: c018d640  0030 d62b3de4 d62b3d7c
c0110730 c0110ad0 56d24000
[   18.746774] 3d80: d62b3dac 4011d6a0  b6f4e4c0 b6f4e4c0
0051 4000406a 10c5387d
[   18.746774] 3da0:  00f0  c0f9695c d677ee00
 c0f02800 c0c0754c
[   18.746774] 3dc0: d61f5890 0005 d62b3de4 c01108fc c0f9695c
 d62b3df4 d62b3de8
[   18.746774] 3de0: c0110bd4 c01108b8 d62b3e1c d62b3df8 c018aab4
c0110bc4  c0f1a2c8
[   18.746774] 3e00:  c0f9b130 d62f2280 c0f1a228 d62b3e4c
d62b3e20 c018b3f0 c018a770
[   18.746774] 3e20: c0271418 0005 d5e68198 d62f2280 0005
d61f5880 d62f2280 d62b3f68
[   18.746774] 3e40: d62b3e64 d62b3e50 c0189408 c018b288 d62f2280
 d62b3e74 d62b3e68
[   18.746774] 3e60: c0903cbc c01893b0 d62b3e8c d62b3e78 c0316b44
c0903cac c0316af0 
[   18.746774] 3e80: d62b3ec4 d62b3e90 c031619c c0316afc 
 d62b3efc d60cc840
[   18.746774] 3ea0: 0005 d60cc840 d62b3f68 0005 000ce408
 d62b3f34 d62b3ec8
[   18.746774] 3ec0: c02a13d8 c03160b0 0800 0008 
081f c091b8f4 b6f5d560
[   18.746774] 3ee0: c0f0b7ec d62b3fb0 b6f5d968 000c5758 d62b3fac
d62b3f00 c0117fd0 c091b900
[   18.746774] 3f00:  c02a1630 d62b3f34 d62b3f18 c029d7c4
d60cc840 0005 000ce408
[   18.746774] 3f20: d62b3f68 0005 d62b3f64 d62b3f38 c02a1670
c02a13ac d60cc840 c02c0ae8
[   18.746774] 3f40:   d60cc840 d60cc840 0005
000ce408 d62b3f94 d62b3f68
[   18.746774] 3f60: c02a1880 c02a15c8   0005
000ce408 b6eccb50 0004
[   18.746774] 3f80: c01011e4 d62b2000 d62b3fa4 d62b3f98 c02a18ec
c02a1840  d62b3fa8
[   18.746774] 3fa0: c0101000 c02a18e0 0005 000ce408 0001
000ce408 0005 
[   18.746774] 3fc0: 0005 000ce408 b6eccb50 0004 0005
 000c5758 
[   18.746774] 3fe0:  bee588e4 b6e2fc85 b6e6af26 40020030
0001  
[   18.746774] [] (safe_copy_page) from []
(swsusp_save+0x3d8/0x480)
[   18.746774] [] (swsusp_save) from []
(arch_save_image+0x10/0x48)
[   18.746774] [] (arch_save_image) from []
(cpu_suspend_abort+0x0/0x30)
[   18.746774] Code: e52de004 e8bd4000 e1a04000 e1a1 (eb03838b)
[   18.746774] ---[ end trace d5b1b8f68a0ece68 ]---
[   18.746774] [ cut here ]
[   18.746774] WARNING: CPU: 0 PID: 0 at kernel/time/timekeeping.c:760
ktime_get+0xec/0xf8
[   18.746774] Modules linked in:
[   18.746774] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G  D
   4.17.4-00012-g8675d93-dirty #289
[   18.746774] Hardware name: Generic DT based system
[   18.746774] [] (unwind_backtrace) from []
(show_stack+0x20/0x24)
[   18.746774] [] (show_stack) from []
(dump_stack+0x98/0xac)
[   18.746774] [] (dump_stack) from [] (__warn+0x104/0x11c)
[   18.746774] [] (__warn) from []
(warn_slowpath_null+0x50/0x58)
[   18.746774] [] (warn_slowpath_null) from []
(ktime_get+0xec/0xf8)
[   18.746774] [] (ktime_get) from []
(tick_nohz_idle_enter+0x44/0x8c)
[   18.746774] [] (tick_nohz_idle_enter) from []
(do_idle+0x2c/0x240)
[   18.746774] [] (do_idle) from []
(cpu_startup_entry+0x28/0x2c)
[   18.746774] [] (cpu_startup_entry) from []
(rest_init+0xe0/0xe4)
[   18.746774] [] (rest_init) from []
(start_kernel+0x450/0x464)
[   18.746774] ---[ end trace d5b1b8f68a0ece69 ]---

Also, one more observation I have had is that hibernation image
creation does not crash for linux mainline version upto v4.7.10 but
not for later versions.


I am not sure to follow this. Which version are you using for Dom0? For 
DomU? Earlier you mention 4.17, but now you mention 4.7...


[...]



Is there any plan to support hibernation from userspace on arm on xen
for any future release ? If not then what implementations I need to
add in xen and linux to enable hibernation on domU for arm?


As I mention in my previous reply, it is very likely that some bits 
would need to be implemented for Arm. I haven't looked at the series, 
but I think you can look at x86 code and 

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-07-09 Thread moin anjnawala
Hi Julien,

I have applied the given patches sent by amazon on mainline linux
4.17.4 branch commit bdeb8f5.
Even after applying given patches the crash as seen below is
encountered in domU while trying to hibernate to disk usin xen-4.10.

root@Dom0:~# xl create -c /vnc_l.cfg
Parsing config from /vnc_l.cfg
(XEN) d1v0: vGICD: unhandled word write 0x to ICACTIVER0
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.17.4-00012-g8675d93-dirty
(moinuddin.a@CPU-361U) (gcc version 4.8.4 (Ubuntu/Linaro
4.8.4-2ubuntu1~14.04.1)) #289 SMP PRE
EMPT Mon Jul 9 12:06:28 IST 2018
[0.00] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c5387d
[0.00] CPU: div instructions available: patching division code
[0.00] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[0.00] OF: fdt: Machine model: XENVM-4.10
[0.00] Memory policy: Data cache writealloc
[0.00] Xen 4.10 support found
[0.00] cma: Reserved 24 MiB at 0x5780
[0.00] On node 0 totalpages: 102400
[0.00]   Normal zone: 900 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 102400 pages, LIFO batch:31
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.1 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] psci: SMC Calling Convention v1.1
[0.00] percpu: Embedded 16 pages/cpu @(ptrval) s36736 r8192
d20608 u65536
[0.00] pcpu-alloc: s36736 r8192 d20608 u65536 alloc=16*4096
[0.00] pcpu-alloc: [0] 0
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 101500
[0.00] Kernel command line: irqpoll maxcpus=1
no_console_suspend loglevel=8 console=hvc0 xenconsole=tty
earlyprintk=xen rw dhcp=off resume=/dev
/xvda resume_offset=331776 root=/dev/xvda rootwait
[0.00] Misrouted IRQ fixup and polling support enabled
[0.00] This may significantly impact system performance
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 365652K/409600K available (9216K kernel code,
602K rwdata, 3020K rodata, 1024K init, 285K bss, 19372K reserved,
24576K cma-reser
ved, 0K highmem)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xd980 - 0xff80   ( 608 MB)
[0.00] lowmem  : 0xc000 - 0xd900   ( 400 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf00 - 0xbfe0   (  14 MB)
[0.00]   .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
[0.00]   .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[0.00]   .data : 0x(ptrval) - 0x(ptrval)   ( 603 kB)
[0.00].bss : 0x(ptrval) - 0x(ptrval)   ( 286 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] ftrace: allocating 32353 entries in 95 pages
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[0.00]  Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[0.00] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[0.00] arch_timer: cp15 timer(s) running at 6.14MHz (virt).
[0.00] clocksource: arch_sys_counter: mask: 0xff
max_cycles: 0x16ac02862, max_idle_ns: 440795202218 ns
[0.05] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps
every 4398046511085ns
[0.17] Switching to timer-based delay loop, resolution 162ns
[0.000143] Console: colour dummy device 80x30
[0.001616] console [hvc0] enabled
[0.001665] Calibrating delay loop (skipped), value calculated
using timer frequency.. 12.28 BogoMIPS (lpj=61440)
[0.001724] pid_max: default: 32768 minimum: 301
[0.001875] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.001928] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.002676] CPU: Testing write buffer coherency: ok
[0.002998] /cpus/cpu@0 missing clock-frequency property
[0.003050] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.051094] xen:grant_table: Grant tables using version 1 layout
[0.051182] Grant table initialized
[0.051271] xen:events: Using FIFO-based ABI
[0.051348] Xen: initializing cpu0
[0.051462] Setting up static identity map for 0x4010 - 0x40100060
[0.060318] Hierarchical SRCU implementation.
[0.080426] smp: Bringing up secondary CPUs ...
[0.080473] smp: Brought up 1 node, 1 CPU
[0.080509] SMP: Total of 1 processors activated (12.28 BogoMIPS).
[0.080554] CPU: All 

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-06-14 Thread Julien Grall

Replying to myself.

On 06/06/18 19:00, Julien Grall wrote:

On 06/06/18 09:17, moin anjnawala wrote:

Can you point me towards what could be the issue ? If any other
information is needed then I can provide it to you.


Looking at the log and Linux 4.17, none of the PV drivers seem to have 
suspend/resume callback. This might be the reason of the crash as from 
Xen PoV this is a new guest so the memory and event channel have not 
been configured. The guest should really do it again.


It looks like there are some code in drivers/xen/manage.c to handle 
suspend request from the toolstack. I am not entirely sure why we need 
our own way to suspend and not re-used the Linux one.


Jurgen, Boris, do you know if suspend-to-disk from the guest console 
works on x86?


It looks like it was not supported. Amazon recently sent an RFC to 
support it (see [1]). This seems to have some architecture specific code 
but only for x86. Arm bits would need to be implemented.


Cheers,

[1] 
https://lists.xenproject.org/archives/html/xen-devel/2018-06/msg00823.html


--
Julien Grall

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

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-06-07 Thread Mirela Simonovic
Hi,

On Wed, Jun 6, 2018 at 8:00 PM, Julien Grall  wrote:
> (+ Stefano, Mirela, Juergen and Boris)
>
> On 06/06/18 09:17, moin anjnawala wrote:
>>
>> Hi Julien,
>
>
> Hi,
>
>> As you specified earlier I am now able to boot using xen4.10. I am
>> using linux4.4 as dom0 as well as domU.In domU, I have enabled
>> hibenation related configs and I am trying suspend to disk.With xen
>> 4.10, hibernation is done sucessfuly but resume crashes.
>
>
> It would have been nice to switch to a more recent Linux as well because I
> don't think anyone worked on suspend/resume 2 years ago. There are effort to
> support suspend/resume in Xen (and I guess guest) but I suspect some work is
> still missing in newer kernel. Although that would be a better start than a
> 2 years old kernel for the guest.
>
>
>> I have used given config file for domU.
>> name = "domU"
>> kernel = "/ZI-uh1"
>> memory = 200
>> vcpus = 1
>> cpus = 1
>> disk = [ 'phy:/rfs1.img,xvda,rw']
>>
>> extra = 'no_console_suspend loglevel=8 console=hvc0 xenconsole=tty
>> earlyprintk=xx
>> en rw dhcp=off resume=/dev/xvda resume_offset=331776 root=/dev/xvda
>> rootwait'
>>
>> The hibernate(domU console) and resume logs are shown as below:
>>
>>
>> root@debian-jessie:~# swapon /swapfile.img
>>
>> swapon: /swapfile.img: insecure permissions 0644, 0600 suggested.
>> [   50.064545] Adding 102396k swap on /swapfile.img.  Priority:-1
>> extents:1 across:102396k SS
>> root@debian-jessie:~#
>> root@debian-jessie:~#
>> root@debian-jessie:~# echo disk > /sys/power/state
>> [   56.649793] PM: Syncing filesystems ... done.
>> [   56.686770] Freezing user space processes ... (elapsed 0.002 seconds)
>> done.
>> [   56.689454] PM: Basic memory bitmaps created
>> [   56.689497] PM: Preallocating image memory... done (allocated 11077
>> pages)
>> [   57.119960] PM: Allocated 44308 kbytes in 0.43 seconds (103.04 MB/s)
>> [   57.120010] Freezing remaining freezable tasks ... (elapsed 0.009
>> seconds) done.
>> [   58.922629] PM: freeze of devices complete after 1791.756 msecs
>> [   58.925167] PM: late freeze of devices complete after 2.485 msecs
>> [   58.927231] PM: noirq freeze of devices complete after 2.010 msecs
>> [   58.927275] Disabling non-boot CPUs ...
>> [   58.927307] PM: Creating hibernation image:
>> [   58.927307] PM: Need to copy 10790 pages
>> [   58.927307] PM: Normal pages needed: 10790 + 1024, available pages:
>> 40398
>> [   58.927307] PM: Hibernation image created (10790 pages copied)
>> [   58.928629] PM: noirq thaw of devices complete after 1.310 msecs
>> [   58.930334] PM: early thaw of devices complete after 1.589 msecs
>> [   60.634498] PM: thaw of devices complete after 1704.114 msecs
>> [   60.635878] PM: writing image.
>> [   60.680038] PM: Using 1 thread(s) for compression.
>> [   60.680038] PM: Compressing and saving image data (10801 pages)...
>> [   60.680170] PM: Image saving progress:   0%
>> [   61.288932] PM: Image saving progress:  10%
>> [   61.809937] PM: Image saving progress:  20%
>> [   61.994594] PM: Image saving progress:  30%
>> [   62.360616] PM: Image saving progress:  40%
>> [   62.583613] random: nonblocking pool is initialized
>> [   62.592295] PM: Image saving progress:  50%
>> [   62.665052] PM: Image saving progress:  60%
>> [   62.700022] PM: Image saving progress:  70%
>> [   62.759685] PM: Image saving progress:  80%
>> [   62.821796] PM: Image saving progress:  90%
>> [   62.854694] PM: Image saving progress: 100%
>> [   62.855175] PM: Image saving done.
>> [   62.855210] PM: Wrote 43204 kbytes in 2.17 seconds (19.90 MB/s)
>> [   62.863308] PM: S|
>> [   62.921029] reboot: Power down
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~#
>> root@Dom0:~# xl create -c /vnc_l.cfg
>> Parsing config from /vnc_l.cfg
>> (XEN) d2v0: vGICD: unhandled word write 0x to ICACTIVER0
>> [0.00] Booting Linux on physical CPU 0x0
>> [0.00] Initializing cgroup subsys cpuset
>> [0.00] Initializing cgroup subsys cpu
>> [0.00] Initializing cgroup subsys cpuacct
>> [0.00] Linux version 4.4.91-2-g89baae6-dirty
>
>
> I don't seem to be able to find that commit in Linux and it also says dirty.
> What are your modification on top of Linux 4.4?
>
>
>> (omkar.bolla@CPU-308U) (gcc version 4.8.4 (Ubuntu/Linaro
>> 4.8.4-2ubuntu1~14.04.1) ) #107 SMP PR
>> EEMPT Tue Jun 5 16:51:21 IST 2018
>> [0.00] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7),
>> cr=50c5387d
>> [0.00] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction
>> cache
>> [0.00] Machine model: XENVM-4.10
>> [0.00] cma: Reserved 24 MiB at 0x4b00
>> [0.00] Memory policy: Data cache writealloc
>> [0.00] On node 0 totalpages: 51200
>> [0.00] free_area_init_node: node 0, pgdat c07eb740,
>> node_mem_map cae2b000
>> [0.00]   Normal zone: 450 pages used for memmap
>> [0.00]   Normal zone: 0 

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-06-06 Thread Julien Grall

(+ Stefano, Mirela, Juergen and Boris)

On 06/06/18 09:17, moin anjnawala wrote:

Hi Julien,


Hi,


As you specified earlier I am now able to boot using xen4.10. I am
using linux4.4 as dom0 as well as domU.In domU, I have enabled
hibenation related configs and I am trying suspend to disk.With xen
4.10, hibernation is done sucessfuly but resume crashes.


It would have been nice to switch to a more recent Linux as well because 
I don't think anyone worked on suspend/resume 2 years ago. There are 
effort to support suspend/resume in Xen (and I guess guest) but I 
suspect some work is still missing in newer kernel. Although that would 
be a better start than a 2 years old kernel for the guest.



I have used given config file for domU.
name = "domU"
kernel = "/ZI-uh1"
memory = 200
vcpus = 1
cpus = 1
disk = [ 'phy:/rfs1.img,xvda,rw']

extra = 'no_console_suspend loglevel=8 console=hvc0 xenconsole=tty
earlyprintk=xx
en rw dhcp=off resume=/dev/xvda resume_offset=331776 root=/dev/xvda rootwait'

The hibernate(domU console) and resume logs are shown as below:


root@debian-jessie:~# swapon /swapfile.img

swapon: /swapfile.img: insecure permissions 0644, 0600 suggested.
[   50.064545] Adding 102396k swap on /swapfile.img.  Priority:-1
extents:1 across:102396k SS
root@debian-jessie:~#
root@debian-jessie:~#
root@debian-jessie:~# echo disk > /sys/power/state
[   56.649793] PM: Syncing filesystems ... done.
[   56.686770] Freezing user space processes ... (elapsed 0.002 seconds) done.
[   56.689454] PM: Basic memory bitmaps created
[   56.689497] PM: Preallocating image memory... done (allocated 11077 pages)
[   57.119960] PM: Allocated 44308 kbytes in 0.43 seconds (103.04 MB/s)
[   57.120010] Freezing remaining freezable tasks ... (elapsed 0.009
seconds) done.
[   58.922629] PM: freeze of devices complete after 1791.756 msecs
[   58.925167] PM: late freeze of devices complete after 2.485 msecs
[   58.927231] PM: noirq freeze of devices complete after 2.010 msecs
[   58.927275] Disabling non-boot CPUs ...
[   58.927307] PM: Creating hibernation image:
[   58.927307] PM: Need to copy 10790 pages
[   58.927307] PM: Normal pages needed: 10790 + 1024, available pages: 40398
[   58.927307] PM: Hibernation image created (10790 pages copied)
[   58.928629] PM: noirq thaw of devices complete after 1.310 msecs
[   58.930334] PM: early thaw of devices complete after 1.589 msecs
[   60.634498] PM: thaw of devices complete after 1704.114 msecs
[   60.635878] PM: writing image.
[   60.680038] PM: Using 1 thread(s) for compression.
[   60.680038] PM: Compressing and saving image data (10801 pages)...
[   60.680170] PM: Image saving progress:   0%
[   61.288932] PM: Image saving progress:  10%
[   61.809937] PM: Image saving progress:  20%
[   61.994594] PM: Image saving progress:  30%
[   62.360616] PM: Image saving progress:  40%
[   62.583613] random: nonblocking pool is initialized
[   62.592295] PM: Image saving progress:  50%
[   62.665052] PM: Image saving progress:  60%
[   62.700022] PM: Image saving progress:  70%
[   62.759685] PM: Image saving progress:  80%
[   62.821796] PM: Image saving progress:  90%
[   62.854694] PM: Image saving progress: 100%
[   62.855175] PM: Image saving done.
[   62.855210] PM: Wrote 43204 kbytes in 2.17 seconds (19.90 MB/s)
[   62.863308] PM: S|
[   62.921029] reboot: Power down
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~# xl create -c /vnc_l.cfg
Parsing config from /vnc_l.cfg
(XEN) d2v0: vGICD: unhandled word write 0x to ICACTIVER0
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.4.91-2-g89baae6-dirty


I don't seem to be able to find that commit in Linux and it also says 
dirty. What are your modification on top of Linux 4.4?



(omkar.bolla@CPU-308U) (gcc version 4.8.4 (Ubuntu/Linaro
4.8.4-2ubuntu1~14.04.1) ) #107 SMP PR
EEMPT Tue Jun 5 16:51:21 IST 2018
[0.00] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=50c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[0.00] Machine model: XENVM-4.10
[0.00] cma: Reserved 24 MiB at 0x4b00
[0.00] Memory policy: Data cache writealloc
[0.00] On node 0 totalpages: 51200
[0.00] free_area_init_node: node 0, pgdat c07eb740,
node_mem_map cae2b000
[0.00]   Normal zone: 450 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 51200 pages, LIFO batch:15
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.1 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] Xen 4.10 support found
[0.00] PERCPU: Embedded 11 pages/cpu 

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-06-06 Thread moin anjnawala
Hi Julien,
As you specified earlier I am now able to boot using xen4.10. I am
using linux4.4 as dom0 as well as domU.In domU, I have enabled
hibenation related configs and I am trying suspend to disk.With xen
4.10, hibernation is done sucessfuly but resume crashes.
I have used given config file for domU.
name = "domU"
kernel = "/ZI-uh1"
memory = 200
vcpus = 1
cpus = 1
disk = [ 'phy:/rfs1.img,xvda,rw']

extra = 'no_console_suspend loglevel=8 console=hvc0 xenconsole=tty
earlyprintk=xx
en rw dhcp=off resume=/dev/xvda resume_offset=331776 root=/dev/xvda rootwait'

The hibernate(domU console) and resume logs are shown as below:


root@debian-jessie:~# swapon /swapfile.img

swapon: /swapfile.img: insecure permissions 0644, 0600 suggested.
[   50.064545] Adding 102396k swap on /swapfile.img.  Priority:-1
extents:1 across:102396k SS
root@debian-jessie:~#
root@debian-jessie:~#
root@debian-jessie:~# echo disk > /sys/power/state
[   56.649793] PM: Syncing filesystems ... done.
[   56.686770] Freezing user space processes ... (elapsed 0.002 seconds) done.
[   56.689454] PM: Basic memory bitmaps created
[   56.689497] PM: Preallocating image memory... done (allocated 11077 pages)
[   57.119960] PM: Allocated 44308 kbytes in 0.43 seconds (103.04 MB/s)
[   57.120010] Freezing remaining freezable tasks ... (elapsed 0.009
seconds) done.
[   58.922629] PM: freeze of devices complete after 1791.756 msecs
[   58.925167] PM: late freeze of devices complete after 2.485 msecs
[   58.927231] PM: noirq freeze of devices complete after 2.010 msecs
[   58.927275] Disabling non-boot CPUs ...
[   58.927307] PM: Creating hibernation image:
[   58.927307] PM: Need to copy 10790 pages
[   58.927307] PM: Normal pages needed: 10790 + 1024, available pages: 40398
[   58.927307] PM: Hibernation image created (10790 pages copied)
[   58.928629] PM: noirq thaw of devices complete after 1.310 msecs
[   58.930334] PM: early thaw of devices complete after 1.589 msecs
[   60.634498] PM: thaw of devices complete after 1704.114 msecs
[   60.635878] PM: writing image.
[   60.680038] PM: Using 1 thread(s) for compression.
[   60.680038] PM: Compressing and saving image data (10801 pages)...
[   60.680170] PM: Image saving progress:   0%
[   61.288932] PM: Image saving progress:  10%
[   61.809937] PM: Image saving progress:  20%
[   61.994594] PM: Image saving progress:  30%
[   62.360616] PM: Image saving progress:  40%
[   62.583613] random: nonblocking pool is initialized
[   62.592295] PM: Image saving progress:  50%
[   62.665052] PM: Image saving progress:  60%
[   62.700022] PM: Image saving progress:  70%
[   62.759685] PM: Image saving progress:  80%
[   62.821796] PM: Image saving progress:  90%
[   62.854694] PM: Image saving progress: 100%
[   62.855175] PM: Image saving done.
[   62.855210] PM: Wrote 43204 kbytes in 2.17 seconds (19.90 MB/s)
[   62.863308] PM: S|
[   62.921029] reboot: Power down
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~#
root@Dom0:~# xl create -c /vnc_l.cfg
Parsing config from /vnc_l.cfg
(XEN) d2v0: vGICD: unhandled word write 0x to ICACTIVER0
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.4.91-2-g89baae6-dirty
(omkar.bolla@CPU-308U) (gcc version 4.8.4 (Ubuntu/Linaro
4.8.4-2ubuntu1~14.04.1) ) #107 SMP PR
EEMPT Tue Jun 5 16:51:21 IST 2018
[0.00] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=50c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[0.00] Machine model: XENVM-4.10
[0.00] cma: Reserved 24 MiB at 0x4b00
[0.00] Memory policy: Data cache writealloc
[0.00] On node 0 totalpages: 51200
[0.00] free_area_init_node: node 0, pgdat c07eb740,
node_mem_map cae2b000
[0.00]   Normal zone: 450 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 51200 pages, LIFO batch:15
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.1 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] Xen 4.10 support found
[0.00] PERCPU: Embedded 11 pages/cpu @cae1d000 s15872 r8192
d20992 u45056
[0.00] pcpu-alloc: s15872 r8192 d20992 u45056 alloc=11*4096
[0.00] pcpu-alloc: [0] 0
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 50750
[0.00] Kernel command line: no_console_suspend loglevel=8
console=hvc0 xenconsole=tty earlyprintk=xen rw dhcp=off
resume=/dev/xvda resume_offse
t=331776 root=/dev/xvda rootwait xen-fbfront.video=2,1024,768
[0.00] PID hash table entries: 1024 (order: 0, 4096 bytes)
[0.00] Dentry cache hash table entries: 32768 (order: 5, 

Re: [Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-05-22 Thread Julien Grall



On 22/05/18 14:17, moin anjnawala wrote:

Hi,


Hello,


I am using xen4.6 and Linux-4.4 as dom0 and domU on Jacinto j6 board.
The system is able to boot and create domains successfully. Now, I am
trying to enable hibernation in domU. The hibernation seems to be
completed successfully. After hibernating domU and recreating domU. It
is able to resume but gives following error messages for vbd in kernel
logs
Xen 4.6 has been released 3 years and is 5 releases old. You should use 
a recent Xen and Linux when doing development as bug may have been fixed 
in recent version. Please reproduce your error on recent version (Xen 
4.10 at least).


Regards,

--
Julien Grall

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

[Xen-devel] ARM: Issues while Enabling hibernation in domU(linux) on jacinto-j6

2018-05-22 Thread moin anjnawala
Hi,

I am using xen4.6 and Linux-4.4 as dom0 and domU on Jacinto j6 board.
The system is able to boot and create domains successfully. Now, I am
trying to enable hibernation in domU. The hibernation seems to be
completed successfully. After hibernating domU and recreating domU. It
is able to resume but gives following error messages for vbd in kernel
logs

[  174.807287] PM: dpm_resume(): vbd-51712
[  174.842596] xenbus: Failed to release watch
/local/domain/0/backend/vbd/1/51712/state: -2
[  174.843560] xen:grant_table: WARNING: g.e. 0xd still in use!
[  174.843605] xen:grant_table: WARNING: g.e. 0x28 still in use!
[  174.843645] xen:grant_table: WARNING: g.e. 0x25 still in use!
[  174.843689] xen:grant_table: WARNING: g.e. 0x26 still in use!
[  174.843761] xen:grant_table: WARNING: g.e. 0x1a still in use!
[  174.843808] xen:grant_table: WARNING: g.e. 0x21 still in use!
[  174.843852] xen:grant_table: WARNING: g.e. 0x1c still in use!
[  174.843894] xen:grant_table: WARNING: g.e. 0x16 still in use!
[  174.843935] xen:grant_table: WARNING: g.e. 0x9 still in use!
[  174.843976] xen:grant_table: WARNING: g.e. 0xf still in use!
[  174.844014] xen:grant_table: WARNING: g.e. 0xa still in use!
[  174.844056] xen:grant_table: WARNING: g.e. 0x1e still in use!
[  174.844108] xen:grant_table: WARNING: g.e. 0xb still in use!
[  174.844156] xen:grant_table: WARNING: g.e. 0x15 still in use!
[  174.844202] xen:grant_table: WARNING: g.e. 0x13 still in use!
[  174.844238] xen:grant_table: WARNING: g.e. 0x12 still in use!
[  174.844273] xen:grant_table: WARNING: g.e. 0x18 still in use!
[  174.844310] xen:grant_table: WARNING: g.e. 0x17 still in use!
[  174.844389] xen:grant_table: WARNING: g.e. 0xc still in use!
[  174.844428] xen:grant_table: WARNING: g.e. 0x1f still in use!
[  174.844475] xen:grant_table: WARNING: g.e. 0x1d still in use!
[  174.844528] xen:grant_table: WARNING: g.e. 0x23 still in use!
[  174.844596] xen:grant_table: WARNING: g.e. 0x19 still in use!
[  174.844687] xen:grant_table: WARNING: g.e. 0x27 still in use!
[  174.844748] xen:grant_table: WARNING: g.e. 0x10 still in use!
[  174.844804] xen:grant_table: WARNING: g.e. 0x11 still in use!
[  174.844891] xen:grant_table: WARNING: g.e. 0x22 still in use!
[  174.844950] xen:grant_table: WARNING: g.e. 0x14 still in use!
[  174.845004] xen:grant_table: WARNING: g.e. 0xe still in use!
[  174.845073] xen:grant_table: WARNING: g.e. 0x24 still in use!
[  174.845136] xen:grant_table: WARNING: g.e. 0x20 still in use!
[  174.846577] xen:grant_table: WARNING: g.e. 0x8 still in use!
[  174.947857] vbd vbd-51712: 17 adding watch on
/local/domain/0/backend/vbd/2/51712/state
[  174.948226] vbd vbd-51712: failed to write error node for
device/vbd/51712 (17 adding watch on
/local/domain/0/backend/vbd/2/51712/state)
[  174.997890] xenbus: resume (watch_otherend) vbd-51712 failed: -17.
[  174.997941] dpm_run_callback(): xenbus_dev_resume+0x1/0x14c returns -17
[  174.997986] call vbd-51712+ returned -17 after 186165 usecs
[  174.998027] PM: Device vbd-51712 failed to restore: error -17

Later, domU boots and the console is active but it is not able to
execute any commands. It does nothing if any command is supplied to
it. After few minutes, it hangs and following messages are printed on
domU console

[  289.151021] xen:grant_table: g.e. 0x13 still pending
[  289.151068] xen:grant_table: g.e. 0x15 still pending
[  289.151097] xen:grant_table: g.e. 0x24 still pending
[  290.151017] xen:grant_table: g.e. 0xa still pending
[  290.151052] xen:grant_table: g.e. 0x25 still pending
[  290.151077] xen:grant_table: g.e. 0x1d still pending
[  290.151103] xen:grant_table: g.e. 0xc still pending
[  290.151146] xen:grant_table: g.e. 0x1e still pending
[  290.151184] xen:grant_table: g.e. 0x20 still pending
[  290.151209] xen:grant_table: g.e. 0xe still pending
[  290.151245] xen:grant_table: g.e. 0x22 still pending
[  290.151281] xen:grant_table: g.e. 0xf still pending
[  290.151306] xen:grant_table: g.e. 0x1b still pending
[  291.151015] xen:grant_table: g.e. 0x26 still pending
[  291.151049] xen:grant_table: g.e. 0x21 still pending
[  291.151073] xen:grant_table: g.e. 0x1f still pending
[  291.151096] xen:grant_table: g.e. 0x18 still pending
[  291.151137] xen:grant_table: g.e. 0x23 still pending
[  291.151177] xen:grant_table: g.e. 0x14 still pending
[  291.151201] xen:grant_table: g.e. 0x16 still pending
[  291.151241] xen:grant_table: g.e. 0xb still pending
[  291.151278] xen:grant_table: g.e. 0x1a still pending
[  291.151302] xen:grant_table: g.e. 0x9 still pending
[  292.151015] xen:grant_table: g.e. 0x28 still pending
[  292.151049] xen:grant_table: g.e. 0x12 still pending
[  292.151074] xen:grant_table: g.e. 0xd still pending
[  292.151099] xen:grant_table: g.e. 0x1c still pending
[  292.151140] xen:grant_table: g.e. 0x19 still pending
[  292.151176] xen:grant_table: g.e. 0x17 still pending
[  292.151201] xen:grant_table: g.e. 0x10 still pending
[  292.151240] xen:grant_table: