From: Avi Kivity <avi@qumranet.com>
To: "Yang, Sheng" <sheng.yang@intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Fix QEmu interrupted HLT emulation
Date: Thu, 11 Sep 2008 11:50:37 +0300 [thread overview]
Message-ID: <48C8DBDD.9040605@qumranet.com> (raw)
In-Reply-To: <200807311352.10657.sheng.yang@intel.com>
Yang, Sheng wrote:
> From: Sheng Yang <sheng.yang@intel.com>
> Date: Thu, 31 Jul 2008 13:43:58 +0800
> Subject: [PATCH] KVM: Fix QEmu interrupted HLT emulation
>
> QEmu can interrupt VCPU from HLT emulation without setting mp_state to
> MP_STATE_RUNNABLE, when it kick vcpus which are doing HLT emulation to
> do something like "stop" or "info cpus". Here are two issues of this
> behaviour:
>
> First, if vcpu exit to QEmu with MP_STATE_HALTED, it would keep in
> this state later for vcpu_run(), which is eerie...
>
> Second, a practical problem: bios load AP boot up code to 0x10000
> (now), and AP is running HLT there. But later grub load it's stage2
> code to the same address. Then if the halting vcpu was forced exit to
> QEmu in grub, and come back for vcpu_run later, it can't execute HLT
> instruction anymore, just because the bios code is not there,
> and it would follow a piece of code of grub, which would cause
> completely chaos...
>
> The second issue directly lead to guest crash or SMP linux can't boot
> up AP later if we "stop" or "info cpus" in grub. Though I also sent a
> patch for BIOS, it's necessary to get correct behavior here.
>
Going over my backlog it looks like I missed this. But I think
Marcelo's rework obsoletes this patch?
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2008-09-11 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 13:55 [PATCH] KVM: Fix exiting from HLT emulation with MP_STATE_HALTED Yang, Sheng
2008-07-31 4:47 ` Yang, Sheng
2008-07-31 5:52 ` [PATCH] KVM: Fix QEmu interrupted HLT emulation Yang, Sheng
2008-09-11 8:50 ` Avi Kivity [this message]
2008-09-11 8:54 ` Yang, Sheng
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=48C8DBDD.9040605@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=sheng.yang@intel.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.