From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support Date: Sun, 05 Jun 2011 19:31:52 +0300 Message-ID: <4DEBAF78.7040409@redhat.com> References: <20110603150318.17011.82777.stgit@ubuntu> <4DE8FE38.6030405@siemens.com> <4DE90397.5080801@siemens.com> <4DEB74DA.2040909@redhat.com> <4DEB8F22.1020802@web.de> <4DEB9033.9060109@redhat.com> <4DEB998E.1010805@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , catalin.marinas@arm.com, android-virt@lists.cs.columbia.edu, s.raho@virtualopensystems.com, a.motakis@virtualopensystems.com, kvm@vger.kernel.org, a.costa@virtualopensystems.com To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3942 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754460Ab1FEQcN (ORCPT ); Sun, 5 Jun 2011 12:32:13 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 06/05/2011 07:24 PM, Christoffer Dall wrote: > On ARM, we are talking about IRQs and FIQs, both of which can be > lowered and raised. In other words, four values. Two lines per cpu, each of which can be raised or lowered. > But instead of this, you want to use KVM_IRQ_LINE and just assume one > CPU to begin with and always assert/deassert the interrupts on that > CPU and later, with SMP support, you want to use KVM_SET_GSI_ROUTING > to control which CPU gets the interrupt - even though GSI is a > non-existing concept for ARM? (Also, I could not seem to find any use > of GSI_ROUTING in current upstream QEMU, but I may be missing > something here?). Almost. vcpu N's IRQ -> KVM_IRQ_LINE(N*2, level). vcpu N's FIQ -> KVM_IRQ_LINE(N*2+1, level), + documentation somewhere. > I suggest I simply use a flag in the irq field on the kvm_interrupt > struct as suggested by Jan, for now, and if we start emulating GICs > inside the kernel for ARM we can go the extra mile at that point. > IMHO, I think the semantics of actually raising an interrup line on > the VCPU, as opposed to the VM, when it's CPU interrupt we are talking > about is equally important. When you implement an interrupt controller, you can use KVM_SET_GSI_ROUTING to change the meaning of the parameter to KVM_IRQ_LINE to point to the interrupt controllers. -- error compiling committee.c: too many arguments to function