<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 09.06.2009 0:52 Uhr, ron minnich wrote:
<blockquote
 cite="mid:13426df10906081552i5ad95395lf392643b61593361@mail.gmail.com"
 type="cite">
  <div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
  <pre wrap="">Fix attached for qemu.

  </pre>
  </div>
</blockquote>
Awesome! Thanks for spotting this!<br>
<br>
<blockquote
 cite="mid:13426df10906081552i5ad95395lf392643b61593361@mail.gmail.com"
 type="cite">
  <div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
  <pre wrap="">It would be nice to know if this causes trouble for real hardware,
but it should not.

ron
  </pre>
  </div>
  <div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
  <pre wrap="">
<hr size="4" width="90%">
There are some problems with the way these interrrupts were managed. First, the CLI erases
any knowledge of whether interrupts were enabled or disabled. Second, the STI
works badly on qemu; we get an immediate INT #0 as soon as the STI happens.

  </pre>
  </div>
</blockquote>
<br>
Is this a Qemu bug?<br>
<br>
<blockquote
 cite="mid:13426df10906081552i5ad95395lf392643b61593361@mail.gmail.com"
 type="cite">
  <div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
  <pre wrap="">This doesn't happen on real hardware but, that said, I don't think
this code should be doing cli and sti.
  </pre>
  </div>
</blockquote>
<br>
Peter Stuge brought this up, and I think I remembered seeing somewhere
that loading the IDT and some other stuff should be guarded by  cli+sti
because otherwise an interrupt could happen during the switch?!? Not
sure. It looks highly unlikely that this would happen for us.<br>
<br>
Peter? Alex? Do you guys have more insight?<br>
<br>
<blockquote
 cite="mid:13426df10906081552i5ad95395lf392643b61593361@mail.gmail.com"
 type="cite">
  <div class="moz-text-plain" wrap="true" graphical-quote="true"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">
  <pre wrap="">This change fixes the observed qemu failures.

Signed-off-by: Ronald G. Minnich <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E" href="mailto:rminnich@gmail.com"><rminnich@gmail.com></a>

  </pre>
  </div>
</blockquote>
<br>
I hope we find out why this is a problem, because a combination of
cli+sti should never cause an interrupt that would not exist without
cli+sti. If we can't I suggest we commit this in a few days (Acked-by:
Stefan Reinauer <a class="moz-txt-link-rfc2396E" href="mailto:stepan@coresystems.de"><stepan@coresystems.de></a>) since it fixes the
problem.<br>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: <a class="moz-txt-link-abbreviated" href="mailto:info@coresystems.de">info@coresystems.de</a>  • <a class="moz-txt-link-freetext" href="http://www.coresystems.de/">http://www.coresystems.de/</a>
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
</pre>
</body>
</html>