public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: KVM: x86: do not execute guest code if vcpu not runnable
Date: Sat, 19 Jul 2008 20:41:04 -0300	[thread overview]
Message-ID: <20080719234104.GA10435@dmt.cnet> (raw)
In-Reply-To: <20080719181143.GA27283@dmt.cnet>

On Sat, Jul 19, 2008 at 03:11:44PM -0300, Marcelo Tosatti wrote:
> 
> If a vcpu has been offlined, or not initialized at all, signals
> requesting userspace work to be performed will result in KVM attempting
> to re-entry guest mode.
> 
> Problem is that the in-kernel irqchip emulation happily executes HALTED
> state vcpu's. This breaks "savevm" on Windows SMP installation, for
> example.
> 
> Also, setting the mpstate to runnable when setting an IRQ via
> pic_irq_request / kvm_apic_set_irq is necessary due to this check on
> emulate_halt:
> 
>                 kvm_vcpu_block(vcpu);
>                 down_read(&vcpu->kvm->slots_lock);
>                 if (vcpu->arch.mp_state != KVM_MP_STATE_RUNNABLE)
>                         return -EINTR;
> 
> Otherwise the vcpu will return to userspace needlessly.

Scratch this, burns 100% CPU.


      reply	other threads:[~2008-07-19 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-19 18:11 KVM: x86: do not execute guest code if vcpu not runnable Marcelo Tosatti
2008-07-19 23:41 ` Marcelo Tosatti [this message]

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=20080719234104.GA10435@dmt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@qumranet.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