qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] KVM: Don't assume that mpstate exists with in-k


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] KVM: Don't assume that mpstate exists with in-kernel PIC always
Date: Thu, 25 Apr 2013 10:31:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2013-04-24 22:49, Alexander Graf wrote:
> On PPC, we don't support MP state. So far it's not necessary and I'm
> not convinced yet that we really need to support it ever.
> 
> However, the current idle logic in QEMU assumes that an in-kernel PIC
> also means we support MP state. This assumption is not true anymore.
> 
> Let's split up the two cases into two different variables. That way
> PPC can expose an in-kernel PIC, while not implementing MP state.
> 
> Signed-off-by: Alexander Graf <address@hidden>
> CC: Jan Kiszka <address@hidden>
> ---
>  cpus.c               |    2 +-
>  include/sysemu/kvm.h |   10 ++++++++++
>  kvm-all.c            |    2 ++
>  3 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index e919dd7..4a871c0 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -73,7 +73,7 @@ static bool cpu_thread_is_idle(CPUArchState *env)
>          return true;
>      }
>      if (!cpu->halted || qemu_cpu_has_work(cpu) ||
> -        kvm_async_interrupts_enabled()) {
> +        (kvm_async_interrupts_enabled() && kvm_mpstate_enabled())) {

Better define something like kvm_halt_in_kernel() instead of making the
condition more complex.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]