From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSE9T-00012H-HH for qemu-devel@nongnu.org; Sun, 10 Aug 2008 12:52:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSE9R-0000zn-IA for qemu-devel@nongnu.org; Sun, 10 Aug 2008 12:52:18 -0400 Received: from [199.232.76.173] (port=54496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSE9R-0000zk-AV for qemu-devel@nongnu.org; Sun, 10 Aug 2008 12:52:17 -0400 Received: from mail2.shareable.org ([80.68.89.115]:57983) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSE9Q-00079Z-Oy for qemu-devel@nongnu.org; Sun, 10 Aug 2008 12:52:17 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1KSE9O-0000IE-Kk for qemu-devel@nongnu.org; Sun, 10 Aug 2008 17:52:14 +0100 Date: Sun, 10 Aug 2008 17:52:14 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [RFC][PATCH] Add HPET emulation to qemu (v2) Message-ID: <20080810165214.GC528@shareable.org> References: <20080807171705.GA15074@implementation.uk.xensource.com> <20080810011901.GC20183@shareable.org> <20080810110137.GB4569@implementation> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080810110137.GB4569@implementation> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Samuel Thibault wrote: > Jamie Lokier, le Sun 10 Aug 2008 02:19:01 +0100, a écrit : > > Samuel Thibault wrote: > > > Beth Kon wrote some time ago: > > > > But for an idle guest in both cases (with and without HPET), the > > > > number of wakeups per second was relatively low (28). > > > > > > Oh, btw, did you try to reduce the qemu window? (or disconnect the VNC > > > client if you are using VNC) 28 might be just because of the gui refresh > > > rate. Reducing the window will lower the gui refresh rate to 2Hz. > > > > If the guest isn't drawing anything to video memory, and there are no > > GUI events (e.g. redraw requests), why does the gui keep refreshing? > > It needs to poll the keyboard activity at least, IIRC SDL doesn't > provide the X FD to poll. Apparently it does. See http://listas.apesol.org/pipermail/sdl-libsdl.org/2008-May/065133.html which says: > 2. add a new API call to SDL to access the low-level descriptor to > talk directly with the graphic server (X11 or other). This is > powerful in that it opens the way to all sort of manipulations > of the graphic server, however it requires backend-specific > code in the SDL application to do what one needs; SDL_GetWMInfo() can get you the Xlib Display* (have a look at what else is there). Make sure to read the documentation about the SDL_VERSION() bit, it's quite important! You'll probably then have to enable SDL_SysWMEvent and handle them to get at the X11 events, if I understand this correctly (I haven't done the specific thing you want, I get the Display* and hack other things). The followup message says "thanks, that worked". It should work in Windows, too, except you'll get a Windows HANDLE which you wait on in a different way than unix. -- Jamie