Re: [PATCH] fix "info cpus" halted state display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> 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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux