[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Pass-through on Arndale 5250

I followed this guide:


to get xen installed on the arndale 5250 with an ubuntu Dom0 and I am
able to create guests without problems. Now I am would like to pass a
device to a guest, as a proof of concept. I choose the ethernet port
because that will be useful down the road but right now I would be happy
passing anything through. I then followed the example from this


but so far I have not been able to start a guest with the device
passed to it. I tried updating the Flat Device Tree, u-boot and
dtc. I am unsure what values to use for irqs and iomem as the
example did not give details on where they got their numbers.


Details of what I tried:

I get the error:

libxl: error: libxl_arm.c:604:check_partial_fdt: Partial FDT is not a
valid Flat Device Tree
libxl: error: libxl_dom.c:710:libxl__build_pv:
libxl__arch_domain_init_hw_description failed: No such file or directory

I found that there was not a separate entry for the ethernet port under
/proc/device-tree as there was in the example. Instead the port seems
to be viewed as just a usb device and is given a random new mac address
at each boot time. I set it for pass-through by adding:

fdt set /usb@12110000 status disabled
fdt set /usb@12110000 xen,passthrough

to my u-boot startup image. This disabled all of the usb ports and the
ethernet port on the board but that is acceptable to me as long as it is
a workable option to pass them all through to a DomU.

Then using the example as a template it looked like the values for
'compatible' and 'interrupts' would be copied to the partial device tree
so I ran:

# hexdump -C interrupts
00000000Â 00 00 00 00 00 00 00 47Â 00 00 00 00ÂÂÂÂÂÂÂÂÂÂÂÂÂ |.......G....|
# hexdump -C compatible
00000000 73 61 6d 73 75 6e 67 2c 65 78 79 6e 6f 73 34 32
00000010Â 31 30 2d 65 68 63 69 00ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |10-ehci.|

Where the value of 'reg' came from was unclear to me so I used the same
value as the example, and I wrote the following:

Here are the contents of my partial device tree:


/ {
ÂÂÂ /* #*cells are here to keep DTC happy */
ÂÂÂ #address-cells = <2>;
ÂÂÂ #size-cells = <2>;

ÂÂÂ aliases {
ÂÂÂÂÂÂÂ net = &usb;
ÂÂÂ };

ÂÂÂ passthrough {
ÂÂÂÂÂÂÂ compatible = "simple-bus";
ÂÂÂÂÂÂÂ ranges;
ÂÂÂÂÂÂÂ #address-cells = <2>;
ÂÂÂÂÂÂÂ #size-cells = <2>;
ÂÂÂ usb: usb@10000000 {
ÂÂÂÂÂÂÂ compatible = "samsung,exynos42";
ÂÂÂÂÂÂÂ reg = <0 0x10000000 0 0x1000>;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ interrupts = <0 47 0>;
ÂÂÂ };
ÂÂÂ };

and compiled it with:

dtc guest-midway.dts > guest-midway.dtb

BTW: The pdf said to get the value for reg I would need to find a hole
in the guest layout defined in xen/include/public/arch-arm.h. I checked
out RELEASE-4.6.0 for my build and I found that file but couldn't figure
out how to use the file to find a hole, an example would be much

I then added the following to the DomU config file:

device_tree = "/root/guest-midway.dtb"
dtdev = [ "/usb@12110000" ]
irqs = [ 112, 113, 114 ]
iomem = [ "0x12110000,1@0x10000" ]

I was unsure what values to use for irqs and iomem as the example did
not give details on where they got their numbers. I looked at
/proc/interrupts and saw this:

root@dom0:~# cat /proc/interrupts
27:ÂÂÂÂÂÂ 6698ÂÂÂÂÂÂ GICÂ 27Â arch_timer
65:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 65Â 10800000.mdma
66:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 66Â 121a0000.pdma
67:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 67Â 121b0000.pdma
74:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 74Â 101d0000.watchdog
75:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 75Â s3c2410-rtc alarm
76:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 76Â s3c2410-rtc tick
77:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 77Â 13400000.pinctrl
78:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 78Â 11400000.pinctrl
79:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 79Â 3860000.pinctrl
82:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 82Â 10d10000.pinctrl
88:ÂÂÂÂÂÂÂ 462ÂÂÂÂÂÂ GICÂ 88Â 12c60000.i2c
90:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 90Â 12c80000.i2c
91:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 91Â 12c90000.i2c
96:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 96Â 12ce0000.i2c
97:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GICÂ 97Â 10060000.tmu
103:ÂÂÂÂÂÂ 1537ÂÂÂÂÂÂ GIC 103Â ehci_hcd:usb3, ohci_hcd:usb4
104:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GIC 104Â xhci-hcd:usb1
107:ÂÂÂÂÂÂ 5107ÂÂÂÂÂÂ GIC 107Â dw-mci
109:ÂÂÂÂÂ 21989ÂÂÂÂÂÂ GIC 109Â dw-mci
156:ÂÂÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ GIC 156Â 11c10000.mdma
160:ÂÂÂÂÂÂÂÂ 51ÂÂ xen-dyn-eventÂÂÂÂ xenbus
181:ÂÂÂÂÂÂÂÂÂ 1Â exynos_wkup_irq_chipÂÂ 2Â s5m8767
182:ÂÂÂÂÂÂÂÂÂ 0Â xen-percpu-virqÂÂÂÂÂ hvc_console
183:ÂÂÂÂÂÂÂÂÂ 0ÂÂ s5m8767Â 12Â rtc-alarm0
184:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 4Â SW-TACT2
185:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 5Â SW-TACT3
186:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 6Â SW-TACT4
187:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 7Â SW-TACT5
188:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 0Â SW-TACT6
189:ÂÂÂÂÂÂÂÂÂ 0Â exynos_wkup_irq_chipÂÂ 1Â SW-TACT7
190:ÂÂÂÂÂÂÂÂ 32ÂÂ xen-dyn-eventÂÂÂÂ evtchn:oxenstored
191:ÂÂÂÂÂÂÂÂÂ 0ÂÂ xen-dyn-eventÂÂÂÂ evtchn:oxenstored
IPI0:ÂÂÂÂÂÂÂÂÂ 0Â CPU wakeup interrupts
IPI1:ÂÂÂÂÂÂÂÂÂ 0Â Timer broadcast interrupts
IPI2:ÂÂÂÂÂÂÂÂÂ 0Â Rescheduling interrupts
IPI3:ÂÂÂÂÂÂÂÂÂ 0Â Function call interrupts
IPI4:ÂÂÂÂÂÂÂÂÂ 0Â Single function call interrupts
IPI5:ÂÂÂÂÂÂÂÂÂ 0Â CPU stop interrupts
IPI6:ÂÂÂÂÂÂÂÂÂ 0Â IRQ work interrupts
IPI7:ÂÂÂÂÂÂÂÂÂ 0Â completion interrupts

and thought perhaps I would need to use numbers 103 and 104 as they are
the only usb devices in the list but I didn't know if I was on the right
track. So I again just naively copied the irq values from the example
and put the address of the usb as the first value under iomem.
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.