From: Jan Kiszka <jan.kiszka@web.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: avi@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] fix "info cpus" halted state display
Date: Thu, 13 May 2010 15:57:05 +0200 [thread overview]
Message-ID: <4BEC0531.5090604@web.de> (raw)
In-Reply-To: <20100513131714.GC7757@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
Gleb Natapov wrote:
> When in-kernel irqchip is used env->halted is never used for anything
> except "info cpus" command.
In fact, it's used in a few more places, namely cpu_dump_state and the
gdbstub.
> Halted state is synced in
> kvm_arch_save_mpstate() and showed by do_info_cpus() but otherwise never
> looked at. Zeroing it here breaks "info cpus" since before
> do_info_cpus() outputs env->halted in io thread it is zeroed here when
> vcpu thread reenters kernel.
Looks good for current qemu-kvm.
Execution of kvm_cpu_exec once depended on env->halted, even for
in-kernel irqchip, right? Anyway, there are not such traces left here.
We will just need to look at it again when pushing in-kernel irqchips
upstream as its kvm loop looks different.
Jan
>
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
> index 61d9331..0ec2881 100644
> --- a/qemu-kvm-x86.c
> +++ b/qemu-kvm-x86.c
> @@ -922,10 +922,6 @@ void kvm_arch_load_regs(CPUState *env, int level)
> if (env->kvm_vcpu_update_vapic)
> kvm_tpr_enable_vapic(env);
> }
> - if (kvm_irqchip_in_kernel()) {
> - /* Avoid deadlock: no user space IRQ will ever clear it. */
> - env->halted = 0;
> - }
>
> kvm_put_vcpu_events(env, level);
> kvm_put_debugregs(env);
> --
> Gleb.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2010-05-13 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 13:17 [PATCH] fix "info cpus" halted state display Gleb Natapov
2010-05-13 13:57 ` Jan Kiszka [this message]
2010-05-16 5:35 ` Gleb Natapov
2010-05-20 10:16 ` Gleb Natapov
2010-05-23 11:26 ` 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=4BEC0531.5090604@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).