From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: frame buffer shared by domains on arch arm linux Date: Fri, 23 Jan 2015 10:33:58 +0000 Message-ID: References: <54BF64F1.1090300@gmail.com> <54C05E05.1020200@gmail.com> <54C210E3.50100@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="1342847746-1115802296-1422009238=:18131" Return-path: In-Reply-To: <54C210E3.50100@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mao Mingy Cc: xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --1342847746-1115802296-1422009238=:18131 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE Please don't use HTML in emails. On Fri, 23 Jan 2015, Mao Mingy wrote: > On 22/01/2015 19:56, Stefano Stabellini wrote: >=20 > On Thu, 22 Jan 2015, Mao Mingy wrote: >=20 > On 21/01/2015 18:51, Stefano Stabellini wrote: >=20 > On Wed, 21 Jan 2015, Mao Mingy wrote: >=20 > I am trying to run the PVHVM guest on omap5 (arm arch) so that I can get > the > frame buffer shared by Domains. my setup are: > 1. run xen4.5 after the u-boot. > 2. start the dom0 (on linux kernel 3.12) on xen. >=20 > 3.12 is pretty old now >=20 >=20 > 3. run the qemu (from xen 4.5) and HVM backend on xen. >=20 > Is this the QEMU binary that gets compiled as part of the Xen 4.5 build > and started automatically by xl if you configure the VM with a > framebuffer? >=20 > Yes. it's compiled from Xen 4.5. exact location @ " > ./xen_4.5/dist/install/usr/local/lib/xen/bin/qemu-system-i386 " >=20 > 4. run the guest domain as "Machine: Dummy Virtual Machine, model: > XENVM-4.5" > 5. try to build a frame buffer on guest domain by > CONFIG_XEN_FBDEV_FRONTEND =3D y > CONFIG_FB_VIRTUAL=3Dy >=20 > after change to domain checking in the first list of xenfb_init(...) in > xen-fbfront.c from > if (!xen_pv_domain()) ---> if (!xen_domain()) > the /dev/fb0 is built up on guest domain. However, writing to this fb has > no > response from screen. >=20 > Why xenfb_init limited to PV domain only? >=20 > No it is not. In fact if you use a more recent Linux kernel, you won't > need to make any modifications and it should work out of the box. >=20 > Thanks. Check the latest kernel source. it's already modified to if > (!xen_domain()) >=20 > Is the PVHVM mode supported by xen4.5 and linux3.12? >=20 > We don't call "PVHVM" guests on ARM: on ARM we only have one type of > guest. From the Linux kernel perspective, they are HVM domains. >=20 >=20 > Looks at the xen.h at the linux kernel source: > enum xen_domain_type { > XEN_NATIVE, /* running on bare hardware */ > XEN_PV_DOMAIN, /* running in a PV domain */ > XEN_HVM_DOMAIN, /* running in a Xen hvm domain */ > }; > seems PVHVM is not there yet? >=20 > In this context PVHVM would just be XEN_PV_DOMAIN. >=20 >=20 > Kindly enlighten me what could be the solution to get the frame buffer > shared > by Domains? >=20 > It should work out of the box with the latest Linux kernel and Xen 4.5, > if you add >=20 > vfb=3D['vnc=3D1'] >=20 > to the VM config file. >=20 > Unfortunately, It's still no work after add the vfb=3D[ 'vnc=3D1' ]. fb > open/write/ioctl/close from guest > linux user space program return no error. However, just the screen do NOT > display the contents wrote to vfb. > Here is the configuration file when create the guest linux >=20 > kernel =3D "/xen/images/zImage" > memory =3D "128" > name =3D "omap5" > bootargs =3D "mem=3D128M vram=3D16M xencons=3Dhvc" > vcpus =3D 1 > extra =3D"console=3Dhvc0 xencons=3Dhvc root=3D/dev/xvda ro" >=20 > You might want to use console=3Dtty0 if you want to see the kernel output= on the framebuffer. >=20 > Thanks. I got the kernel trace output for my guest Linux. >=20 > disk =3D [ 'phy:/dev/loop0,xvda,w' ] > vfb=3D['vnc=3D1'] >=20 > Kindly advise what could be the reason? >=20 > Do you have >=20 > CONFIG_XEN_FBDEV_FRONTEND=3Dy > CONFIG_INPUT_XEN_KBDDEV_FRONTEND=3Dy > CONFIG_FRAMEBUFFER_CONSOLE=3Dy >=20 > in your guest kernel config? >=20 > Could you please post the output of xenstore-ls, executing the command > after creating the VM? >=20 > Yes. The CONFIG_XXX mentioned above is in my guest kernel config. I've at= tached the related CONFIG_XXX of > the guest Linux. >=20 > Unfortunately, it's not an option for me to go for latest Linux kernel ri= ght now, so I debugged the > problem by adding tracing information into the kernel and qemu source cod= e to trace the issue. > On guest Linux, when writing to frame buffer, the call path is > xenfb_write() > =C2=A0=C2=A0=C2=A0 xenfb_refresh() > =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 xenfb_do_update() <---- here the XE= NFB_TYPE_UPDATE event is sent out. >=20 > However, in the QEMU size on Dom0,=C2=A0 There is NO XENFB_TYPE_UPDATE ev= ent is observed in > xenfb_handle_events() of xenfb.c >=20 > Shoud the XENFB_TYPE_UPDATE event sent by guest Linux reach the QEMU and = processed and write to real > hardware by QEMU? > If so. why it's not received? any point to check? >=20 > So far, I checked the following two points > 1. QEMU's start up parameter, changed the original from Xen4.5 > /usr/local/lib/xen/bin/qemu-system-i386 -xen-domid 0 -xen-attach -name do= m0 -nographic -M xenpv > -daemonize -monitor /dev/null -serial /dev/null -parallel /dev/null -pidf= ile /var/run/qemu-dom0.pid > to > /usr/local/lib/xen/bin/qemu-system-i386 -xen-domid 0 -xen-attach -name do= m0 -vga xenfb -M xenpv > -daemonize -monitor /dev/null -serial /dev/null -parallel /dev/null -pidf= ile /var/run/qemu-dom0.pid > but it does NOT make any different for this aspect. >=20 > 2. The return value of xen_be_register("vfb", &xen_framebuffer_ops) of xe= n_machine_pv.c of the QEMU > it's checked and return 0. Looks not a problem As a matter of fact the output of xenstore-ls that you posted looks good: everything seems to be up and running. --1342847746-1115802296-1422009238=:18131 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --1342847746-1115802296-1422009238=:18131--