From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v4 0/6] Nonatomic interrupt injection
Date: Fri, 17 Sep 2010 16:12:54 -0300 [thread overview]
Message-ID: <20100917191254.GA22281@amt.cnet> (raw)
In-Reply-To: <4C921D17.3010603@redhat.com>
On Thu, Sep 16, 2010 at 03:35:19PM +0200, Avi Kivity wrote:
> On 08/30/2010 02:36 PM, Avi Kivity wrote:
> >This patchset changes interrupt injection to be done from normal process
> >context instead of interrupts disabled context. This is useful for real
> >mode interrupt injection on Intel without the current hacks (injecting as
> >a software interrupt of a vm86 task), reducing latencies, and later, for
> >allowing nested virtualization code to use kvm_read_guest()/kvm_write_guest()
> >instead of kmap() to access the guest vmcb/vmcs.
> >
> >Seems to survive a hack that cancels every 16th entry, after injection has
> >already taken place.
> >
> >With the PIC reset fix posted earlier, this passes autotest on both AMD and
> >Intel, with in-kernel irqchip. I'll run -no-kvm-irqchip tests shortly.
> >
> >Please review carefully, esp. the first patch. Any missing kvm_make_request()
> >there may result in a hung guest.
> >
>
> This is now merged, with the change pointed out by Marcelo. Windows
> XP x64 fails installation without
>
> (vmx.c handle_cr())
> case 8: {
> u8 cr8_prev = kvm_get_cr8(vcpu);
> u8 cr8 = kvm_register_read(vcpu, reg);
> kvm_set_cr8(vcpu, cr8);
> skip_emulated_instruction(vcpu);
> if (irqchip_in_kernel(vcpu->kvm))
> return 1;
> - if (cr8_prev <= cr8)
> - return 1;
> vcpu->run->exit_reason = KVM_EXIT_SET_TPR;
> return 0;
> }
>
> Which doesn't make any sense (anyone?). The failure is present even
> without the patchset, and is fixed by the same hack, so a regression
> was not introduced.
If userspace does not have an uptodate TPR value, it can signal an
interrupt that is now blocked? Say:
- cr8 write 0
- cr8 write 5
- no exit to userspace
- userspace signals interrupt with priority
4 because it knows about tpr == 0.
next prev parent reply other threads:[~2010-09-17 19:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 11:36 [PATCH v4 0/6] Nonatomic interrupt injection Avi Kivity
2010-08-30 11:36 ` [PATCH v4 1/6] KVM: Check for pending events before attempting injection Avi Kivity
2010-08-30 17:41 ` Marcelo Tosatti
2010-08-30 11:36 ` [PATCH v4 2/6] KVM: VMX: Split up vmx_complete_interrupts() Avi Kivity
2010-08-30 11:36 ` [PATCH v4 3/6] KVM: VMX: Move real-mode interrupt injection fixup to vmx_complete_interrupts() Avi Kivity
2010-08-30 11:37 ` [PATCH v4 4/6] KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and entry Avi Kivity
2010-08-30 11:37 ` [PATCH v4 5/6] KVM: Non-atomic interrupt injection Avi Kivity
2010-08-30 11:37 ` [PATCH v4 6/6] KVM: VMX: Move fixup_rmode_irq() to avoid forward declaration Avi Kivity
2010-08-30 11:52 ` [PATCH v4 0/6] Nonatomic interrupt injection Avi Kivity
2010-09-16 13:35 ` Avi Kivity
2010-09-17 19:12 ` Marcelo Tosatti [this message]
2010-09-19 9:25 ` Avi Kivity
2010-09-19 9:28 ` Avi Kivity
2010-09-19 10:09 ` Avi Kivity
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=20100917191254.GA22281@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@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