From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, Mohammed Gamal <m.gamal005@gmail.com>
Subject: Re: [PATCH 3/4] KVM: VMX: Emulated real mode interrupt injection
Date: Tue, 21 Sep 2010 18:00:08 +0200 [thread overview]
Message-ID: <4C98D688.2080303@redhat.com> (raw)
In-Reply-To: <20100921153638.GA21304@amt.cnet>
On 09/21/2010 05:36 PM, Marcelo Tosatti wrote:
> On Tue, Sep 21, 2010 at 01:56:50PM +0200, Avi Kivity wrote:
> > On 09/20/2010 07:30 PM, Marcelo Tosatti wrote:
> > >> static void __vmx_complete_interrupts(struct vcpu_vmx *vmx,
> > >> u32 idt_vectoring_info,
> > >> int instr_len_field,
> > >> @@ -3864,9 +3814,6 @@ static void __vmx_complete_interrupts(struct vcpu_vmx *vmx,
> > >> int type;
> > >> bool idtv_info_valid;
> > >>
> > >> - if (vmx->rmode.irq.pending)
> > >> - fixup_rmode_irq(vmx,&idt_vectoring_info);
> > >> -
> > >
> > >Don't you have to undo kvm_inject_realmode_interrupt if injection fails?
> > >
> > >
> >
> > Injection cannot fail (at least, in the same sense as the vmx
> > injections). It's actually not about failures, it's about guest
> > entry being cancelled due to a signal or some KVM_REQ that needs
> > attention. For vmx style injections, we need to undo the injection
> > to keep things in a consistent state. To realmode emulated
> > injection, everything is in a consistent state already, so no need
> > to undo anything (it's also impossible, since we overwrote memory on
> > the stack).
>
> Aren't you going to push EFLAGS,CS,EIP on the stack twice if that
> occurs?
>
No, since we clear the pending flag (we do that even for vmx-injected
interrupts; then cancel or injection failure re-sets the flag).
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-09-21 16:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-19 12:34 [PATCH 0/4] Real mode interrupt injection emulation Avi Kivity
2010-09-19 12:34 ` [PATCH 1/4] KVM: x86 emulator: Expose emulate_int_real() Avi Kivity
2010-09-19 12:34 ` [PATCH 2/4] KVM: Add kvm_inject_realmode_interrupt() wrapper Avi Kivity
2010-09-19 12:34 ` [PATCH 3/4] KVM: VMX: Emulated real mode interrupt injection Avi Kivity
2010-09-20 17:30 ` Marcelo Tosatti
2010-09-21 11:56 ` Avi Kivity
2010-09-21 15:36 ` Marcelo Tosatti
2010-09-21 16:00 ` Avi Kivity [this message]
2010-09-19 12:34 ` [PATCH 4/4] KVM: VMX: Respect interrupt window in big real mode Avi Kivity
2010-09-19 15:25 ` [PATCH 0/4] Real mode interrupt injection emulation Avi Kivity
2010-09-21 18:32 ` Marcelo Tosatti
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=4C98D688.2080303@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=m.gamal005@gmail.com \
--cc=mtosatti@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.