From patchwork Fri Sep 30 19:31:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 9358815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BDA2F6075E for ; Fri, 30 Sep 2016 19:31:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8AB02A17A for ; Fri, 30 Sep 2016 19:31:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CF372A182; Fri, 30 Sep 2016 19:31:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C8E02A17A for ; Fri, 30 Sep 2016 19:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751129AbcI3Tbz (ORCPT ); Fri, 30 Sep 2016 15:31:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:44207 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076AbcI3Tby (ORCPT ); Fri, 30 Sep 2016 15:31:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BEB94ABE1; Fri, 30 Sep 2016 19:31:52 +0000 (UTC) Subject: Re: [PATCH 0/3] Support userspace irqchip with arch timers To: Christoffer Dall References: <20160927190806.22988-1-christoffer.dall@linaro.org> <3e85d538-2539-f190-0d17-a2ecfe7b48ce@suse.de> <20160930154335.GB7996@cbox> Cc: Marc Zyngier , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Alexander Graf Message-ID: <71b0ae9d-baea-1f65-3c01-5d87f4f4746f@suse.de> Date: Fri, 30 Sep 2016 21:31:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160930154335.GB7996@cbox> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 30.09.16 17:43, Christoffer Dall wrote: > On Fri, Sep 30, 2016 at 05:38:11PM +0200, Alexander Graf wrote: >> >> >> On 30.09.16 16:54, Alexander Graf wrote: >>> >>> >>> On 27.09.16 21:08, Christoffer Dall wrote: >>>> Hi Alex, >>>> >>>> Marc and I have been looking at this during Linaro connect and have >>>> slightly reworked your patch into this small series. >>>> >>>> It would be good if you could have a look at it and test it out. >>>> >>>> I've tested it with your QEMU, and it works for UP, but secondary CPUs >>>> fail to come up, and it looks like the kernel never gets an IPI for >>>> those CPUs from userspace. Any chance you're willing to take a look at >>>> that? >>> >>> I still need to see whether I can come up with a prettier solution, but >>> for now this works: >>> >>> diff --git a/target-i386/kvm.c b/target-i386/kvm.c >> >> Eh, no, not in i386 code :). But the problem seems to be a missing >> mpstate sync. >> > Yeah, that looked really dodgy. Have you tested it? :) This time around tested with the correct command line parameters I hope :). I'll send a pretty patch later. Alex --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/target-arm/kvm.c b/target-arm/kvm.c index b4c8fe2..b549f00 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -173,6 +173,12 @@ int kvm_arch_init(MachineState *ms, KVMState *s) */ kvm_async_interrupts_allowed = true; + /* + * PSCI wakes up secondary cores, so we always need to + * have vCPUs waiting in kernel space + */ + kvm_halt_in_kernel_allowed = true; + cap_has_mp_state = kvm_check_extension(s, KVM_CAP_MP_STATE); type_register_static(&host_arm_cpu_type_info);