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

Re: [Xen-devel] Xen PV: Sample new PV driver for buffer sharing between domains



(+ Wei)

On 11/1/18 9:15 AM, Omkar Bolla wrote:
Hi,

May I ask why you need the dependency on the rootfs?

I am trying to pass-through the display to guest domain. to do through driver needs clocks. I have written simple basic clock pv frontend and backend. So I thought these clocks must be initialised before display driver initialisation.

The graphic driver should request the clock, right? So Linux will make sure to have the clock before initializing the display.


But if I start both domain and clocks script one after another, clock got initialised properly. Problem solved. But still i have some doubt, is it possible to do some thing in xenbits src to start automatically when we start underprivileged domain?

I am not entirely sure if we have a way to run a script during domain creation. Wei, do you know if that's possible?

A workaround would be to create the domain paused, call the script and then unpause it.

42sh> xl create -p ...
42sh> ./myscript.sh
42sh> xl unpause <myguest>


I have one more question about pass-through
To implement pass through I took reference from below link
https://wiki.xen.org/images/1/17/Device_passthrough_xen.pdf

I added 'xen-passthrough' to actual dom0 dtb and created new dtb with below nodes in passthrough node
============================================================================
dpe: dpe@10004000 {
compatible = "hisilicon,hi3660-dpe";
status = "ok";
#if 0
//ACTUAL REG PROPERTY of DISPLAY
                         reg = <0x0 0xE8600000 0x0 0x80000>,
                                         <0x0 0xFFF35000 0 0x1000>,
                                         <0x0 0xFFF0A000 0 0x1000>,
                                         <0x0 0xFFF31000 0 0x1000>,
                                         <0x0 0xE86C0000 0 0x10000>;
#endif
//reg = <0x0 0x10004000 0x0 0x80000>,
reg = <0x0 0x10004000 0x0 0x80000>,
       <0x0 0x10084000 0 0x1000>,
       <0x0 0x10085000 0 0x1000>,
       <0x0 0x10086000 0 0x1000>,
       <0x0 0x100C4000 0 0x10000>;
//      <0x0 0x10087000 0 0x10000>;

interrupts = <0 245 4>;

clocks = <&clk_xen HI3660_ACLK_GATE_DSS>,
<&clk_xen HI3660_PCLK_GATE_DSS>,
<&clk_xen HI3660_CLK_GATE_EDC0>,
<&clk_xen HI3660_CLK_GATE_LDI0>,
<&clk_xen HI3660_CLK_GATE_LDI1>,
<&clk_xen HI3660_CLK_GATE_DSS_AXI_MM>,
<&clk_xen HI3660_PCLK_GATE_MMBUF>;
clock-names = "aclk_dss",
"pclk_dss",
"clk_edc0",
"clk_ldi0",
"clk_ldi1",
"clk_dss_axi_mm",
"pclk_mmbuf";

dma-coherent;

port {
dpe_out: endpoint {
remote-endpoint = <&dsi_in>;
};
};
};

dsi: dsi@10097000 {
compatible = "hisilicon,hi3660-dsi";
status = "ok";
#if 0
//ACTUAL REG PROPERTY of DISPLAY
reg = <0 0xE8601000 0 0x7F000>,
                                         <0 0xFFF35000 0 0x1000>;
#endif
//reg = <0 0x10097000 0 0x7F000>,
//<0 0x10116000 0 0x1000>;
reg = <0 0x10004000 0 0x80000>,
<0 0x10084000 0 0x1000>;

clocks = <&clk_xen HI3660_CLK_GATE_TXDPHY0_REF>,
<&clk_xen HI3660_CLK_GATE_TXDPHY1_REF>,
<&clk_xen HI3660_CLK_GATE_TXDPHY0_CFG>,
<&clk_xen HI3660_CLK_GATE_TXDPHY1_CFG>,
<&clk_xen HI3660_PCLK_GATE_DSI0>,
<&clk_xen HI3660_PCLK_GATE_DSI1>;
clock-names = "clk_txdphy0_ref",
"clk_txdphy1_ref",
"clk_txdphy0_cfg",
"clk_txdphy1_cfg",
"pclk_dsi0",
"pclk_dsi1";

#address-cells = <1>;
#size-cells = <0>;

};
#endif
clocks {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges;
clk_xen: xen_clk@0 {
compatible = "xen,xen-vclk";
#clock-cells = <1>;
};
};
============================================================================
Below is my 'debian.cfg' file:
============================================================================
kernel = "/debian/Image"
device_tree="/debian/domu.dtb"
memory = 512
vcpus = 8
cpus = "all"
name="debian"

################# DPE ################
#iomem = [ "0xE8600,0x80@0x10004", "0xFFF35,1@0x10084", "0xFFF0A,1@0x10085", "0xFFF31,1@0x10086", "0xE86C0,10@0x10087"] #iomem = [ "0xE8600,0x80", "0xFFF35,1", "0xFFF0A,1", "0xFFF31,1", "0xE86C0,10"]
irqs = [ 277 ]

iomem = [ "0xE8600,80@0x10004" ]

iomem = [ "0xFFF35,1@0x10084" ]
iomem = [ "0xFFF0A,1@0x10085" ]
iomem = [ "0xFFF31,1@0x10086" ]
iomem = [ "0xE86C0,10@0x100C4"]
#iomem = [ "0xE86C0,10@0x10087"]
#iomem = [ "0xE8600,80@0x00000" ]

################# DPE ################
################# DSI ################
#iomem = [ "0xE8601,0x7F", "0xFFF35,1"]
#iomem = [ "0xE8601,0x7F@0x10097", "0xFFF35,1@0x10116", "0xE8601,0x7F@0x10195"]

#iomem = [ "0xE8601,7F@0x10097" ]
#iomem = [ "0xFFF35,1@0x10116" ]


iomem = [ "0xE8601,7F@0x10005" ]
iomem = [ "0xFFF35,1@0x10084" ]
################# DSI ################

#vif = ['mac=00:16:3e:64:b8:40,bridge=xenbr0']
#nics = 1
#vif = [ 'eth0=00:60:00:00:00:01' ]

disk = ['/dev/loop1,raw,xvda,w']
extra = "earlyprintk=xenboot console=hvc0 root=/dev/xvda rootfstype=ext4 rw video=HDMI-A-1:1280x720@60"
============================================================================
Here I am using same io space(GFNs) for DPE and DSI nodes, and having same below error
and tried with different GFNs and giving same error.

But adding this, Every thing is good but when i am trying to remap iomem second time, having below error

Who is going the remap? The guest? Also, can you expand what you mean by it crash the second time. Is it during the remap, or access the new mapped region?

============================================================================
[    3.215021] OF: rrrrrrrrrrrr: start: 0x10004000, sz = 0x80000
[    3.215062] [DISPLAY] dsi_parse_dt(): 1536: of device: /passthrough/dsi@10097000 [    3.215083] [DISPLAY] dsi_parse_dt(): 1537: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[    3.215108] [DISPLAY] dsi_parse_dt(): 1540: ctx->base: ffffff800bd01000
[    3.215126] [DISPLAY] dsi_parse_dt(): 1541:
[    3.215136] OF: rrrrrrrrrrrr: start: 0x10084000, sz = 0x1000
[    3.215169] [DISPLAY] dsi_parse_dt(): 1548:
[    4.159087] [DISPLAY] dsi_parse_dt(): 1563:
[    4.159092] [DISPLAY] dsi_parse_dt(): 1568:
[    4.159132] [D][XEN_VCLK]xen_vclk_xfer(): 163: buffer: clk_txdphy0_ref,1
[    4.159163] [D][XEN_VCLK]xen_vclk_xfer(): 164: ******************************************* [    4.159399] [D][XEN_VCLK]xen_vclk_xfer(): 170: ******************************************* [    4.159626] [D][XEN_VCLK]xen_vclk_xfer(): 176: Sending IRQ_DATA to domain-0 [    4.160218] [D][XEN_VCLK]xen_vclk_interrupt(): 446: IRQ(13) from domain 0 fired!!!
[    4.160359] [D][XEN_VCLK]vclk_fe_bh(): 394: irq_status: 0x3
[    4.160532] [D][XEN_VCLK]vclk_fe_bh(): 407: ACK Recieved from dom-0
[    4.160542] [D][XEN_VCLK]xen_vclk_xfer(): 179: Xfer Done
[    4.160545] [D][XEN_VCLK]xen_of_clk_src_onecell_get(): 286:  Xfer done...
[    4.160554] [DISPLAY] dsi_parse_dt(): 1575:
[    4.160560] [D][XEN_VCLK]vclk_round_rate(): 224:  called...
[    4.160567] [D][XEN_VCLK]xen_vclk_xfer(): 163: buffer: clk_txdphy0_ref,4,19200000 [    4.160570] [D][XEN_VCLK]xen_vclk_xfer(): 164: ******************************************* [    4.161095] [D][XEN_VCLK]xen_vclk_xfer(): 170: ******************************************* [    4.161331] [D][XEN_VCLK]xen_vclk_xfer(): 176: Sending IRQ_DATA to domain-0 [    4.161946] [D][XEN_VCLK]xen_vclk_interrupt(): 446: IRQ(13) from domain 0 fired!!!
[    4.162120] [D][XEN_VCLK]vclk_fe_bh(): 394: irq_status: 0x3
[    4.162284] [D][XEN_VCLK]vclk_fe_bh(): 407: ACK Recieved from dom-0
[    4.162295] [D][XEN_VCLK]xen_vclk_xfer(): 179: Xfer Done
[    4.162301] [DISPLAY] dsi_parse_dt(): 1583:
[    4.162314] [D][XEN_VCLK]xen_vclk_xfer(): 163: buffer: clk_txdphy0_cfg,1
[    4.162316] [D][XEN_VCLK]xen_vclk_xfer(): 164: ******************************************* [    4.162641] [D][XEN_VCLK]xen_vclk_xfer(): 170: ******************************************* [    4.162984] [D][XEN_VCLK]xen_vclk_xfer(): 176: Sending IRQ_DATA to domain-0 [    4.163596] [D][XEN_VCLK]xen_vclk_interrupt(): 446: IRQ(13) from domain 0 fired!!!
[    4.167753] [D][XEN_VCLK]vclk_fe_bh(): 394: irq_status: 0x3
[    4.167955] [D][XEN_VCLK]vclk_fe_bh(): 407: ACK Recieved from dom-0
[    4.167968] [D][XEN_VCLK]xen_vclk_xfer(): 179: Xfer Done
[    4.167971] [D][XEN_VCLK]xen_of_clk_src_onecell_get(): 286:  Xfer done...
[    4.167979] [DISPLAY] dsi_parse_dt(): 1593:
[    4.167982] [D][XEN_VCLK]vclk_round_rate(): 224:  called...
[    4.167985] [D][XEN_VCLK]xen_vclk_xfer(): 163: buffer: clk_txdphy0_cfg,4,19200000 [    4.167992] [D][XEN_VCLK]xen_vclk_xfer(): 164: ******************************************* [    4.168244] [D][XEN_VCLK]xen_vclk_xfer(): 170: ******************************************* [    4.168476] [D][XEN_VCLK]xen_vclk_xfer(): 176: Sending IRQ_DATA to domain-0 [    4.169101] [D][XEN_VCLK]xen_vclk_interrupt(): 446: IRQ(13) from domain 0 fired!!!
[    4.169262] [D][XEN_VCLK]vclk_fe_bh(): 394: irq_status: 0x3
[    4.169448] [D][XEN_VCLK]vclk_fe_bh(): 407: ACK Recieved from dom-0
[    4.169491] [D][XEN_VCLK]xen_vclk_xfer(): 179: Xfer Done
[    4.169510] [DISPLAY] dsi_parse_dt(): 1601:
[    4.169535] [D][XEN_VCLK]xen_vclk_xfer(): 163: buffer: pclk_dsi0,1
[    4.169554] [D][XEN_VCLK]xen_vclk_xfer(): 164: ******************************************* [    4.169803] [D][XEN_VCLK]xen_vclk_xfer(): 170: ******************************************* [    4.170019] [D][XEN_VCLK]xen_vclk_xfer(): 176: Sending IRQ_DATA to domain-0 [    4.170619] [D][XEN_VCLK]xen_vclk_interrupt(): 446: IRQ(13) from domain 0 fired!!!
[    4.170779] [D][XEN_VCLK]vclk_fe_bh(): 394: irq_status: 0x3
[    4.170965] [D][XEN_VCLK]vclk_fe_bh(): 407: ACK Recieved from dom-0
[    4.170978] [D][XEN_VCLK]xen_vclk_xfer(): 179: Xfer Done
[    4.170981] [D][XEN_VCLK]xen_of_clk_src_onecell_get(): 286:  Xfer done...
[    4.170989] [DISPLAY] dsi_parse_dt(): 1611:
[    4.170992] [DISPLAY] dsi_probe(): 1654: Before component add
[    4.170997] [DISPLAY] compare_of(): 242:
[    4.171002] [DISPLAY] kirin_drm_bind(): 257:
[    4.171004] [drm] +.
[    4.171386] [DISPLAY] kirin_drm_kms_init(): 105:
[    4.171391] [drm] +.
[    4.212543] [DISPLAY] kirin_drm_mode_config_init(): 91:
[    4.212547] [DISPLAY] dss_drm_init(): 638:
[    4.212563] [drm] +.
[    4.212585] [DISPLAY] dss_dts_parse(): 513:
[    4.212603] [DISPLAY] dss_dts_parse(): 530: of device: /passthrough/dpe@10004000 [    4.212635] [DISPLAY] dss_dts_parse(): 531: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[    4.212661] [DISPLAY] dss_dts_parse(): 532: ctx->base: ffffff800bd00000
[    4.212688] Unhandled fault: ttbr address size fault (0x96000000) at 0xffffff800bd01000

IIRC, this error usually happen when the region is not mapped in stage-2. On Xen debug-build (CONFIG_DEBUG=y in .config) you should get some log if there was a data abort in stage-2.

Cheers,

--
Julien Grall

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

 


Rackspace

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