public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Glauber Costa <glommer@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] do not keep interrupt window closed by sti in real mode
Date: Wed, 08 Apr 2009 11:16:13 +0300	[thread overview]
Message-ID: <49DC5D4D.9060801@redhat.com> (raw)
In-Reply-To: <49DC436C.2050309@zytor.com>

H. Peter Anvin wrote:
> Avi Kivity wrote:
>   
>> I'm guessing the problem is due to the second instruction.  We don't
>> clear the 'blocked by interrupt shadow' flag when we emulate, which
>> extends interrupt shadow by one more instruction.  If the instruction
>> sequence is 'sti hlt' we end in an inconsistent state.
>>
>>     
>
> Ah, and since we're in real mode, we have to emulate everything (at
> least on some hardware), right?  

Well, not everything.  We use vm86 mode in the guest to emulate real 
mode.  Of course that doesn't support all instructions, so we emulate 
these.  Unfortunately it also doesn't support big real mode.

> So we really do need to clear the
> interrupt shadow bit in the interpreter... I don't see a way around that.
>   

Yes.

> Otherwise not just STI but MOV SS shadows will break, and in real mode
> MOV SS shadow is crucial.
>   

'mov ss' executes natively.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-04-08  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08  3:23 [PATCH] do not keep interrupt window closed by sti in real mode Glauber Costa
2009-04-08  4:14 ` H. Peter Anvin
2009-04-08  5:45   ` Avi Kivity
2009-04-08  6:25     ` H. Peter Anvin
2009-04-08  8:16       ` Avi Kivity [this message]
2009-04-08 14:55   ` Glauber Costa
2009-04-08 16:11     ` H. Peter Anvin

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=49DC5D4D.9060801@redhat.com \
    --to=avi@redhat.com \
    --cc=glommer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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