qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [Qemu-devel] [6391] Fix nographic mode and VNC
Date: Fri, 23 Jan 2009 18:59:01 +0000	[thread overview]
Message-ID: <200901231859.02629.paul@codesourcery.com> (raw)
In-Reply-To: <18808.26680.24696.223678@mariner.uk.xensource.com>

> > > The third possibility is to have the select() run in a separate thread
> > > from the TCG cpu_exec() loop.  cpu_exec() would do an atomic read of
> > > 'event_pending' and the IO thread would do an atomic write of
> > > 'event_pending' whenever select() returned a writable file descriptor.
> >
> > This suffers from the same problem described above. You need to
> > force the main execution thread to break out of the translated
> > loop. In practice this probably means sending a signal to the main
> > thread.  You could check event_pending at the start of every TB, but
> > that's likely to incur a fairly big performance hit.
>
> What would the signal handler do ?  siglongjmp out of the translated
> loop ?  Surely the timer implementation doesn't do that right now.

The same as the current one does. Call cpu_interrupt to unlink the TB and 
cause execution to fall back to cpu_exec sometime in the near future.
cpu_interrupt is not threadsafe[1] so has to be called from the main execution 
thread.

[1] TB [un-]chaining involves direct patching of the translated code. Most SMP 
systems do not have a coherent icache.

Paul

  reply	other threads:[~2009-01-23 18:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 19:28 [Qemu-devel] [6391] Fix nographic mode and VNC Blue Swirl
2009-01-21 19:39 ` Stefano Stabellini
2009-01-21 19:52   ` Blue Swirl
2009-01-21 19:56     ` Stefano Stabellini
2009-01-21 20:03 ` Samuel Thibault
2009-01-21 20:16   ` Blue Swirl
2009-01-21 20:29     ` Samuel Thibault
2009-01-21 20:44       ` Blue Swirl
2009-01-21 21:33         ` Anthony Liguori
2009-01-22  0:04         ` Paul Brook
2009-01-22  3:31           ` Anthony Liguori
2009-01-22  4:23             ` Paul Brook
2009-01-22 12:36               ` Ian Jackson
2009-01-23 18:59                 ` Paul Brook [this message]
2009-01-22 15:29               ` Anthony Liguori
2009-01-23 18:20                 ` Paul Brook
2009-01-23 19:37                   ` Anthony Liguori
2009-01-25 19:57                   ` Jamie Lokier
2009-01-25 23:25                     ` Paul Brook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200901231859.02629.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).