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 <ag...@suse.de> > CC: Jan Kiszka <jan.kis...@siemens.com> > --- > 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