From: Dietmar Hahn Subject: Re: HVM domU with sdl not scheduled after vt-switch Date: Mon, 2 May 2011 08:59:10 +0200 Message-ID: <201105020859.10751.dietmar.hahn@ts.fujitsu.com> References: <201104271327.10734.dietmar.hahn@ts.fujitsu.com> <4DB81BA7.2040501@eu.citrix.com> <201104281056.57270.dietmar.hahn@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1611698924==" Return-path: In-Reply-To: <201104281056.57270.dietmar.hahn@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org --===============1611698924== Content-Type: multipart/alternative; boundary="Boundary-01=_+YlvN1brzoS8+S9" Content-Transfer-Encoding: 7bit --Boundary-01=_+YlvN1brzoS8+S9 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Am 28.04.2011 schrieb "Dietmar Hahn ": > Am 27.04.2011 schrieb "Vincent Hanquez ": > > On 04/27/2011 12:27 PM, Dietmar Hahn wrote: > > > > > > The domU gets scheduled again after switching back to the virtual screen. > > > > > > This is not the case when using vnc. > > > > > > What is the cause and where in the source can I find the implementation? > > > > > > Thanks! > > > > > That's a known problem of SDL generally, it's not linked to qemu itself > > (i've seen the same behavior happened on other program using SDL). You > > probably want to look at the SDL source for the reason why. > > Great, I will have a look at this. It hangs in qemu in gui_update() -> dpy_refresh() -> sdl_refresh() Via libSDL, libX11, libxcb the function xcb_wait_for_reply() gets called. It never gets an answer from the Xserver, because the Xserver doesn't answer any requests when switching the vt-console. Because gui_update() gets called via a qemu timer and never return it stops qemu. I tried to move the qui_update() into an own thread to get the main qemu loop running but then the first call of sdl_update() leads to: X Error of failed request: BadAccess (attempt to access private resource denied) Major opcode of failed request: 154 (GLX) Minor opcode of failed request: 26 (X_GLXMakeContextCurrent) Serial number of failed request: 31 Current serial number in output stream: 31 and qemu exits. I googled a little bit and found XInitThreads() but this doesn't help. Any hints are welcome ;-) ! Dietmar. -- Company details: http://ts.fujitsu.com/imprint.html --Boundary-01=_+YlvN1brzoS8+S9 Content-Type: text/html; charset="iso-8859-15" Content-Transfer-Encoding: 7bit

Am 28.04.2011 schrieb "Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>":

> Am 27.04.2011 schrieb "Vincent Hanquez <vincent.hanquez@eu.citrix.com>":

> > On 04/27/2011 12:27 PM, Dietmar Hahn wrote:

> > >

> > > The domU gets scheduled again after switching back to the virtual screen.

> > >

> > > This is not the case when using vnc.

> > >

> > > What is the cause and where in the source can I find the implementation?

> > >

> > > Thanks!

> > >

> > That's a known problem of SDL generally, it's not linked to qemu itself

> > (i've seen the same behavior happened on other program using SDL). You

> > probably want to look at the SDL source for the reason why.

>

> Great, I will have a look at this.


It hangs in qemu in gui_update() -> dpy_refresh() -> sdl_refresh()

Via libSDL, libX11, libxcb the function xcb_wait_for_reply() gets called.

It never gets an answer from the Xserver, because the Xserver doesn't answer

any requests when switching the vt-console.

Because gui_update() gets called via a qemu timer and never return it stops qemu.


I tried to move the qui_update() into an own thread to get the main qemu loop

running but then the first call of sdl_update() leads to:

X Error of failed request: BadAccess (attempt to access private resource denied)

Major opcode of failed request: 154 (GLX)

Minor opcode of failed request: 26 (X_GLXMakeContextCurrent)

Serial number of failed request: 31

Current serial number in output stream: 31

and qemu exits.

I googled a little bit and found XInitThreads() but this doesn't help.

Any hints are welcome ;-) !


Dietmar.


--

Company details: http://ts.fujitsu.com/imprint.html

--Boundary-01=_+YlvN1brzoS8+S9-- --===============1611698924== 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.xensource.com http://lists.xensource.com/xen-devel --===============1611698924==--