Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-17 Thread Julien Grall
Hello,

On 15 November 2017 at 11:34, Jayadev Kumaran  wrote:
>>> What defconfig are you based on? Do you have a device-tree support
>>> enabled?
> I use omap2plus_defconfig . Yes , device tree support is there and the dts
> file used is omap5-uevm.dts

Some options in omap2plus_defconfig might upset the kernel such as
CONFIG_ARM_APPENDED_DTB.

>
>>> But it did not get a command line to setup console on hvc0, or the kernel
>>> crashed in earliest stages.
>
> Is there a way to debug which one of the above two possibilities has lead to
> the issue ? As I'm using the dom0 kernel image for my guest, is it still
> possible that it could be a kernel crash since it has already booted up for
> dom0.

From a previous e-mail I see you are using 3.15. Is there any particular reason
to not use at least a stable kernel if not a new one?

Cheers,

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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-17 Thread Julien Grall
On 17 November 2017 at 12:15, Volodymyr Babchuk  wrote:
> Hi Jayadev,
>
> On 17 November 2017 at 13:53, Andrii Anisov  wrote:
>>>
>>> Is there a way to debug which one of the above two possibilities has lead
>>> to the issue ?
>>
>> Four years ago I did it in a following way:
>> - wire up to UART2 pins on an expansion connector (this sheet might be
>> useful for you: http://www.ti.com/lit/ug/swcu130/swcu130.pdf)
>> - assign UART2 IOMEM ranges to DomU
>> - enable in domu kernel earlyprintk and patch it to output to omap UART2
>>
>> Nowadays assigning UART2 IOMEM ranges might be a bit more complex due to XEN
>> evolution.
>>
>> Another way is to use JTAG which understands virtualization, and allows you
>> to debug DomU.
> I want to add some debugging techniques:
>  - By tapping CTRL+A three times to switch to XEN console. Then `d`
> will show you CPU register states. You will be able to see where your
> DomU executes right now. This can help along with addr2line, objdump
> and other tools.
>
>  - You can modify traps.c in XEN to crash domain when SMC instruction
> is trapped. Then you can put SMC invocation into various parts of
> kernel code, to see if it reaches that place. This can help on early
> stages, when console is not available.

No need for modifying the Xen. Xen already provides debug facilities when
CONFIG_DEBUG=y.

You can have a look at do_debug_trap. The ones you likely want are:

  - hvc 0x will show the state of the vCPU
  - hvc 0xfffe will print the PC

Cheers,

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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-17 Thread Julien Grall
On 8 November 2017 at 14:52, Konrad Rzeszutek Wilk
 wrote:
> On Wed, Nov 08, 2017 at 10:47:20AM +0530, Jayadev Kumaran wrote:
>> Hello all,
>>
>> I'm trying to implement Xen hypervisor support on OMAP5432.I have followed
>> the steps as in
>> https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/OMAP5432_uEVM
>> for the initial setup. I'm able to see the domain 0 successfully up.
>>
>>
>>
>>
>>
>>
>>
>> *root@omap5-evm:~# /etc/init.d/xencommons startStarting
>> /usr/local/sbin/xenstored...Setting domain 0 name, domid and JSON
>> config...Done setting up Dom0Starting xenconsoled...Starting QEMU as disk
>> backend for dom0*
>>
>>
>>
>> *root@omap5-evm:~# xl listNameID
>> Mem VCPUs  State   Time(s)Domain-0
>> 0   512 2 r-  11.5*
>
> What does 'xl info' say? B/c:
> ..
>> Expanding d4 grant table from 0 to 1 frames(XEN) memory.c:238:d0v0 Could
>> not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:
>
> .. looks like it could not allocate memory?

This message is not important. The toolstack will always try to use
very big mapping first and then
scale down if it is not possible to allocate.

In this case, the platform does not have 1G contiguous, and will
fallback to 2M mapping.

Cheers,

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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-17 Thread Volodymyr Babchuk
Hi Jayadev,

On 17 November 2017 at 13:53, Andrii Anisov  wrote:
>>
>> Is there a way to debug which one of the above two possibilities has lead
>> to the issue ?
>
> Four years ago I did it in a following way:
> - wire up to UART2 pins on an expansion connector (this sheet might be
> useful for you: http://www.ti.com/lit/ug/swcu130/swcu130.pdf)
> - assign UART2 IOMEM ranges to DomU
> - enable in domu kernel earlyprintk and patch it to output to omap UART2
>
> Nowadays assigning UART2 IOMEM ranges might be a bit more complex due to XEN
> evolution.
>
> Another way is to use JTAG which understands virtualization, and allows you
> to debug DomU.
I want to add some debugging techniques:
 - By tapping CTRL+A three times to switch to XEN console. Then `d`
will show you CPU register states. You will be able to see where your
DomU executes right now. This can help along with addr2line, objdump
and other tools.

 - You can modify traps.c in XEN to crash domain when SMC instruction
is trapped. Then you can put SMC invocation into various parts of
kernel code, to see if it reaches that place. This can help on early
stages, when console is not available.

-- 
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: vlad.babc...@gmail.com

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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-17 Thread Andrii Anisov

Hello Jayadev,

On 15.11.17 13:34, Jayadev Kumaran wrote:

Hello Andrii,

>> What defconfig are you based on? Do you have a device-tree support 
enabled?


I use /omap2plus_defconfig/ . Yes , device tree support is there and 
the dts file used is /omap5-uevm.dts


>> /But it did not get a command line to setup console on hvc0, or the 
kernel crashed in earliest stages.


Is there a way to debug which one of the above two possibilities has 
lead to the issue ?

Four years ago I did it in a following way:
    - wire up to UART2 pins on an expansion connector (this sheet might 
be useful for you: http://www.ti.com/lit/ug/swcu130/swcu130.pdf)

    - assign UART2 IOMEM ranges to DomU
    - enable in domu kernel earlyprintk and patch it to output to omap 
UART2


Nowadays assigning UART2 IOMEM ranges might be a bit more complex due to 
XEN evolution.


Another way is to use JTAG which understands virtualization, and allows 
you to debug DomU.


--

*Andrii Anisov*


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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-15 Thread Jayadev Kumaran
Hello Andrii,

>> What defconfig are you based on? Do you have a device-tree support
enabled?

I use *omap2plus_defconfig* . Yes , device tree support is there and the
dts file used is

*omap5-uevm.dts>> *But it did not get a command line to setup console on
hvc0, or the kernel crashed in earliest stages.

Is there a way to debug which one of the above two possibilities has lead
to the issue ? As I'm using the dom0 kernel image for my guest, is it still
possible that it could be a kernel crash since it has already booted up for
dom0.

Thanks and Regards,

On Wed, Nov 15, 2017 at 4:31 PM, Andrii Anisov 
wrote:

> Hello Jayadev,
>
>
> On 15.11.17 12:46, Jayadev Kumaran wrote:
>
>> Hello Andrii,
>>
>> >> What kernel do you use for DomU? Please make sure you have in that
>> kernel configuration XEN support enabled (together with hypervisor console
>> support).
>>
>> I use a 3.15 kernel (git://git.kernel.org/pub/scm/
>> linux/kernel/git/torvalds/linux.git > /linux/kernel/git/torvalds/linux.git>) with the following configs
>> enabled for Xen support.
>> CONFIG_XEN_DOM0=y
>> CONFIG_XEN=y
>> CONFIG_XEN_BLKDEV_FRONTEND=y
>> CONFIG_XEN_BLKDEV_BACKEND=y
>> CONFIG_XEN_NETDEV_FRONTEND=y
>> CONFIG_XEN_NETDEV_BACKEND=y
>> CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
>> CONFIG_HVC_XEN=y
>> CONFIG_HVC_XEN_FRONTEND=y
>> CONFIG_XEN_DEV_EVTCHN=y
>> CONFIG_XEN_BACKEND=y
>> CONFIG_XENFS=y
>> CONFIG_XEN_COMPAT_XENFS=y
>> CONFIG_XEN_SYS_HYPERVISOR=y
>> CONFIG_XEN_XENBUS_FRONTEND=y
>> CONFIG_XEN_GNTDEV=y
>> CONFIG_XEN_GRANT_DEV_ALLOC=y
>> CONFIG_XEN_PRIVCMD=y
>>
>> In fact, it is the same kernel as that of dom0, just to check if Xen is
>> properly configured.
>>
> What defconfig are you based on? Do you have a device-tree support enabled?
>
> Also, I had previously tried with a kernel image with no Xen support and
>> the results were quite similar - guest domain gets created and is shown in
>> a running state as per /'xl list' /, however /'xl console/' shows nothing
>> but hangs until I press Ctrl+5 .
>>
> Your guest is created and XEN treats it as being running, you can see this
> in `xl list`.
> But it did not get a command line to setup console on hvc0, or the kernel
> crashed in earliest stages.
>
>
> --
>
> *Andrii Anisov*
>
>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-15 Thread Andrii Anisov

Hello Jayadev,


On 15.11.17 12:46, Jayadev Kumaran wrote:

Hello Andrii,

>> What kernel do you use for DomU? Please make sure you have in that 
kernel configuration XEN support enabled (together with hypervisor 
console support).


I use a 3.15 kernel 
(git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
) 
with the following configs enabled for Xen support.

CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_BACKEND=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=y
CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_XEN_PRIVCMD=y

In fact, it is the same kernel as that of dom0, just to check if Xen 
is properly configured.

What defconfig are you based on? Do you have a device-tree support enabled?

Also, I had previously tried with a kernel image with no Xen support 
and the results were quite similar - guest domain gets created and is 
shown in a running state as per /'xl list' /, however /'xl console/' 
shows nothing but hangs until I press Ctrl+5 .
Your guest is created and XEN treats it as being running, you can see 
this in `xl list`.
But it did not get a command line to setup console on hvc0, or the 
kernel crashed in earliest stages.



--

*Andrii Anisov*



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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-15 Thread Jayadev Kumaran
Hello Andrii,

>> What kernel do you use for DomU? Please make sure you have in that
kernel configuration XEN support enabled (together with hypervisor console
support).

I use a 3.15 kernel (git://
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) with the
following configs enabled for Xen support.

CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_BACKEND=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=y
CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_XEN_PRIVCMD=y


In fact, it is the same kernel as that of dom0, just to check if Xen is
properly configured.

Also, I had previously tried with a kernel image with no Xen support and
the results were quite similar - guest domain gets created and is shown in
a running state as per *'xl list' *, however *'xl console*' shows nothing
but hangs until I press Ctrl+5 .

Thanks and Regards,

On Wed, Nov 15, 2017 at 3:45 PM, Andrii Anisov 
wrote:

> Dear Jayadev,
>
>
> Find my comments inlined:
>
>
> On 15.11.17 08:08, Jayadev Kumaran wrote:
>
>> Hello Andrii,
>>
>> >> BTW, what is your dom0 system? Does it have bash?
>> > _dom0 uses a modified kernel(3.15) with Xen support and  default omap
>> fs_
>>
>> I made certain changes to my configuration file. Instead of trying to use
>> a disk, I want to the guest domain up from ramdisk image.
>>
> Its quite wise idea to sort out problems.
>
> My new configuration file looks like
>>
>> "
>> name = "android"
>>
>> kernel = "/home/root/android/kernel"
>> ramdisk = "/home/root/android/ramdisk.img"
>> #bootloader = "/usr/lib/xen-4.4/bin/pygrub"
>>
>> memory = 512
>> vcpus = 1
>>
>> device_model_version = 'qemu-xen-traditional'
>>
>> extra = "console=hvc0 rw init=/bin/sh earlyprintk=xenboot"
>>
>> "
>>
>> I'm able to create a guest domain as well.
>>
>> /root@omap5-evm:~# xl -vvv create android.cfg
>>
>> Parsing config from android.cfg
>> libxl: debug: libxl_create.c:1646:do_domain_create: Domain 0:ao 0x46e30:
>> create: how=(nil) callback=(nil) poller=0x46e90
>> libxl: debug: libxl_arm.c:87:libxl__arch_domain_prepare_config:
>> Configure the domain
>> libxl: debug: libxl_arm.c:90:libxl__arch_domain_prepare_config:  -
>> Allocate 0 SPIs
>> libxl: debug: libxl_create.c:987:initiate_domain_create: Domain
>> 1:running bootloader
>> libxl: debug: libxl_bootloader.c:335:libxl__bootloader_run: Domain 1:no
>> bootloader configured, using user supplied kernel
>> libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch
>> w=0x47780: deregister unregistered
>> (XEN) grant_table.c:1688:d0v0 Expanding d1 grant table from 0 to 1 frames
>> domainbuilder: detail: xc_dom_allocate: cmdline="console=hvc0 rw
>> init=/bin/sh earlyprintk=xenboot", features=""
>> libxl: debug: libxl_dom.c:779:libxl__build_pv: pv kernel mapped 0 path
>> /home/root/android/kernel
>> domainbuilder: detail: xc_dom_kernel_file: filename="/home/root/android/k
>> ernel"
>> domainbuilder: detail: xc_dom_malloc_filemap: 4782 kB
>> domainbuilder: detail: xc_dom_ramdisk_file: filename="/home/root/android/r
>> amdisk.img"
>> domainbuilder: detail: xc_dom_malloc_filemap: 179 kB
>> domainbuilder: detail: xc_dom_boot_xen_init: ver 4.10, caps xen-3.0-armv7l
>> domainbuilder: detail: xc_dom_rambase_init: RAM starts at 4
>> domainbuilder: detail: xc_dom_parse_image: called
>> domainbuilder: detail: xc_dom_find_loader: trying multiboot-binary loader
>> ...
>> domainbuilder: detail: loader probe failed
>> domainbuilder: detail: xc_dom_find_loader: trying Linux zImage (ARM64)
>> loader ...
>> domainbuilder: detail: xc_dom_probe_zimage64_kernel: kernel is not an
>> arm64 Image
>> domainbuilder: detail: loader probe failed
>> domainbuilder: detail: xc_dom_find_loader: trying Linux zImage (ARM32)
>> loader ...
>> domainbuilder: detail: loader probe OK
>> domainbuilder: detail: xc_dom_parse_zimage32_kernel: called
>> domainbuilder: detail: xc_dom_parse_zimage32_kernel: xen-3.0-armv7l:
>> 0x40008000 -> 0x404b3b28
>> libxl: debug: libxl_arm.c:866:libxl__prepare_dtb: constructing DTB for
>> Xen version 4.10 guest
>> libxl: debug: libxl_arm.c:867:libxl__prepare_dtb:  - vGIC version: V2
>> libxl: debug: libxl_arm.c:321:make_chosen_node: /chosen/bootargs =
>> console=hvc0 rw init=/bin/sh earlyprintk=xenboot
>> libxl: debug: libxl_arm.c:328:make_chosen_node: /chosen adding
>> placeholder linux,initrd properties
>> libxl: debug: libxl_arm.c:441:make_memory_nodes: Creating placeholder
>> node /memory@4000
>> libxl: debug: libxl_arm.c:441:make_memory_nodes: Creating placeholder
>> node /memory@2
>> libxl: debug: libxl_arm.c:964:libxl__prepare_dtb: fdt total size 1394
>> domainbuilder: detail: xc_dom_devicetree_mem: called
>> libxl: debug: 

Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-15 Thread Andrii Anisov

Dear Jayadev,


Find my comments inlined:


On 15.11.17 08:08, Jayadev Kumaran wrote:

Hello Andrii,

>> BTW, what is your dom0 system? Does it have bash?
> _dom0 uses a modified kernel(3.15) with Xen support and  default 
omap fs_


I made certain changes to my configuration file. Instead of trying to 
use a disk, I want to the guest domain up from ramdisk image.

Its quite wise idea to sort out problems.


My new configuration file looks like

"
name = "android"

kernel = "/home/root/android/kernel"
ramdisk = "/home/root/android/ramdisk.img"
#bootloader = "/usr/lib/xen-4.4/bin/pygrub"

memory = 512
vcpus = 1

device_model_version = 'qemu-xen-traditional'

extra = "console=hvc0 rw init=/bin/sh earlyprintk=xenboot"

"

I'm able to create a guest domain as well.

/root@omap5-evm:~# xl -vvv create android.cfg
Parsing config from android.cfg
libxl: debug: libxl_create.c:1646:do_domain_create: Domain 0:ao 
0x46e30: create: how=(nil) callback=(nil) poller=0x46e90
libxl: debug: libxl_arm.c:87:libxl__arch_domain_prepare_config: 
Configure the domain
libxl: debug: libxl_arm.c:90:libxl__arch_domain_prepare_config:  - 
Allocate 0 SPIs
libxl: debug: libxl_create.c:987:initiate_domain_create: Domain 
1:running bootloader
libxl: debug: libxl_bootloader.c:335:libxl__bootloader_run: Domain 
1:no bootloader configured, using user supplied kernel
libxl: debug: libxl_event.c:686:libxl__ev_xswatch_deregister: watch 
w=0x47780: deregister unregistered

(XEN) grant_table.c:1688:d0v0 Expanding d1 grant table from 0 to 1 frames
domainbuilder: detail: xc_dom_allocate: cmdline="console=hvc0 rw 
init=/bin/sh earlyprintk=xenboot", features=""
libxl: debug: libxl_dom.c:779:libxl__build_pv: pv kernel mapped 0 path 
/home/root/android/kernel
domainbuilder: detail: xc_dom_kernel_file: 
filename="/home/root/android/kernel"

domainbuilder: detail: xc_dom_malloc_filemap    : 4782 kB
domainbuilder: detail: xc_dom_ramdisk_file: 
filename="/home/root/android/ramdisk.img"

domainbuilder: detail: xc_dom_malloc_filemap    : 179 kB
domainbuilder: detail: xc_dom_boot_xen_init: ver 4.10, caps 
xen-3.0-armv7l

domainbuilder: detail: xc_dom_rambase_init: RAM starts at 4
domainbuilder: detail: xc_dom_parse_image: called
domainbuilder: detail: xc_dom_find_loader: trying multiboot-binary 
loader ...

domainbuilder: detail: loader probe failed
domainbuilder: detail: xc_dom_find_loader: trying Linux zImage (ARM64) 
loader ...
domainbuilder: detail: xc_dom_probe_zimage64_kernel: kernel is not an 
arm64 Image

domainbuilder: detail: loader probe failed
domainbuilder: detail: xc_dom_find_loader: trying Linux zImage (ARM32) 
loader ...

domainbuilder: detail: loader probe OK
domainbuilder: detail: xc_dom_parse_zimage32_kernel: called
domainbuilder: detail: xc_dom_parse_zimage32_kernel: xen-3.0-armv7l: 
0x40008000 -> 0x404b3b28
libxl: debug: libxl_arm.c:866:libxl__prepare_dtb: constructing DTB for 
Xen version 4.10 guest

libxl: debug: libxl_arm.c:867:libxl__prepare_dtb:  - vGIC version: V2
libxl: debug: libxl_arm.c:321:make_chosen_node: /chosen/bootargs = 
console=hvc0 rw init=/bin/sh earlyprintk=xenboot
libxl: debug: libxl_arm.c:328:make_chosen_node: /chosen adding 
placeholder linux,initrd properties
libxl: debug: libxl_arm.c:441:make_memory_nodes: Creating placeholder 
node /memory@4000
libxl: debug: libxl_arm.c:441:make_memory_nodes: Creating placeholder 
node /memory@2

libxl: debug: libxl_arm.c:964:libxl__prepare_dtb: fdt total size 1394
domainbuilder: detail: xc_dom_devicetree_mem: called
libxl: debug: libxl_arm.c:1005:libxl__arch_domain_init_hw_description: 
Generating ACPI tables is disabled by user.
domainbuilder: detail: xc_dom_mem_init: mem 512 MB, pages 0x2 
pages, 4k each

domainbuilder: detail: xc_dom_mem_init: 0x2 pages
domainbuilder: detail: xc_dom_boot_mem_init: called
domainbuilder: detail: set_mode: guest xen-3.0-armv7l, address size 32
domainbuilder: detail: xc_dom_malloc    : 1024 kB
domainbuilder: detail: populate_guest_memory: populating RAM @ 
4000-6000 (512MB)
domainbuilder: detail: populate_one_size: populated 0x100/0x100 
entries with shift 9

domainbuilder: detail: meminit: placing boot modules at 0x4800
domainbuilder: detail: meminit: ramdisk: 0x4800 -> 0x4802d000
domainbuilder: detail: meminit: devicetree: 0x4802d000 -> 0x4802e000
libxl: debug: 
libxl_arm.c:1073:libxl__arch_domain_finalise_hw_description: /chosen 
updating initrd properties to cover 4800-4802d000
libxl: debug: libxl_arm.c:1039:finalise_one_node: Populating 
placeholder node /memory@4000
libxl: debug: libxl_arm.c:1033:finalise_one_node: Nopping out 
placeholder node /memory@2

domainbuilder: detail: xc_dom_build_image: called
domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 
0x40008+0x4ac at 0xb6098000
domainbuilder: detail: xc_dom_alloc_segment:   kernel : 0x40008000 -> 
0x404b4000  (pfn 0x40008 + 0x4ac pages)

domainbuilder: detail: xc_dom_load_zimage_kernel: 

Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-14 Thread Jayadev Kumaran
Hello Andrii,

>> BTW, what is your dom0 system? Does it have bash?
> *dom0 uses a modified kernel(3.15) with Xen support and  default omap fs*


I made certain changes to my configuration file. Instead of trying to use a
disk, I want to the guest domain up from  ramdisk image. My new
configuration file looks like

"
name = "android"

kernel = "/home/root/android/kernel"
ramdisk = "/home/root/android/ramdisk.img"
#bootloader = "/usr/lib/xen-4.4/bin/pygrub"

memory = 512
vcpus = 1

device_model_version = 'qemu-xen-traditional'

extra = "console=hvc0 rw init=/bin/sh earlyprintk=xenboot"

"

I'm able to create a guest domain as well.















































































































*root@omap5-evm:~# xl -vvv create android.cfg Parsing config from
android.cfglibxl: debug: libxl_create.c:1646:do_domain_create: Domain 0:ao
0x46e30: create: how=(nil) callback=(nil) poller=0x46e90libxl: debug:
libxl_arm.c:87:libxl__arch_domain_prepare_config: Configure the
domainlibxl: debug: libxl_arm.c:90:libxl__arch_domain_prepare_config:  -
Allocate 0 SPIslibxl: debug: libxl_create.c:987:initiate_domain_create:
Domain 1:running bootloaderlibxl: debug:
libxl_bootloader.c:335:libxl__bootloader_run: Domain 1:no bootloader
configured, using user supplied kernellibxl: debug:
libxl_event.c:686:libxl__ev_xswatch_deregister: watch w=0x47780: deregister
unregistered(XEN) grant_table.c:1688:d0v0 Expanding d1 grant table from 0
to 1 framesdomainbuilder: detail: xc_dom_allocate: cmdline="console=hvc0 rw
init=/bin/sh earlyprintk=xenboot", features=""libxl: debug:
libxl_dom.c:779:libxl__build_pv: pv kernel mapped 0 path
/home/root/android/kerneldomainbuilder: detail: xc_dom_kernel_file:
filename="/home/root/android/kernel"domainbuilder: detail:
xc_dom_malloc_filemap: 4782 kBdomainbuilder: detail:
xc_dom_ramdisk_file:
filename="/home/root/android/ramdisk.img"domainbuilder: detail:
xc_dom_malloc_filemap: 179 kBdomainbuilder: detail:
xc_dom_boot_xen_init: ver 4.10, caps xen-3.0-armv7l domainbuilder: detail:
xc_dom_rambase_init: RAM starts at 4domainbuilder: detail:
xc_dom_parse_image: calleddomainbuilder: detail: xc_dom_find_loader: trying
multiboot-binary loader ... domainbuilder: detail: loader probe
faileddomainbuilder: detail: xc_dom_find_loader: trying Linux zImage
(ARM64) loader ... domainbuilder: detail: xc_dom_probe_zimage64_kernel:
kernel is not an arm64 Imagedomainbuilder: detail: loader probe
faileddomainbuilder: detail: xc_dom_find_loader: trying Linux zImage
(ARM32) loader ... domainbuilder: detail: loader probe OKdomainbuilder:
detail: xc_dom_parse_zimage32_kernel: calleddomainbuilder: detail:
xc_dom_parse_zimage32_kernel: xen-3.0-armv7l: 0x40008000 ->
0x404b3b28libxl: debug: libxl_arm.c:866:libxl__prepare_dtb: constructing
DTB for Xen version 4.10 guestlibxl: debug:
libxl_arm.c:867:libxl__prepare_dtb:  - vGIC version: V2libxl: debug:
libxl_arm.c:321:make_chosen_node: /chosen/bootargs = console=hvc0 rw
init=/bin/sh earlyprintk=xenbootlibxl: debug:
libxl_arm.c:328:make_chosen_node: /chosen adding placeholder linux,initrd
propertieslibxl: debug: libxl_arm.c:441:make_memory_nodes: Creating
placeholder node /memory@4000libxl: debug:
libxl_arm.c:441:make_memory_nodes: Creating placeholder node
/memory@2libxl: debug: libxl_arm.c:964:libxl__prepare_dtb: fdt
total size 1394domainbuilder: detail: xc_dom_devicetree_mem: calledlibxl:
debug: libxl_arm.c:1005:libxl__arch_domain_init_hw_description: Generating
ACPI tables is disabled by user.domainbuilder: detail: xc_dom_mem_init: mem
512 MB, pages 0x2 pages, 4k eachdomainbuilder: detail: xc_dom_mem_init:
0x2 pagesdomainbuilder: detail: xc_dom_boot_mem_init:
calleddomainbuilder: detail: set_mode: guest xen-3.0-armv7l, address size
32domainbuilder: detail: xc_dom_malloc: 1024 kBdomainbuilder:
detail: populate_guest_memory: populating RAM @
4000-6000 (512MB)domainbuilder: detail:
populate_one_size: populated 0x100/0x100 entries with shift 9domainbuilder:
detail: meminit: placing boot modules at 0x4800domainbuilder: detail:
meminit: ramdisk: 0x4800 -> 0x4802d000domainbuilder: detail: meminit:
devicetree: 0x4802d000 -> 0x4802e000libxl: debug:
libxl_arm.c:1073:libxl__arch_domain_finalise_hw_description: /chosen
updating initrd properties to cover 4800-4802d000libxl: debug:
libxl_arm.c:1039:finalise_one_node: Populating placeholder node
/memory@4000libxl: debug: libxl_arm.c:1033:finalise_one_node: Nopping
out placeholder node /memory@2domainbuilder: detail:
xc_dom_build_image: calleddomainbuilder: detail:
xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 0x40008+0x4ac at
0xb6098000domainbuilder: detail: xc_dom_alloc_segment:   kernel   :
0x40008000 -> 0x404b4000  (pfn 0x40008 + 0x4ac pages)domainbuilder: detail:
xc_dom_load_zimage_kernel: calleddomainbuilder: detail:
xc_dom_load_zimage_kernel: kernel seg 0x40008000-0x404b4000domainbuilder:
detail: 

Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-09 Thread Andrii Anisov

Hello Jayadev,

Please see my comments inlined:


On 08.11.17 07:17, Jayadev Kumaran wrote:

Hello all,

I'm trying to implement Xen hypervisor support on OMAP5432.I have 
followed the steps as in 
https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/OMAP5432_uEVM 
for the initial setup. I'm able to see the domain 0 successfully up.


/root@omap5-evm:~# /etc/init.d/xencommons start
Starting /usr/local/sbin/xenstored...
Setting domain 0 name, domid and JSON config...
Done setting up Dom0
Starting xenconsoled...
Starting QEMU as disk backend for dom0
/
Never used QEMU as disk backend on ARM. We are using raw partition for a 
disk.


/root@omap5-evm:~# xl list
NameID   Mem VCPUs  
State   Time(s)
Domain-0 0   512 2 r-  
11.5

/
I have used the below configuration file for creating a guest domain.
"
name = "ubuntu"

kernel = "/home/root/ubuntu/vmlinuz"
ramdisk = "/home/root/ubuntu/initrd.gz"
#bootloader = "/usr/lib/xen-4.4/bin/pygrub"

memory = 1024
vcpus = 1

device_model_version = 'qemu-xen-traditional'

I would suggest to run the stuff without this line.


disk = [
 '/dev/vg0/domu0,raw,xvda,rw'

Do you really have "/dev/vg0/domu0" in your dom0?

   ]

"

But when I try to create the guest domain using xl create command,I 
get the below error.


/root@omap5-evm:/# xl create -d -c /etc/xen/config.d/ubuntu.cfg/
Please try adding ` xl - create -d -c /etc/xen/config.d/ubuntu.cfg` 
for getting more output./

/

/
Parsing config from /etc/xen/config.d/ubuntu.cfg
{
"c_info": {
"type": "pv",
"name": "ubuntu",
"uuid": "d7dd7835-61e3-46ce-b76f-140c0f9673fe",
"run_hotplug_scripts": "True"
},
"b_info": {
"max_vcpus": 1,
"avail_vcpus": [
0
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"shadow_memkb": 9216,
"device_model_version": "qemu_xen_traditional",
"sched_params": {

},
"claim_mode": "True",
"kernel": "/home/root/ubuntu/vmlinuz",
"ramdisk": "/home/root/ubuntu/initrd.gz",
"type.pv": {

},
"arch_arm": {

}
},
"disks": [
{
"pdev_path": "/dev/vg0/domu0",
"vdev": "xvda",
"format": "raw",
"readwrite": 1
}
],
"on_reboot": "restart",
"on_soft_reset": "soft_reset"
}
(XEN) grant_table.c:1688:d0v0 Expanding d4 grant table from 0 to 1 frames
(XEN) memory.c:238:d0v0 Could not allocate order=18 extent: id=4 
memflags=0xc0 (0 of 1)
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: 
/etc/xen/scripts/block add [1612] exited with error status 1
libxl: error: libxl_create.c:1278:domcreate_launch_dm: Domain 4:unable 
to add disk devices
libxl: error: libxl_domain.c:1000:libxl__destroy_domid: Domain 
4:Non-existant domain
libxl: error: libxl_domain.c:959:domain_destroy_callback: Domain 
4:Unable to destroy guest
libxl: error: libxl_domain.c:886:domain_destroy_cb: Domain 
4:Destruction of domain failed

/
Any input would be highly appreciated


BTW, what is your dom0 system? Does it have bash?
Long time ago, we had busybox in dom0, and used 
https://marc.info/?l=xen-devel=146358920813936=4 to workaround block 
device creation issues.


--

*Andrii Anisov*



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


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-08 Thread Jayadev Kumaran
Hello Konrad,

Apologies for the incomplete mail. Adding to the previous reply;

>> not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:

> looks like it could not allocate memory?

In my configuration file, i had used "memory=1024" . However if I use any
value <=512 , the above error log is not seen. However the rest of the logs
appear and it is still unable to add disk devices.

Regards

On Thu, Nov 9, 2017 at 12:09 PM, Jayadev Kumaran 
wrote:

> Hello Konrad,
>
> >> What does 'xl info' say? B/c:
>
> xl info gives the below output
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *root@omap5-evm:~# xl infohost   :
> omap5-evmrelease: 3.15.0-dirtyversion: #18
> SMP Fri Nov 3 14:33:50 IST 2017machine:
> armv7lnr_cpus: 2max_cpu_id :
> 1nr_nodes   : 1cores_per_socket   : 1threads_per_core
> : 1cpu_mhz: 6hw_caps:
> :::::::virt_caps
> :total_memory   : 2032free_memory:
> 1439sharing_freed_memory   : 0sharing_used_memory:
> 0outstanding_claims : 0free_cpus  : 0xen_major
> : 4xen_minor  : 10xen_extra  :
> .0-rcxen_version: 4.10.0-rcxen_caps   :
> xen-3.0-armv7l xen_scheduler  : creditxen_pagesize   :
> 4096platform_params: virt_start=0x20xen_changeset  :
> Mon Oct 16 15:14:16 2017 +0100 git:24fb44e-dirtyxen_commandline:
> sync_console console=dtuart dtuart=serial2cc_compiler:
> arm-linux-gnueabihf-gcc (crosstool-NG
> linaro-1.13.1-4.7-2013.03cc_compile_by  :
> ritikacc_compile_domain  : cc_compile_date: Fri Oct 27 11:39:32
> IST 2017build_id   :
> ed71e48dc494388691dac13664932a8f5ed3ee45xend_config_format : 4*
>  >> not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:
>
>  > looks like it could not allocate memory?
>
> On Wed, Nov 8, 2017 at 8:22 PM, Konrad Rzeszutek Wilk <
> konrad.w...@oracle.com> wrote:
>
>> On Wed, Nov 08, 2017 at 10:47:20AM +0530, Jayadev Kumaran wrote:
>> > Hello all,
>> >
>> > I'm trying to implement Xen hypervisor support on OMAP5432.I have
>> followed
>> > the steps as in
>> > https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization
>> _Extensions/OMAP5432_uEVM
>> > for the initial setup. I'm able to see the domain 0 successfully up.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > *root@omap5-evm:~# /etc/init.d/xencommons startStarting
>> > /usr/local/sbin/xenstored...Setting domain 0 name, domid and JSON
>> > config...Done setting up Dom0Starting xenconsoled...Starting QEMU as
>> disk
>> > backend for dom0*
>> >
>> >
>> >
>> > *root@omap5-evm:~# xl listName
>> ID
>> > Mem VCPUs  State   Time(s)Domain-0
>> > 0   512 2 r-  11.5*
>>
>> What does 'xl info' say? B/c:
>> ..
>> > Expanding d4 grant table from 0 to 1 frames(XEN) memory.c:238:d0v0 Could
>> > not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:
>>
>> .. looks like it could not allocate memory?
>>
>
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-08 Thread Jayadev Kumaran
Hello Konrad,

>> What does 'xl info' say? B/c:

xl info gives the below output




































*root@omap5-evm:~# xl infohost   :
omap5-evmrelease: 3.15.0-dirtyversion: #18
SMP Fri Nov 3 14:33:50 IST 2017machine:
armv7lnr_cpus: 2max_cpu_id :
1nr_nodes   : 1cores_per_socket   : 1threads_per_core
: 1cpu_mhz: 6hw_caps:
:::::::virt_caps
:total_memory   : 2032free_memory:
1439sharing_freed_memory   : 0sharing_used_memory:
0outstanding_claims : 0free_cpus  : 0xen_major
: 4xen_minor  : 10xen_extra  :
.0-rcxen_version: 4.10.0-rcxen_caps   :
xen-3.0-armv7l xen_scheduler  : creditxen_pagesize   :
4096platform_params: virt_start=0x20xen_changeset  :
Mon Oct 16 15:14:16 2017 +0100 git:24fb44e-dirtyxen_commandline:
sync_console console=dtuart dtuart=serial2cc_compiler:
arm-linux-gnueabihf-gcc (crosstool-NG
linaro-1.13.1-4.7-2013.03cc_compile_by  :
ritikacc_compile_domain  : cc_compile_date: Fri Oct 27 11:39:32
IST 2017build_id   :
ed71e48dc494388691dac13664932a8f5ed3ee45xend_config_format : 4*
 >> not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:

 > looks like it could not allocate memory?

On Wed, Nov 8, 2017 at 8:22 PM, Konrad Rzeszutek Wilk <
konrad.w...@oracle.com> wrote:

> On Wed, Nov 08, 2017 at 10:47:20AM +0530, Jayadev Kumaran wrote:
> > Hello all,
> >
> > I'm trying to implement Xen hypervisor support on OMAP5432.I have
> followed
> > the steps as in
> > https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/
> OMAP5432_uEVM
> > for the initial setup. I'm able to see the domain 0 successfully up.
> >
> >
> >
> >
> >
> >
> >
> > *root@omap5-evm:~# /etc/init.d/xencommons startStarting
> > /usr/local/sbin/xenstored...Setting domain 0 name, domid and JSON
> > config...Done setting up Dom0Starting xenconsoled...Starting QEMU as disk
> > backend for dom0*
> >
> >
> >
> > *root@omap5-evm:~# xl listNameID
> > Mem VCPUs  State   Time(s)Domain-0
> > 0   512 2 r-  11.5*
>
> What does 'xl info' say? B/c:
> ..
> > Expanding d4 grant table from 0 to 1 frames(XEN) memory.c:238:d0v0 Could
> > not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:
>
> .. looks like it could not allocate memory?
>
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] Unable to create guest PV domain on OMAP5432

2017-11-08 Thread Konrad Rzeszutek Wilk
On Wed, Nov 08, 2017 at 10:47:20AM +0530, Jayadev Kumaran wrote:
> Hello all,
> 
> I'm trying to implement Xen hypervisor support on OMAP5432.I have followed
> the steps as in
> https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/OMAP5432_uEVM
> for the initial setup. I'm able to see the domain 0 successfully up.
> 
> 
> 
> 
> 
> 
> 
> *root@omap5-evm:~# /etc/init.d/xencommons startStarting
> /usr/local/sbin/xenstored...Setting domain 0 name, domid and JSON
> config...Done setting up Dom0Starting xenconsoled...Starting QEMU as disk
> backend for dom0*
> 
> 
> 
> *root@omap5-evm:~# xl listNameID
> Mem VCPUs  State   Time(s)Domain-0
> 0   512 2 r-  11.5*

What does 'xl info' say? B/c:
..
> Expanding d4 grant table from 0 to 1 frames(XEN) memory.c:238:d0v0 Could
> not allocate order=18 extent: id=4 memflags=0xc0 (0 of 1)libxl: error:

.. looks like it could not allocate memory?

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