From patchwork Fri Sep 30 14:54:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 9358479 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 E0FDC6075E for ; Fri, 30 Sep 2016 14:54:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D34572A07C for ; Fri, 30 Sep 2016 14:54:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C75412A081; Fri, 30 Sep 2016 14:54:36 +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 6BC882A07C for ; Fri, 30 Sep 2016 14:54:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932561AbcI3Oyd (ORCPT ); Fri, 30 Sep 2016 10:54:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:43266 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932515AbcI3Oyb (ORCPT ); Fri, 30 Sep 2016 10:54:31 -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 A6F92AE94; Fri, 30 Sep 2016 14:54:29 +0000 (UTC) Subject: Re: [PATCH 0/3] Support userspace irqchip with arch timers To: Christoffer Dall References: <20160927190806.22988-1-christoffer.dall@linaro.org> Cc: Paolo Bonzini , Marc Zyngier , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org From: Alexander Graf Message-ID: Date: Fri, 30 Sep 2016 16:54:28 +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: <20160927190806.22988-1-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 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-i386/kvm.c b/target-i386/kvm.c index f1ad805..8b9a084 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -2393,7 +2393,11 @@ static int kvm_get_mp_state(X86CPU *cpu) return ret; } env->mp_state = mp_state.mp_state; +#ifdef CONFIG_ARM + if (kvm_enabled()) { +#else if (kvm_irqchip_in_kernel()) { +#endif cs->halted = (mp_state.mp_state == KVM_MP_STATE_HALTED); } return 0;