From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVHbK-0002zZ-C1 for qemu-devel@nongnu.org; Thu, 25 Apr 2013 04:32:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVHbF-0002Yn-OE for qemu-devel@nongnu.org; Thu, 25 Apr 2013 04:32:22 -0400 Message-ID: <5178E9FF.8070505@siemens.com> Date: Thu, 25 Apr 2013 10:31:59 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1366836589-20822-1-git-send-email-agraf@suse.de> In-Reply-To: <1366836589-20822-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] KVM: Don't assume that mpstate exists with in-kernel PIC always List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-ppc@nongnu.org" , "qemu-devel@nongnu.org" 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 > CC: Jan Kiszka > --- > 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