In attachment are device-tree files I found in my project: device-tree.bbappend - under /uz3eg_iocc_2018_2/project-spec/meta-user/recipes-bsp/device-tree/ xen-overlay.dtsi , system-user.dtsi and zunqmp-qemu-arm.dts - under /uz3eg_iocc_2018_2/project-spec/meta-user/recipes-bsp/device-tree/files zynqmp-qemu-multiarch-arm and zynqmp-qemu-pmu - under /uz3eg_iocc_2018_2/project-spec/meta-user/recipes-bsp/device-tree/files/multi-arch pcw.dtsi , pl.dtsi , system-conf.dtsi , sistem-top.dts , zynqmp-clk-ccf.dtsi and zynqmp.dtsi - under/uz3eg_iocc_2018_2/components/plnx_workspace/device-tree/device-tree/ In system-conf.dtsi file first line says: /* * CAUTION: This file is automatically generated by PetaLinux SDK. * DO NOT modify this file */ and there is no sigh of timer. If you could take a look at this and other files in attachment it would be great. I also tried to run bare-metal app with this changes and it worked, added: &ttc0 { status = "okay"; compatible = "cdns,ttc"; interrupt-parent = <0x4>; interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; reg = <0x0 0xff110000 0x0 0x1000>; timer-width = <0x20>; power-domains = <0x3b>; xen,passthrough; }; in xen-overlay.dtsi file, because it's overlay it shouldn't duplicate timer nod, right? After build I ran: dtc -I dtb -O dts -o system.dts system.dtb and checked for ttc0, it seems okay except interrupt-parent is <0x4> not <0x2> like in your example: timer@ff110000 { compatible = "cdns,ttc"; status = "okay"; interrupt-parent = <0x4>; interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; reg = <0x0 0xff110000 0x0 0x1000>; timer-width = <0x20>; power-domains = <0x3b>; clocks = <0x3 0x1f>; xen,passthrough; }; status was "disable" before. system.dts is also added in attachment. Is this the working passthrough?Because jitter is the same . When legit, working passthrough is set correctly, jitter should be smaller, right? Thanks in advance! Milan On Mon, Oct 15, 2018 at 12:50 AM Stefano Stabellini wrote: > > On Sat, 13 Oct 2018, Milan Boberic wrote: > > > This is definitely wrong. Can you please also post the full host device > > > tree with your modifications that you are using for Xen and Dom0? You > > > should have something like: > > > > > > timer@ff110000 { > > > compatible = "cdns,ttc"; > > > interrupt-parent = <0x2>; > > > interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; > > > reg = <0x0 0xff110000 0x0 0x1000>; > > > timer-width = <0x20>; > > > power-domains = <0x3b>; > > > xen,passthrough; > > > }; > > > For each of the nodes of the devices you are assigning to the DomU. > > > > I put > > &ttc0 { > > xen,passthrough = <0x1>; > > }; > > because when I was making bm app I was following this guide. Now I see > > it's wrong. When I copied directly: > > timer@ff110000 { > > compatible = "cdns,ttc"; > > interrupt-parent = <0x2>; > > interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; > > reg = <0x0 0xff110000 0x0 0x1000>; > > timer-width = <0x20>; > > power-domains = <0x3b>; > > xen,passthrough; > > }; > > in to the xen-overlay.dtsi file it resulted an error during > > device-tree build. I modified it a little bit so I can get successful > > build, there are all device-tree files included in attachment. I'm not > > sure how to set this passthrough properly, if you could take a look at > > those files in attachment I'd be more then grateful. > > > > > It's here: https://github.com/Xilinx/xen/blob/xilinx/stable-4.9/xen/arch/arm/vgic.c#L462 > > Oh, about that. I sent you wrong branch, I was using Xen 4.10. Anyway > > now I moved to Xen 4.11 like you suggested and applied your patch and > > Dario's also. > > > > Okay, now when I want to xl create my domU (bare-metal app) I get error: > > > > Parsing config from timer.cfg > > (XEN) IRQ 68 is already used by domain 0 > > libxl: error: libxl_create.c:1354:domcreate_launch_dm: Domain 1:failed > > give domain access to irq 68: Device or resource busy > > libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain > > 1:Non-existant domain > > libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain > > 1:Unable to destroy guest > > libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain > > 1:Destruction of domain failed > > That means that the "xen,passthrough" addition to the host device tree went wrong. > > > > I guess my modifications of: > > timer@ff110000 { > > compatible = "cdns,ttc"; > > interrupt-parent = <0x2>; > > interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; > > reg = <0x0 0xff110000 0x0 0x1000>; > > timer-width = <0x20>; > > power-domains = <0x3b>; > > xen,passthrough; > > }; > > are not correct. > > Right > > > > I tried to change interrupts to: > > interrupts = <0x0 0x44 0x4 0x0 0x45 0x4 0x0 0x46 0x4>; > > because if you check here on page 310 interrupts for TTC0 are 68:70. > > But that didn't work either I still get same error. > > The interrupt numbers specified in the DTS are the real interrupt minus > 32: 68-32 = 36 = 0x24. The DTS was correct. > > > > I also tried to change xen,passthrough; line with: > > xen,passthrough = <0x1>; > > but also without success, still the same error. > > > > Are you sure about this line: > > reg = <0x0 0xff110000 0x0 0x1000>; ? > > Or it should be like this? > > reg = <0x0 0xff110000 0x1000>; > > Yes, that could be a problem. The format depends on the #address-cells > and #size-cells parameters. You didn't send me system-conf.dtsi, so I > don't know for sure which one of the two is right. In any case, you > should not duplicate the timer@ff110000 node in device tree. You should > only add "xen,passthrough;" to the existing timer@ff110000 node, which > is probably in system-conf.dtsi. So, avoid adding a new timer node to > xen-overlay.dtsi, and instead modify system-conf.dtsi. > > > > I also included xl dmesg and dmesg in attachments (after xl create of bm app). > > > > Thanks in advance! > > > > Milan > >